From 8855e52ec5ba8764280ad6d9a2681f5df2930d23 Mon Sep 17 00:00:00 2001 From: Antonio Nino Diaz Date: Mon, 21 Jan 2019 11:53:29 +0000 Subject: [PATCH] SPM: Rename SPM_DEPRECATED flag to SPM_MM The SPM implementation based on MM is going to be kept for the foreseeable future. Change-Id: I11e96778a4f52a1aa803e7e048d9a7cb24a53954 Signed-off-by: Antonio Nino Diaz Acked-by: Sumit Garg --- Makefile | 6 +++--- bl31/bl31.mk | 4 ++-- include/plat/arm/common/arm_spm_def.h | 6 +++--- include/plat/arm/common/plat_arm.h | 4 ++-- include/services/mm_svc.h | 6 +++--- include/services/secure_partition.h | 6 +++--- include/services/spm_svc.h | 10 +++++----- make_helpers/defaults.mk | 6 +++--- plat/arm/board/fvp/fvp_common.c | 14 +++++++------- plat/arm/board/fvp/include/platform_def.h | 6 +++--- plat/arm/common/arm_common.mk | 4 ++-- plat/socionext/synquacer/sq_bl31_setup.c | 6 +++--- services/std_svc/std_svc_setup.c | 4 ++-- 13 files changed, 41 insertions(+), 41 deletions(-) diff --git a/Makefile b/Makefile index 02ff6d36..ad1ba152 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved. +# Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # @@ -612,7 +612,7 @@ $(eval $(call assert_boolean,RESET_TO_BL31)) $(eval $(call assert_boolean,SAVE_KEYS)) $(eval $(call assert_boolean,SEPARATE_CODE_AND_RODATA)) $(eval $(call assert_boolean,SPIN_ON_BL1_EXIT)) -$(eval $(call assert_boolean,SPM_DEPRECATED)) +$(eval $(call assert_boolean,SPM_MM)) $(eval $(call assert_boolean,TRUSTED_BOARD_BOOT)) $(eval $(call assert_boolean,USE_COHERENT_MEM)) $(eval $(call assert_boolean,USE_ROMLIB)) @@ -666,7 +666,7 @@ $(eval $(call add_define,RECLAIM_INIT_CODE)) $(eval $(call add_define,SMCCC_MAJOR_VERSION)) $(eval $(call add_define,SPD_${SPD})) $(eval $(call add_define,SPIN_ON_BL1_EXIT)) -$(eval $(call add_define,SPM_DEPRECATED)) +$(eval $(call add_define,SPM_MM)) $(eval $(call add_define,TRUSTED_BOARD_BOOT)) $(eval $(call add_define,USE_COHERENT_MEM)) $(eval $(call add_define,USE_ROMLIB)) diff --git a/bl31/bl31.mk b/bl31/bl31.mk index eddd164f..e6a7d188 100644 --- a/bl31/bl31.mk +++ b/bl31/bl31.mk @@ -1,5 +1,5 @@ # -# Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved. +# Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # @@ -8,7 +8,7 @@ # Include SPM Makefile ################################################################################ ifeq (${ENABLE_SPM},1) - ifeq (${SPM_DEPRECATED},1) + ifeq (${SPM_MM},1) ifeq (${EL3_EXCEPTION_HANDLING},0) $(error EL3_EXCEPTION_HANDLING must be 1 for SPM support) endif diff --git a/include/plat/arm/common/arm_spm_def.h b/include/plat/arm/common/arm_spm_def.h index 997e156e..16c806ba 100644 --- a/include/plat/arm/common/arm_spm_def.h +++ b/include/plat/arm/common/arm_spm_def.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -32,7 +32,7 @@ #define PLAT_SPM_HEAP_BASE (PLAT_SP_PACKAGE_BASE + PLAT_SP_PACKAGE_SIZE) #define PLAT_SPM_HEAP_SIZE (BL32_LIMIT - BL32_BASE - PLAT_SP_PACKAGE_SIZE) -#if SPM_DEPRECATED +#if SPM_MM /* * If BL31 is placed in DRAM, place the Secure Partition in DRAM right after the @@ -121,7 +121,7 @@ /* Total number of memory regions with distinct properties */ #define ARM_SP_IMAGE_NUM_MEM_REGIONS 6 -#endif /* SPM_DEPRECATED */ +#endif /* SPM_MM */ /* Cookies passed to the Secure Partition at boot. Not used by ARM platforms. */ #define PLAT_SPM_COOKIE_0 ULL(0) diff --git a/include/plat/arm/common/plat_arm.h b/include/plat/arm/common/plat_arm.h index d1c03be6..b5edc74b 100644 --- a/include/plat/arm/common/plat_arm.h +++ b/include/plat/arm/common/plat_arm.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -38,7 +38,7 @@ typedef struct arm_tzc_regions_info { * - Region 1 with secure access only; * - the remaining DRAM regions access from the given Non-Secure masters. ******************************************************************************/ -#if ENABLE_SPM && SPM_DEPRECATED +#if ENABLE_SPM && SPM_MM #define ARM_TZC_REGIONS_DEF \ {ARM_AP_TZC_DRAM1_BASE, ARM_EL3_TZC_DRAM1_END, \ TZC_REGION_S_RDWR, 0}, \ diff --git a/include/services/mm_svc.h b/include/services/mm_svc.h index c81e9048..c1113269 100644 --- a/include/services/mm_svc.h +++ b/include/services/mm_svc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -7,7 +7,7 @@ #ifndef MM_SVC_H #define MM_SVC_H -#if SPM_DEPRECATED +#if SPM_MM #include @@ -30,6 +30,6 @@ #define MM_COMMUNICATE_AARCH64 U(0xC4000041) #define MM_COMMUNICATE_AARCH32 U(0x84000041) -#endif /* SPM_DEPRECATED */ +#endif /* SPM_MM */ #endif /* MM_SVC_H */ diff --git a/include/services/secure_partition.h b/include/services/secure_partition.h index 47f63684..0510f80e 100644 --- a/include/services/secure_partition.h +++ b/include/services/secure_partition.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -7,7 +7,7 @@ #ifndef SECURE_PARTITION_H #define SECURE_PARTITION_H -#if SPM_DEPRECATED +#if SPM_MM #include @@ -49,6 +49,6 @@ typedef struct secure_partition_boot_info { secure_partition_mp_info_t *mp_info; } secure_partition_boot_info_t; -#endif /* SPM_DEPRECATED */ +#endif /* SPM_MM */ #endif /* SECURE_PARTITION_H */ diff --git a/include/services/spm_svc.h b/include/services/spm_svc.h index fcb409b2..57912e88 100644 --- a/include/services/spm_svc.h +++ b/include/services/spm_svc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -7,7 +7,7 @@ #ifndef SPM_SVC_H #define SPM_SVC_H -#if SPM_DEPRECATED +#if SPM_MM #include @@ -61,7 +61,7 @@ #define SPM_DENIED -3 #define SPM_NO_MEMORY -5 -#endif /* SPM_DEPRECATED */ +#endif /* SPM_MM */ #ifndef __ASSEMBLY__ @@ -69,7 +69,7 @@ int32_t spm_setup(void); -#if SPM_DEPRECATED +#if SPM_MM uint64_t spm_smc_handler(uint32_t smc_fid, uint64_t x1, @@ -83,7 +83,7 @@ uint64_t spm_smc_handler(uint32_t smc_fid, /* Helper to enter a Secure Partition */ uint64_t spm_sp_call(uint32_t smc_fid, uint64_t x1, uint64_t x2, uint64_t x3); -#endif /* SPM_DEPRECATED */ +#endif /* SPM_MM */ #endif /* __ASSEMBLY__ */ diff --git a/make_helpers/defaults.mk b/make_helpers/defaults.mk index a55e729b..8ef1bb9f 100644 --- a/make_helpers/defaults.mk +++ b/make_helpers/defaults.mk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved. +# Copyright (c) 2016-2019, ARM Limited and Contributors. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # @@ -162,8 +162,8 @@ SPD := none # For including the Secure Partition Manager ENABLE_SPM := 0 -# Use the deprecated SPM based on MM -SPM_DEPRECATED := 1 +# Use the SPM based on MM +SPM_MM := 1 # Flag to introduce an infinite loop in BL1 just before it exits into the next # image. This is meant to help debugging the post-BL2 phase. diff --git a/plat/arm/board/fvp/fvp_common.c b/plat/arm/board/fvp/fvp_common.c index 4da807a4..fdf82f49 100644 --- a/plat/arm/board/fvp/fvp_common.c +++ b/plat/arm/board/fvp/fvp_common.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -95,10 +95,10 @@ const mmap_region_t plat_arm_mmap[] = { ARM_MAP_BL1_RW, #endif #endif /* TRUSTED_BOARD_BOOT */ -#if ENABLE_SPM && SPM_DEPRECATED +#if ENABLE_SPM && SPM_MM ARM_SP_IMAGE_MMAP, #endif -#if ENABLE_SPM && !SPM_DEPRECATED +#if ENABLE_SPM && !SPM_MM PLAT_MAP_SP_PACKAGE_MEM_RW, #endif #if ARM_BL31_IN_DRAM @@ -126,16 +126,16 @@ const mmap_region_t plat_arm_mmap[] = { MAP_DEVICE0, MAP_DEVICE1, ARM_V2M_MAP_MEM_PROTECT, -#if ENABLE_SPM && SPM_DEPRECATED +#if ENABLE_SPM && SPM_MM ARM_SPM_BUF_EL3_MMAP, #endif -#if ENABLE_SPM && !SPM_DEPRECATED +#if ENABLE_SPM && !SPM_MM PLAT_MAP_SP_PACKAGE_MEM_RO, #endif {0} }; -#if ENABLE_SPM && defined(IMAGE_BL31) && SPM_DEPRECATED +#if ENABLE_SPM && defined(IMAGE_BL31) && SPM_MM const mmap_region_t plat_arm_secure_partition_mmap[] = { V2M_MAP_IOFPGA_EL0, /* for the UART */ MAP_REGION_FLAT(DEVICE0_BASE, \ @@ -189,7 +189,7 @@ static unsigned int get_interconnect_master(void) } #endif -#if ENABLE_SPM && defined(IMAGE_BL31) && SPM_DEPRECATED +#if ENABLE_SPM && defined(IMAGE_BL31) && SPM_MM /* * Boot information passed to a secure partition during initialisation. Linear * indices in MP information will be filled at runtime. diff --git a/plat/arm/board/fvp/include/platform_def.h b/plat/arm/board/fvp/include/platform_def.h index 31f06a98..8c0daf13 100644 --- a/plat/arm/board/fvp/include/platform_def.h +++ b/plat/arm/board/fvp/include/platform_def.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2018, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2014-2019, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -13,7 +13,7 @@ # define PLAT_XLAT_TABLES_DYNAMIC 1 # endif #else -# if defined(IMAGE_BL31) && (RESET_TO_BL31 || (ENABLE_SPM && !SPM_DEPRECATED)) +# if defined(IMAGE_BL31) && (RESET_TO_BL31 || (ENABLE_SPM && !SPM_MM)) # define PLAT_XLAT_TABLES_DYNAMIC 1 # endif #endif /* AARCH32 */ @@ -125,7 +125,7 @@ * calculated using the current BL31 PROGBITS debug size plus the sizes of * BL2 and BL1-RW */ -#if ENABLE_SPM && !SPM_DEPRECATED +#if ENABLE_SPM && !SPM_MM #define PLAT_ARM_MAX_BL31_SIZE UL(0x60000) #else #define PLAT_ARM_MAX_BL31_SIZE UL(0x3B000) diff --git a/plat/arm/common/arm_common.mk b/plat/arm/common/arm_common.mk index a8ac286f..9ad7bd72 100644 --- a/plat/arm/common/arm_common.mk +++ b/plat/arm/common/arm_common.mk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. +# Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # @@ -240,7 +240,7 @@ BL31_SOURCES += lib/extensions/ras/std_err_record.c \ endif # SPM uses libfdt in Arm platforms -ifeq (${SPM_DEPRECATED},0) +ifeq (${SPM_MM},0) ifeq (${ENABLE_SPM},1) BL31_SOURCES += common/fdt_wrappers.c \ plat/common/plat_spm_rd.c \ diff --git a/plat/socionext/synquacer/sq_bl31_setup.c b/plat/socionext/synquacer/sq_bl31_setup.c index 2fac80ff..fef84efd 100644 --- a/plat/socionext/synquacer/sq_bl31_setup.c +++ b/plat/socionext/synquacer/sq_bl31_setup.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -160,7 +160,7 @@ void bl31_plat_runtime_setup(void) void bl31_plat_arch_setup(void) { static const mmap_region_t secure_partition_mmap[] = { -#if ENABLE_SPM && SPM_DEPRECATED +#if ENABLE_SPM && SPM_MM MAP_REGION_FLAT(PLAT_SPM_BUF_BASE, PLAT_SPM_BUF_SIZE, MT_RW_DATA | MT_SECURE), @@ -174,7 +174,7 @@ void bl31_plat_arch_setup(void) sq_mmap_setup(BL31_BASE, BL31_SIZE, secure_partition_mmap); enable_mmu_el3(XLAT_TABLE_NC); -#if ENABLE_SPM && SPM_DEPRECATED +#if ENABLE_SPM && SPM_MM memcpy((void *)SPM_SHIM_EXCEPTIONS_START, (void *)SPM_SHIM_EXCEPTIONS_LMA, (uintptr_t)SPM_SHIM_EXCEPTIONS_END - diff --git a/services/std_svc/std_svc_setup.c b/services/std_svc/std_svc_setup.c index 7a34655f..1d80fa34 100644 --- a/services/std_svc/std_svc_setup.c +++ b/services/std_svc/std_svc_setup.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2018, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2014-2019, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -103,7 +103,7 @@ static uintptr_t std_svc_smc_handler(uint32_t smc_fid, SMC_RET1(handle, ret); } -#if ENABLE_SPM && SPM_DEPRECATED +#if ENABLE_SPM && SPM_MM /* * Dispatch SPM calls to SPM SMC handler and return its return * value -- 2.30.2