diff options
author | danh-arm <dan.handley@arm.com> | 2014-08-04 10:34:18 +0100 |
---|---|---|
committer | danh-arm <dan.handley@arm.com> | 2014-08-04 10:34:18 +0100 |
commit | c1efc4c0666b95912b54e079de484d8c2249e045 (patch) | |
tree | b14a8430d473d3ab8d6cc10ad92f8f5e68f8d4d6 /plat | |
parent | 319609ae7a071e34a42911ea3c443c983075899c (diff) | |
parent | 53fdcebd6d330183ce3e46f38bb50e838a6a60de (diff) |
Merge pull request #179 from jcastillo-arm/jc/tf-issues/219
Call platform_is_primary_cpu() only from reset handler
Diffstat (limited to 'plat')
-rw-r--r-- | plat/common/aarch64/platform_helpers.S | 14 | ||||
-rw-r--r-- | plat/fvp/aarch64/fvp_helpers.S | 7 | ||||
-rw-r--r-- | plat/fvp/fvp_def.h | 1 | ||||
-rw-r--r-- | plat/fvp/include/platform_def.h | 1 |
4 files changed, 8 insertions, 15 deletions
diff --git a/plat/common/aarch64/platform_helpers.S b/plat/common/aarch64/platform_helpers.S index 5e2d1b1..6dc4ec6 100644 --- a/plat/common/aarch64/platform_helpers.S +++ b/plat/common/aarch64/platform_helpers.S @@ -34,7 +34,6 @@ .weak platform_get_core_pos - .weak platform_is_primary_cpu .weak platform_check_mpidr .weak plat_report_exception .weak plat_crash_console_init @@ -53,19 +52,6 @@ func platform_get_core_pos ret /* ----------------------------------------------------- - * void platform_is_primary_cpu (unsigned int mpid); - * - * Given the mpidr say whether this cpu is the primary - * cpu (applicable ony after a cold boot) - * ----------------------------------------------------- - */ -func platform_is_primary_cpu - and x0, x0, #(MPIDR_CLUSTER_MASK | MPIDR_CPU_MASK) - cmp x0, #PRIMARY_CPU - cset x0, eq - ret - - /* ----------------------------------------------------- * Placeholder function which should be redefined by * each platform. * ----------------------------------------------------- diff --git a/plat/fvp/aarch64/fvp_helpers.S b/plat/fvp/aarch64/fvp_helpers.S index 823588e..4011306 100644 --- a/plat/fvp/aarch64/fvp_helpers.S +++ b/plat/fvp/aarch64/fvp_helpers.S @@ -40,6 +40,7 @@ .globl plat_secondary_cold_boot_setup .globl platform_mem_init .globl plat_report_exception + .globl platform_is_primary_cpu .globl plat_crash_console_init .globl plat_crash_console_putc @@ -191,6 +192,12 @@ func plat_report_exception str w0, [x1] ret +func platform_is_primary_cpu + and x0, x0, #(MPIDR_CLUSTER_MASK | MPIDR_CPU_MASK) + cmp x0, #FVP_PRIMARY_CPU + cset x0, eq + ret + /* Define a crash console for the plaform */ #define FVP_CRASH_CONSOLE_BASE PL011_UART0_BASE diff --git a/plat/fvp/fvp_def.h b/plat/fvp/fvp_def.h index 21edb3b..a757b4d 100644 --- a/plat/fvp/fvp_def.h +++ b/plat/fvp/fvp_def.h @@ -36,6 +36,7 @@ /* Firmware Image Package */ #define FIP_IMAGE_NAME "fip.bin" +#define FVP_PRIMARY_CPU 0x0 /******************************************************************************* * FVP memory map related constants diff --git a/plat/fvp/include/platform_def.h b/plat/fvp/include/platform_def.h index 9983266..70f84bb 100644 --- a/plat/fvp/include/platform_def.h +++ b/plat/fvp/include/platform_def.h @@ -70,7 +70,6 @@ #define PLATFORM_MAX_CPUS_PER_CLUSTER 4 #define PLATFORM_NUM_AFFS (PLATFORM_CLUSTER_COUNT + \ PLATFORM_CORE_COUNT) -#define PRIMARY_CPU 0x0 #define MAX_IO_DEVICES 3 #define MAX_IO_HANDLES 4 |