diff options
Diffstat (limited to 'plat/common')
-rw-r--r-- | plat/common/aarch64/plat_common.c | 8 | ||||
-rw-r--r-- | plat/common/aarch64/platform_helpers.S | 19 | ||||
-rw-r--r-- | plat/common/aarch64/platform_mp_stack.S | 34 | ||||
-rw-r--r-- | plat/common/aarch64/platform_up_stack.S | 25 |
4 files changed, 25 insertions, 61 deletions
diff --git a/plat/common/aarch64/plat_common.c b/plat/common/aarch64/plat_common.c index 94b9dfdf..90574fd6 100644 --- a/plat/common/aarch64/plat_common.c +++ b/plat/common/aarch64/plat_common.c @@ -38,12 +38,12 @@ #pragma weak bl31_plat_enable_mmu #pragma weak bl32_plat_enable_mmu -void bl31_plat_enable_mmu(void) +void bl31_plat_enable_mmu(uint32_t flags) { - enable_mmu_el3(); + enable_mmu_el3(flags); } -void bl32_plat_enable_mmu(void) +void bl32_plat_enable_mmu(uint32_t flags) { - enable_mmu_el1(); + enable_mmu_el1(flags); } diff --git a/plat/common/aarch64/platform_helpers.S b/plat/common/aarch64/platform_helpers.S index f6ac13eb..5e2d1b11 100644 --- a/plat/common/aarch64/platform_helpers.S +++ b/plat/common/aarch64/platform_helpers.S @@ -37,6 +37,8 @@ .weak platform_is_primary_cpu .weak platform_check_mpidr .weak plat_report_exception + .weak plat_crash_console_init + .weak plat_crash_console_putc /* ----------------------------------------------------- * int platform_get_core_pos(int mpidr); @@ -79,3 +81,20 @@ func platform_check_mpidr */ func plat_report_exception ret + + /* ----------------------------------------------------- + * Placeholder function which should be redefined by + * each platform. + * ----------------------------------------------------- + */ +func plat_crash_console_init + mov x0, #0 + ret + + /* ----------------------------------------------------- + * Placeholder function which should be redefined by + * each platform. + * ----------------------------------------------------- + */ +func plat_crash_console_putc + ret diff --git a/plat/common/aarch64/platform_mp_stack.S b/plat/common/aarch64/platform_mp_stack.S index 801ec7fa..8eb1aa68 100644 --- a/plat/common/aarch64/platform_mp_stack.S +++ b/plat/common/aarch64/platform_mp_stack.S @@ -33,29 +33,12 @@ #include <platform_def.h> - .local pcpu_dv_mem_stack .local platform_normal_stacks .weak platform_set_stack .weak platform_get_stack - .weak platform_set_coherent_stack /* ----------------------------------------------------- - * void platform_set_coherent_stack (unsigned long mpidr) - * - * For a given CPU, this function sets the stack pointer - * to a stack allocated in device memory. This stack can - * be used by C code which enables/disables the SCTLR.M - * SCTLR.C bit e.g. while powering down a cpu - * ----------------------------------------------------- - */ -func platform_set_coherent_stack - mov x5, x30 // lr - get_mp_stack pcpu_dv_mem_stack, PCPU_DV_MEM_STACK_SIZE - mov sp, x0 - ret x5 - - /* ----------------------------------------------------- * unsigned long platform_get_stack (unsigned long mpidr) * * For a given CPU, this function returns the stack @@ -81,22 +64,9 @@ func platform_set_stack ret x9 /* ----------------------------------------------------- - * Per-cpu stacks in normal memory. - * Used for C code during runtime execution (when coherent - * stacks are not required). - * Each cpu gets a stack of PLATFORM_STACK_SIZE bytes. + * Per-cpu stacks in normal memory. Each cpu gets a + * stack of PLATFORM_STACK_SIZE bytes. * ----------------------------------------------------- */ declare_stack platform_normal_stacks, tzfw_normal_stacks, \ PLATFORM_STACK_SIZE, PLATFORM_CORE_COUNT - - /* ----------------------------------------------------- - * Per-cpu stacks in device memory. - * Used for C code just before power down or right after - * power up when the MMU or caches need to be turned on - * or off. - * Each cpu gets a stack of PCPU_DV_MEM_STACK_SIZE bytes. - * ----------------------------------------------------- - */ -declare_stack pcpu_dv_mem_stack, tzfw_coherent_mem, \ - PCPU_DV_MEM_STACK_SIZE, PLATFORM_CORE_COUNT diff --git a/plat/common/aarch64/platform_up_stack.S b/plat/common/aarch64/platform_up_stack.S index 45a96a64..73b74b2e 100644 --- a/plat/common/aarch64/platform_up_stack.S +++ b/plat/common/aarch64/platform_up_stack.S @@ -33,26 +33,9 @@ #include <platform_def.h> - .local pcpu_dv_mem_stack .local platform_normal_stacks .globl platform_set_stack .globl platform_get_stack - .globl platform_set_coherent_stack - - - /* ----------------------------------------------------- - * void platform_set_coherent_stack (unsigned long) - * - * For cold-boot BL images, only the primary CPU needs a - * stack. This function sets the stack pointer to a stack - * allocated in device memory. - * ----------------------------------------------------- - */ -func platform_set_coherent_stack - get_up_stack pcpu_dv_mem_stack, PCPU_DV_MEM_STACK_SIZE - mov sp, x0 - ret - /* ----------------------------------------------------- * unsigned long platform_get_stack (unsigned long) @@ -87,11 +70,3 @@ func platform_set_stack */ declare_stack platform_normal_stacks, tzfw_normal_stacks, \ PLATFORM_STACK_SIZE, 1 - - /* ----------------------------------------------------- - * Single cpu stack in device/coherent memory. - * PCPU_DV_MEM_STACK_SIZE bytes are allocated. - * ----------------------------------------------------- - */ -declare_stack pcpu_dv_mem_stack, tzfw_coherent_mem, \ - PCPU_DV_MEM_STACK_SIZE, 1 |