From 5681b292c01ba8612256e4dfefb43e736de2a1c3 Mon Sep 17 00:00:00 2001 From: Sughosh Ganu Date: Wed, 14 Nov 2018 10:42:46 +0530 Subject: [PATCH] SPM: Register Secure Partition priority level with ehf module Register a priority level, PLAT_SP_PRI, for secure partition with EL3 exception handling framework(ehf) module. The secure partition manager(SPM) would raise the core's priority to PLAT_SP_PRI before entering the secure partition, to protect the core from getting interrupted while in secure partition. Change-Id: I686897f052a4371e0efa9b929c07d3ad77249e95 Signed-off-by: Sughosh Ganu --- plat/arm/board/fvp/include/platform_def.h | 2 ++ plat/arm/common/aarch64/arm_ehf.c | 3 +++ plat/arm/css/sgi/include/sgi_base_platform_def.h | 2 ++ 3 files changed, 7 insertions(+) diff --git a/plat/arm/board/fvp/include/platform_def.h b/plat/arm/board/fvp/include/platform_def.h index 4fd4aef8..58b68abf 100644 --- a/plat/arm/board/fvp/include/platform_def.h +++ b/plat/arm/board/fvp/include/platform_def.h @@ -268,4 +268,6 @@ #define PLAT_ARM_SP_IMAGE_STACK_BASE (ARM_SP_IMAGE_NS_BUF_BASE + \ ARM_SP_IMAGE_NS_BUF_SIZE) +#define PLAT_SP_PRI PLAT_RAS_PRI + #endif /* PLATFORM_DEF_H */ diff --git a/plat/arm/common/aarch64/arm_ehf.c b/plat/arm/common/aarch64/arm_ehf.c index 665871b4..f3138518 100644 --- a/plat/arm/common/aarch64/arm_ehf.c +++ b/plat/arm/common/aarch64/arm_ehf.c @@ -23,6 +23,9 @@ ehf_pri_desc_t arm_exceptions[] = { /* Normal priority SDEI */ EHF_PRI_DESC(ARM_PRI_BITS, PLAT_SDEI_NORMAL_PRI), #endif +#if ENABLE_SPM + EHF_PRI_DESC(ARM_PRI_BITS, PLAT_SP_PRI), +#endif }; /* Plug in ARM exceptions to Exception Handling Framework. */ diff --git a/plat/arm/css/sgi/include/sgi_base_platform_def.h b/plat/arm/css/sgi/include/sgi_base_platform_def.h index 90eb3360..1395373c 100644 --- a/plat/arm/css/sgi/include/sgi_base_platform_def.h +++ b/plat/arm/css/sgi/include/sgi_base_platform_def.h @@ -142,6 +142,8 @@ SOC_CSS_DEVICE_SIZE, \ MT_DEVICE | MT_RW | MT_SECURE | MT_USER) +#define PLAT_SP_PRI PLAT_RAS_PRI + #if RAS_EXTENSION /* Allocate 128KB for CPER buffers */ #define PLAT_SP_BUF_BASE ULL(0x20000) -- 2.30.2