diff options
Diffstat (limited to 'plat/common')
-rw-r--r-- | plat/common/aarch32/plat_sp_min_common.c | 11 | ||||
-rw-r--r-- | plat/common/aarch64/plat_common.c | 32 | ||||
-rw-r--r-- | plat/common/aarch64/plat_psci_common.c | 9 | ||||
-rw-r--r-- | plat/common/aarch64/platform_helpers.S | 23 | ||||
-rw-r--r-- | plat/common/aarch64/platform_mp_stack.S | 110 | ||||
-rw-r--r-- | plat/common/aarch64/platform_up_stack.S | 26 | ||||
-rw-r--r-- | plat/common/plat_bl1_common.c | 11 | ||||
-rw-r--r-- | plat/common/plat_bl_common.c | 17 | ||||
-rw-r--r-- | plat/common/plat_gic.c | 49 |
9 files changed, 1 insertions, 287 deletions
diff --git a/plat/common/aarch32/plat_sp_min_common.c b/plat/common/aarch32/plat_sp_min_common.c index 67ae817e..a9a92c7e 100644 --- a/plat/common/aarch32/plat_sp_min_common.c +++ b/plat/common/aarch32/plat_sp_min_common.c @@ -23,14 +23,3 @@ void sp_min_plat_runtime_setup(void) */ console_uninit(); } - -#if !ERROR_DEPRECATED - -#pragma weak sp_min_early_platform_setup2 - -void sp_min_early_platform_setup2(u_register_t arg0, u_register_t arg1, - u_register_t arg2, u_register_t arg3) -{ - sp_min_early_platform_setup((void *)arg0, (void *)arg1); -} -#endif diff --git a/plat/common/aarch64/plat_common.c b/plat/common/aarch64/plat_common.c index 5f2972cc..e6f5f204 100644 --- a/plat/common/aarch64/plat_common.c +++ b/plat/common/aarch64/plat_common.c @@ -19,10 +19,6 @@ * platforms but may also be overridden by a platform if required. */ #pragma weak bl31_plat_runtime_setup -#if !ERROR_DEPRECATED -#pragma weak plat_get_syscnt_freq2 -#pragma weak bl31_early_platform_setup2 -#endif /* ERROR_DEPRECATED */ #if SDEI_SUPPORT #pragma weak plat_sdei_handle_masked_trigger @@ -40,7 +36,6 @@ void bl31_plat_runtime_setup(void) #endif } -#if !ENABLE_PLAT_COMPAT /* * Helper function for platform_get_pos() when platform compatibility is * disabled. This is to enable SPDs using the older platform API to continue @@ -52,33 +47,6 @@ unsigned int platform_core_pos_helper(unsigned long mpidr) assert(idx >= 0); return idx; } -#endif - - -#if !ERROR_DEPRECATED -unsigned int plat_get_syscnt_freq2(void) -{ - WARN("plat_get_syscnt_freq() is deprecated\n"); - WARN("Please define plat_get_syscnt_freq2()\n"); - /* - * Suppress deprecated declaration warning in compatibility function - */ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - unsigned long long freq = plat_get_syscnt_freq(); -#pragma GCC diagnostic pop - - assert(freq >> 32 == 0); - - return (unsigned int)freq; -} - -void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, - u_register_t arg2, u_register_t arg3) -{ - bl31_early_platform_setup((void *) arg0, (void *)arg1); -} -#endif /* ERROR_DEPRECATED */ #if SDEI_SUPPORT /* diff --git a/plat/common/aarch64/plat_psci_common.c b/plat/common/aarch64/plat_psci_common.c deleted file mode 100644 index 35afcdb9..00000000 --- a/plat/common/aarch64/plat_psci_common.c +++ /dev/null @@ -1,9 +0,0 @@ -/* - * Copyright (c) 2015-2016, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#if !ERROR_DEPRECATED -#include "../plat_psci_common.c" -#endif diff --git a/plat/common/aarch64/platform_helpers.S b/plat/common/aarch64/platform_helpers.S index a5d26c01..7214588a 100644 --- a/plat/common/aarch64/platform_helpers.S +++ b/plat/common/aarch64/platform_helpers.S @@ -24,33 +24,10 @@ .weak plat_handle_double_fault .weak plat_handle_el3_ea -#if !ENABLE_PLAT_COMPAT .globl platform_get_core_pos #define MPIDR_RES_BIT_MASK 0xff000000 - /* ------------------------------------------------------------------ - * int platform_get_core_pos(int mpidr) - * Returns the CPU index of the CPU specified by mpidr. This is - * defined when platform compatibility is disabled to enable Trusted - * Firmware components like SPD using the old platform API to work. - * This API is deprecated and it assumes that the mpidr specified is - * that of a valid and present CPU. Instead, plat_my_core_pos() - * should be used for CPU index of the current CPU and - * plat_core_pos_by_mpidr() should be used for CPU index of a - * CPU specified by its mpidr. - * ------------------------------------------------------------------ - */ -func_deprecated platform_get_core_pos - bic x0, x0, #MPIDR_RES_BIT_MASK - mrs x1, mpidr_el1 - bic x1, x1, #MPIDR_RES_BIT_MASK - cmp x0, x1 - beq plat_my_core_pos - b platform_core_pos_helper -endfunc_deprecated platform_get_core_pos -#endif - /* ----------------------------------------------------- * Placeholder function which should be redefined by * each platform. diff --git a/plat/common/aarch64/platform_mp_stack.S b/plat/common/aarch64/platform_mp_stack.S index 10323bf6..f1cc6beb 100644 --- a/plat/common/aarch64/platform_mp_stack.S +++ b/plat/common/aarch64/platform_mp_stack.S @@ -10,81 +10,11 @@ #include <platform_def.h> .local platform_normal_stacks -#if ENABLE_PLAT_COMPAT - .globl plat_get_my_stack - .globl plat_set_my_stack - .weak platform_get_stack - .weak platform_set_stack -#else .weak plat_get_my_stack .weak plat_set_my_stack .globl platform_get_stack .globl platform_set_stack -#endif /* __ENABLE_PLAT_COMPAT__ */ -#if ENABLE_PLAT_COMPAT - /* --------------------------------------------------------------------- - * When the compatility layer is enabled, the new platform APIs - * viz plat_get_my_stack() and plat_set_my_stack() need to be - * defined using the previous APIs platform_get_stack() and - * platform_set_stack(). Also we need to provide weak definitions - * of platform_get_stack() and platform_set_stack() for the platforms - * to reuse. - * -------------------------------------------------------------------- - */ - - /* ----------------------------------------------------- - * unsigned long plat_get_my_stack () - * - * For the current CPU, this function returns the stack - * pointer for a stack allocated in device memory. - * ----------------------------------------------------- - */ -func plat_get_my_stack - mrs x0, mpidr_el1 - b platform_get_stack -endfunc plat_get_my_stack - - /* ----------------------------------------------------- - * void plat_set_my_stack () - * - * For the current CPU, this function sets the stack - * pointer to a stack allocated in normal memory. - * ----------------------------------------------------- - */ -func plat_set_my_stack - mrs x0, mpidr_el1 - b platform_set_stack -endfunc plat_set_my_stack - - /* ----------------------------------------------------- - * unsigned long platform_get_stack (unsigned long mpidr) - * - * For a given CPU, this function returns the stack - * pointer for a stack allocated in device memory. - * ----------------------------------------------------- - */ -func platform_get_stack - mov x10, x30 // lr - get_mp_stack platform_normal_stacks, PLATFORM_STACK_SIZE - ret x10 -endfunc platform_get_stack - - /* ----------------------------------------------------- - * void platform_set_stack (unsigned long mpidr) - * - * For a given CPU, this function sets the stack pointer - * to a stack allocated in normal memory. - * ----------------------------------------------------- - */ -func platform_set_stack - mov x9, x30 // lr - bl platform_get_stack - mov sp, x0 - ret x9 -endfunc platform_set_stack - -#else /* --------------------------------------------------------------------- * When the compatility layer is disabled, the new platform APIs * viz plat_get_my_stack() and plat_set_my_stack() are @@ -96,44 +26,6 @@ endfunc platform_set_stack * -------------------------------------------------------------------- */ - /* ------------------------------------------------------- - * unsigned long platform_get_stack (unsigned long mpidr) - * - * For the current CPU, this function returns the stack - * pointer for a stack allocated in device memory. The - * 'mpidr' should correspond to that of the current CPU. - * This function is deprecated and plat_get_my_stack() - * should be used instead. - * ------------------------------------------------------- - */ -func_deprecated platform_get_stack -#if ENABLE_ASSERTIONS - mrs x1, mpidr_el1 - cmp x0, x1 - ASM_ASSERT(eq) -#endif - b plat_get_my_stack -endfunc_deprecated platform_get_stack - - /* ----------------------------------------------------- - * void platform_set_stack (unsigned long mpidr) - * - * For the current CPU, this function sets the stack pointer - * to a stack allocated in normal memory. The - * 'mpidr' should correspond to that of the current CPU. - * This function is deprecated and plat_get_my_stack() - * should be used instead. - * ----------------------------------------------------- - */ -func_deprecated platform_set_stack -#if ENABLE_ASSERTIONS - mrs x1, mpidr_el1 - cmp x0, x1 - ASM_ASSERT(eq) -#endif - b plat_set_my_stack -endfunc_deprecated platform_set_stack - /* ----------------------------------------------------- * uintptr_t plat_get_my_stack () * @@ -161,8 +53,6 @@ func plat_set_my_stack ret x9 endfunc plat_set_my_stack -#endif /*__ENABLE_PLAT_COMPAT__*/ - /* ----------------------------------------------------- * Per-cpu stacks in normal memory. Each cpu gets a * stack of PLATFORM_STACK_SIZE bytes. diff --git a/plat/common/aarch64/platform_up_stack.S b/plat/common/aarch64/platform_up_stack.S index a99a7ccf..0ff69305 100644 --- a/plat/common/aarch64/platform_up_stack.S +++ b/plat/common/aarch64/platform_up_stack.S @@ -43,32 +43,6 @@ func plat_set_my_stack endfunc plat_set_my_stack /* ----------------------------------------------------- - * unsigned long platform_get_stack () - * - * For cold-boot BL images, only the primary CPU needs a - * stack. This function returns the stack pointer for a - * stack allocated in device memory. This function - * is deprecated. - * ----------------------------------------------------- - */ -func_deprecated platform_get_stack - b plat_get_my_stack -endfunc_deprecated platform_get_stack - - /* ----------------------------------------------------- - * void platform_set_stack () - * - * For cold-boot BL images, only the primary CPU needs a - * stack. This function sets the stack pointer to a stack - * allocated in normal memory.This function is - * deprecated. - * ----------------------------------------------------- - */ -func_deprecated platform_set_stack - b plat_set_my_stack -endfunc_deprecated platform_set_stack - - /* ----------------------------------------------------- * Single cpu stack in normal memory. * Used for C code during boot, PLATFORM_STACK_SIZE bytes * are allocated diff --git a/plat/common/plat_bl1_common.c b/plat/common/plat_bl1_common.c index 67779799..824f9e55 100644 --- a/plat/common/plat_bl1_common.c +++ b/plat/common/plat_bl1_common.c @@ -104,18 +104,9 @@ int bl1_plat_handle_post_image_load(unsigned int image_id) * to BL2. BL2 will read the memory layout before using its * memory for other purposes. */ -#if LOAD_IMAGE_V2 bl2_tzram_layout = (meminfo_t *) bl1_tzram_layout->total_base; -#else - bl2_tzram_layout = (meminfo_t *) round_up(bl1_tzram_layout->free_base, - sizeof(uint64_t)); -#endif /* LOAD_IMAGE_V2 */ - -#if !ERROR_DEPRECATED - bl1_init_bl2_mem_layout(bl1_tzram_layout, bl2_tzram_layout); -#else + bl1_calc_bl2_mem_layout(bl1_tzram_layout, bl2_tzram_layout); -#endif ep_info->args.arg1 = (uintptr_t)bl2_tzram_layout; diff --git a/plat/common/plat_bl_common.c b/plat/common/plat_bl_common.c index 95d73e3c..264d5180 100644 --- a/plat/common/plat_bl_common.c +++ b/plat/common/plat_bl_common.c @@ -40,7 +40,6 @@ void bl2_plat_preload_setup(void) { } -#if LOAD_IMAGE_V2 int bl2_plat_handle_pre_image_load(unsigned int image_id) { return 0; @@ -50,28 +49,12 @@ int bl2_plat_handle_post_image_load(unsigned int image_id) { return 0; } -#endif int plat_try_next_boot_source(void) { return 0; } -#if !ERROR_DEPRECATED -#pragma weak bl2_early_platform_setup2 - -/* - * The following platform API implementation that allow compatibility for - * the older platform APIs. - */ -void bl2_early_platform_setup2(u_register_t arg0, u_register_t arg1, - u_register_t arg2, u_register_t arg3) -{ - bl2_early_platform_setup((void *)arg1); -} -#endif - - #if TRUSTED_BOARD_BOOT /* * The following default implementation of the function simply returns the diff --git a/plat/common/plat_gic.c b/plat/common/plat_gic.c deleted file mode 100644 index 5363c920..00000000 --- a/plat/common/plat_gic.c +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2014, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ -#include <arm_gic.h> - -/* - * The following platform GIC functions are weakly defined. They - * provide typical implementations that may be re-used by multiple - * platforms but may also be overridden by a platform if required. - */ -#pragma weak plat_ic_get_pending_interrupt_id -#pragma weak plat_ic_get_pending_interrupt_type -#pragma weak plat_ic_acknowledge_interrupt -#pragma weak plat_ic_get_interrupt_type -#pragma weak plat_ic_end_of_interrupt -#pragma weak plat_interrupt_type_to_line - -uint32_t plat_ic_get_pending_interrupt_id(void) -{ - return arm_gic_get_pending_interrupt_id(); -} - -uint32_t plat_ic_get_pending_interrupt_type(void) -{ - return arm_gic_get_pending_interrupt_type(); -} - -uint32_t plat_ic_acknowledge_interrupt(void) -{ - return arm_gic_acknowledge_interrupt(); -} - -uint32_t plat_ic_get_interrupt_type(uint32_t id) -{ - return arm_gic_get_interrupt_type(id); -} - -void plat_ic_end_of_interrupt(uint32_t id) -{ - arm_gic_end_of_interrupt(id); -} - -uint32_t plat_interrupt_type_to_line(uint32_t type, - uint32_t security_state) -{ - return arm_gic_interrupt_type_to_line(type, security_state); -} |