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 <antonio.ninodiaz@arm.com>
Acked-by: Sumit Garg <sumit.garg@linaro.org>
This commit is contained in:
Antonio Nino Diaz 2019-01-21 11:53:29 +00:00
parent 99d5575a7f
commit 8855e52ec5
13 changed files with 41 additions and 41 deletions

View File

@ -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))

View File

@ -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

View File

@ -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)

View File

@ -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}, \

View File

@ -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 <lib/utils_def.h>
@ -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 */

View File

@ -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 <stdint.h>
@ -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 */

View File

@ -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 <lib/utils_def.h>
@ -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__ */

View File

@ -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.

View File

@ -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.

View File

@ -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)

View File

@ -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 \

View File

@ -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 -

View File

@ -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