diff --git a/Makefile b/Makefile index 782c48984d5059691d4ec7c03e37667cd6d42e41..83650a8aca7d98d561d9a8732f6af0e89296f4d2 100644 --- a/Makefile +++ b/Makefile @@ -171,6 +171,7 @@ BL_COMMON_SOURCES += common/bl_common.c \ common/${ARCH}/debug.S \ lib/${ARCH}/cache_helpers.S \ lib/${ARCH}/misc_helpers.S \ + plat/common/${ARCH}/plat_common.c \ plat/common/${ARCH}/platform_helpers.S \ ${STDLIB_SRCS} diff --git a/bl1/bl1.mk b/bl1/bl1.mk index 45ad01ebf2597aa2bd8b93ce71c5f529486c1ffa..3f3bedb38a3cb73318e62a1a7c5deb1cff64d96f 100644 --- a/bl1/bl1.mk +++ b/bl1/bl1.mk @@ -36,8 +36,8 @@ BL1_SOURCES += bl1/bl1_main.c \ lib/cpus/${ARCH}/cpu_helpers.S \ lib/cpus/errata_report.c \ lib/el3_runtime/${ARCH}/context_mgmt.c \ - plat/common/plat_bl1_common.c - + plat/common/plat_bl1_common.c \ + plat/common/${ARCH}/platform_up_stack.S ifeq (${ARCH},aarch64) BL1_SOURCES += lib/el3_runtime/aarch64/context.S diff --git a/bl2/bl2.mk b/bl2/bl2.mk index f823ef46de83c9f2266f326fffa93ed198196430..27673b3ebc4da2ad6057e5f4c5b2ef7ba91f3281 100644 --- a/bl2/bl2.mk +++ b/bl2/bl2.mk @@ -1,5 +1,5 @@ # -# Copyright (c) 2013-2016, ARM Limited and Contributors. All rights reserved. +# Copyright (c) 2013-2017, ARM Limited and Contributors. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: @@ -31,7 +31,8 @@ BL2_SOURCES += bl2/bl2_main.c \ bl2/${ARCH}/bl2_entrypoint.S \ bl2/${ARCH}/bl2_arch_setup.c \ - lib/locks/exclusive/${ARCH}/spinlock.S + lib/locks/exclusive/${ARCH}/spinlock.S \ + plat/common/${ARCH}/platform_up_stack.S ifeq (${ARCH},aarch64) BL2_SOURCES += common/aarch64/early_exceptions.S diff --git a/bl2u/bl2u.mk b/bl2u/bl2u.mk index aa9de544c8d52c1dd52c2e581cecc34bf82d94b9..ef70bb24a2bc0fb01c1a083c2054fa0086e2494e 100644 --- a/bl2u/bl2u.mk +++ b/bl2u/bl2u.mk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, ARM Limited and Contributors. All rights reserved. +# Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: @@ -30,6 +30,7 @@ BL2U_SOURCES += bl2u/bl2u_main.c \ bl2u/aarch64/bl2u_entrypoint.S \ - common/aarch64/early_exceptions.S + common/aarch64/early_exceptions.S \ + plat/common/aarch64/platform_up_stack.S BL2U_LINKERFILE := bl2u/bl2u.ld.S diff --git a/bl31/bl31.mk b/bl31/bl31.mk index 4de511b60d9b292be107b1856f912369b94e4399..c89ebc0be6decad7d1548b092fe40cbb3cfa80e6 100644 --- a/bl31/bl31.mk +++ b/bl31/bl31.mk @@ -1,5 +1,5 @@ # -# Copyright (c) 2013-2016, ARM Limited and Contributors. All rights reserved. +# Copyright (c) 2013-2017, ARM Limited and Contributors. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: @@ -37,6 +37,7 @@ BL31_SOURCES += bl31/bl31_main.c \ bl31/aarch64/crash_reporting.S \ bl31/bl31_context_mgmt.c \ common/runtime_svc.c \ + plat/common/aarch64/platform_mp_stack.S \ services/std_svc/std_svc_setup.c \ ${PSCI_LIB_SOURCES} diff --git a/plat/arm/common/arm_common.mk b/plat/arm/common/arm_common.mk index 3156f0854fed525a19324b90d26e9430bbf57644..e918e306a694c704b2a9609da0580e2bf5c9366d 100644 --- a/plat/arm/common/arm_common.mk +++ b/plat/arm/common/arm_common.mk @@ -112,16 +112,14 @@ include lib/xlat_tables_v2/xlat_tables.mk PLAT_BL_COMMON_SOURCES += ${XLAT_TABLES_LIB_SRCS} \ plat/arm/common/${ARCH}/arm_helpers.S \ - plat/arm/common/arm_common.c \ - plat/common/${ARCH}/plat_common.c + plat/arm/common/arm_common.c BL1_SOURCES += drivers/arm/sp805/sp805.c \ drivers/io/io_fip.c \ drivers/io/io_memmap.c \ drivers/io/io_storage.c \ plat/arm/common/arm_bl1_setup.c \ - plat/arm/common/arm_io_storage.c \ - plat/common/${ARCH}/platform_up_stack.S + plat/arm/common/arm_io_storage.c ifdef EL3_PAYLOAD_BASE # Need the arm_program_trusted_mailbox() function to release secondary CPUs from # their holding pen @@ -132,21 +130,18 @@ BL2_SOURCES += drivers/io/io_fip.c \ drivers/io/io_memmap.c \ drivers/io/io_storage.c \ plat/arm/common/arm_bl2_setup.c \ - plat/arm/common/arm_io_storage.c \ - plat/common/${ARCH}/platform_up_stack.S + plat/arm/common/arm_io_storage.c ifeq (${LOAD_IMAGE_V2},1) BL2_SOURCES += plat/arm/common/${ARCH}/arm_bl2_mem_params_desc.c\ plat/arm/common/arm_image_load.c \ common/desc_image_load.c endif -BL2U_SOURCES += plat/arm/common/arm_bl2u_setup.c \ - plat/common/aarch64/platform_up_stack.S +BL2U_SOURCES += plat/arm/common/arm_bl2u_setup.c BL31_SOURCES += plat/arm/common/arm_bl31_setup.c \ plat/arm/common/arm_pm.c \ plat/arm/common/arm_topology.c \ - plat/common/aarch64/platform_mp_stack.S \ plat/common/plat_psci_common.c ifeq (${ENABLE_PMF}, 1) diff --git a/plat/common/aarch32/platform_up_stack.S b/plat/common/aarch32/platform_up_stack.S index 8275aec830b0ac6ebb50042e62ce00683a601071..e36d0634df28afbbdc123afb148a291ccf5eaf55 100644 --- a/plat/common/aarch32/platform_up_stack.S +++ b/plat/common/aarch32/platform_up_stack.S @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2016-2017, ARM Limited and Contributors. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -32,8 +32,8 @@ #include #include - .globl plat_get_my_stack - .globl plat_set_my_stack + .weak plat_get_my_stack + .weak plat_set_my_stack /* ----------------------------------------------------- * unsigned long plat_get_my_stack () diff --git a/plat/common/aarch64/platform_up_stack.S b/plat/common/aarch64/platform_up_stack.S index 5b82630ef718d6cbc70b5062276ff05f72a7020f..93489e90d3ee08fe4e34890bb58339293781fab8 100644 --- a/plat/common/aarch64/platform_up_stack.S +++ b/plat/common/aarch64/platform_up_stack.S @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2016, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2014-2017, ARM Limited and Contributors. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -34,10 +34,10 @@ .local platform_normal_stacks - .globl plat_set_my_stack - .globl plat_get_my_stack - .globl platform_set_stack - .globl platform_get_stack + .weak plat_set_my_stack + .weak plat_get_my_stack + .weak platform_set_stack + .weak platform_get_stack /* ----------------------------------------------------- * uintptr_t plat_get_my_stack () diff --git a/plat/mediatek/mt6795/platform.mk b/plat/mediatek/mt6795/platform.mk index e105dfe5f47b450171f69ad0a8aac7fd38037eb0..9851442649ab04327a3408bc257738394f2e71ed 100644 --- a/plat/mediatek/mt6795/platform.mk +++ b/plat/mediatek/mt6795/platform.mk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, ARM Limited and Contributors. All rights reserved. +# Copyright (c) 2016-2017, ARM Limited and Contributors. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: @@ -51,7 +51,6 @@ PLAT_INCLUDES := -I${MTK_PLAT}/common/ \ ${OEMS_INCLUDES} PLAT_BL_COMMON_SOURCES := lib/aarch64/xlat_tables.c \ - plat/common/aarch64/plat_common.c \ plat/common/plat_gic.c BL31_SOURCES += drivers/arm/cci/cci.c \ @@ -63,7 +62,6 @@ BL31_SOURCES += drivers/arm/cci/cci.c \ drivers/console/console.S \ drivers/delay_timer/delay_timer.c \ lib/cpus/aarch64/cortex_a53.S \ - plat/common/aarch64/platform_mp_stack.S \ ${MTK_PLAT_SOC}/bl31_plat_setup.c \ ${MTK_PLAT_SOC}/plat_mt_gic.c \ ${MTK_PLAT}/common/mtk_sip_svc.c \ diff --git a/plat/mediatek/mt8173/platform.mk b/plat/mediatek/mt8173/platform.mk index e59125a53244998230716d379fa9911b4016301d..410276578c126f5ad88b3ca840412b71cccad6f0 100644 --- a/plat/mediatek/mt8173/platform.mk +++ b/plat/mediatek/mt8173/platform.mk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, ARM Limited and Contributors. All rights reserved. +# Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: @@ -45,7 +45,6 @@ PLAT_INCLUDES := -I${MTK_PLAT}/common/ \ PLAT_BL_COMMON_SOURCES := lib/xlat_tables/xlat_tables_common.c \ lib/xlat_tables/aarch64/xlat_tables.c \ - plat/common/aarch64/plat_common.c \ plat/arm/common/arm_gicv2.c \ plat/common/plat_gicv2.c @@ -60,7 +59,6 @@ BL31_SOURCES += drivers/arm/cci/cci.c \ lib/cpus/aarch64/cortex_a53.S \ lib/cpus/aarch64/cortex_a57.S \ lib/cpus/aarch64/cortex_a72.S \ - plat/common/aarch64/platform_mp_stack.S \ ${MTK_PLAT}/common/drivers/uart/8250_console.S \ ${MTK_PLAT}/common/mtk_plat_common.c \ ${MTK_PLAT}/common/mtk_sip_svc.c \ diff --git a/plat/nvidia/tegra/common/tegra_common.mk b/plat/nvidia/tegra/common/tegra_common.mk index 3617396af0214888faf44216b4b17737608aeebe..d6bd2eab27f8d05a2e5aaf4fbc87d87b20d8ee22 100644 --- a/plat/nvidia/tegra/common/tegra_common.mk +++ b/plat/nvidia/tegra/common/tegra_common.mk @@ -43,8 +43,7 @@ PLAT_INCLUDES := -Iplat/nvidia/tegra/include/drivers \ -Iplat/nvidia/tegra/include/${TARGET_SOC} PLAT_BL_COMMON_SOURCES := lib/xlat_tables/xlat_tables_common.c \ - lib/xlat_tables/aarch64/xlat_tables.c \ - plat/common/aarch64/plat_common.c + lib/xlat_tables/aarch64/xlat_tables.c COMMON_DIR := plat/nvidia/tegra/common @@ -52,7 +51,6 @@ BL31_SOURCES += drivers/arm/gic/gic_v2.c \ drivers/console/aarch64/console.S \ drivers/delay_timer/delay_timer.c \ drivers/ti/uart/aarch64/16550_console.S \ - plat/common/aarch64/platform_mp_stack.S \ ${COMMON_DIR}/aarch64/tegra_helpers.S \ ${COMMON_DIR}/drivers/pmc/pmc.c \ ${COMMON_DIR}/tegra_bl31_setup.c \ diff --git a/plat/qemu/platform.mk b/plat/qemu/platform.mk index aa08bd33ef145dc217ea18bb12985a5ad9f6b45c..63720f4fe6c09d65d22ae2c4369123ac6921c0e3 100644 --- a/plat/qemu/platform.mk +++ b/plat/qemu/platform.mk @@ -1,5 +1,5 @@ # -# Copyright (c) 2013-2015, ARM Limited and Contributors. All rights reserved. +# Copyright (c) 2013-2017, ARM Limited and Contributors. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: @@ -51,7 +51,6 @@ BL1_SOURCES += drivers/io/io_semihosting.c \ lib/cpus/aarch64/aem_generic.S \ lib/cpus/aarch64/cortex_a53.S \ lib/cpus/aarch64/cortex_a57.S \ - plat/common/aarch64/platform_mp_stack.S \ plat/qemu/aarch64/plat_helpers.S \ plat/qemu/qemu_bl1_setup.c @@ -59,7 +58,6 @@ BL2_SOURCES += drivers/io/io_semihosting.c \ drivers/io/io_storage.c \ drivers/io/io_fip.c \ drivers/io/io_memmap.c \ - plat/common/aarch64/platform_mp_stack.S \ lib/semihosting/semihosting.c \ lib/semihosting/aarch64/semihosting_call.S\ plat/qemu/qemu_io_storage.c \ @@ -74,9 +72,7 @@ BL31_SOURCES += lib/cpus/aarch64/aem_generic.S \ drivers/arm/gic/v2/gicv2_helpers.c \ drivers/arm/gic/v2/gicv2_main.c \ drivers/arm/gic/common/gic_common.c \ - plat/common/aarch64/platform_mp_stack.S \ plat/common/aarch64/plat_psci_common.c \ - plat/common/aarch64/plat_common.c \ plat/qemu/qemu_pm.c \ plat/qemu/topology.c \ plat/qemu/aarch64/plat_helpers.S \ diff --git a/plat/rockchip/rk3368/platform.mk b/plat/rockchip/rk3368/platform.mk index 73a56e3422ecf0974969235091392c3461ba8b03..43204469608342ebd948e555d8de95973da95fa4 100644 --- a/plat/rockchip/rk3368/platform.mk +++ b/plat/rockchip/rk3368/platform.mk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, ARM Limited and Contributors. All rights reserved. +# Copyright (c) 2016-2017, ARM Limited and Contributors. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: @@ -50,7 +50,6 @@ RK_GIC_SOURCES := drivers/arm/gic/common/gic_common.c \ PLAT_BL_COMMON_SOURCES := lib/xlat_tables/xlat_tables_common.c \ lib/xlat_tables/aarch64/xlat_tables.c \ - plat/common/aarch64/plat_common.c \ plat/common/plat_psci_common.c BL31_SOURCES += ${RK_GIC_SOURCES} \ @@ -60,7 +59,6 @@ BL31_SOURCES += ${RK_GIC_SOURCES} \ drivers/delay_timer/delay_timer.c \ drivers/delay_timer/generic_delay_timer.c \ lib/cpus/aarch64/cortex_a53.S \ - plat/common/aarch64/platform_mp_stack.S \ ${RK_PLAT_COMMON}/aarch64/plat_helpers.S \ ${RK_PLAT_COMMON}/bl31_plat_setup.c \ ${RK_PLAT_COMMON}/params_setup.c \ diff --git a/plat/rockchip/rk3399/platform.mk b/plat/rockchip/rk3399/platform.mk index c72119c4e4dd21d2d8aef878d0dd074c92924608..308a5cb4ee1fdb65487c34b2c300a57a789c97b9 100644 --- a/plat/rockchip/rk3399/platform.mk +++ b/plat/rockchip/rk3399/platform.mk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, ARM Limited and Contributors. All rights reserved. +# Copyright (c) 2016-2017, ARM Limited and Contributors. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: @@ -53,7 +53,6 @@ RK_GIC_SOURCES := drivers/arm/gic/common/gic_common.c \ PLAT_BL_COMMON_SOURCES := lib/xlat_tables/xlat_tables_common.c \ lib/xlat_tables/aarch64/xlat_tables.c \ - plat/common/aarch64/plat_common.c \ plat/common/plat_psci_common.c BL31_SOURCES += ${RK_GIC_SOURCES} \ @@ -65,7 +64,6 @@ BL31_SOURCES += ${RK_GIC_SOURCES} \ drivers/gpio/gpio.c \ lib/cpus/aarch64/cortex_a53.S \ lib/cpus/aarch64/cortex_a72.S \ - plat/common/aarch64/platform_mp_stack.S \ ${RK_PLAT_COMMON}/aarch64/plat_helpers.S \ ${RK_PLAT_COMMON}/bl31_plat_setup.c \ ${RK_PLAT_COMMON}/params_setup.c \ diff --git a/plat/xilinx/zynqmp/platform.mk b/plat/xilinx/zynqmp/platform.mk index d00b694c15e175305b5fd76b93d0d287b4bdb301..9d612dc2a62f5fa8dcb354f4efe863d6747b6c40 100644 --- a/plat/xilinx/zynqmp/platform.mk +++ b/plat/xilinx/zynqmp/platform.mk @@ -1,5 +1,5 @@ # -# Copyright (c) 2013-2016, ARM Limited and Contributors. All rights reserved. +# Copyright (c) 2013-2017, ARM Limited and Contributors. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: @@ -78,7 +78,6 @@ PLAT_BL_COMMON_SOURCES := lib/xlat_tables/xlat_tables_common.c \ plat/arm/common/arm_common.c \ plat/arm/common/arm_gicv2.c \ plat/common/plat_gicv2.c \ - plat/common/aarch64/plat_common.c \ plat/xilinx/zynqmp/aarch64/zynqmp_helpers.S \ plat/xilinx/zynqmp/aarch64/zynqmp_common.c @@ -86,7 +85,6 @@ BL31_SOURCES += drivers/arm/cci/cci.c \ lib/cpus/aarch64/aem_generic.S \ lib/cpus/aarch64/cortex_a53.S \ plat/common/plat_psci_common.c \ - plat/common/aarch64/platform_mp_stack.S \ plat/xilinx/zynqmp/bl31_zynqmp_setup.c \ plat/xilinx/zynqmp/plat_psci.c \ plat/xilinx/zynqmp/plat_zynqmp.c \