SPM: Register Secure Partition priority level with ehf module
authorSughosh Ganu <sughosh.ganu@arm.com>
Wed, 14 Nov 2018 05:12:46 +0000 (10:42 +0530)
committerSughosh Ganu <sughosh.ganu@arm.com>
Wed, 14 Nov 2018 05:48:22 +0000 (11:18 +0530)
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 <sughosh.ganu@arm.com>
plat/arm/board/fvp/include/platform_def.h
plat/arm/common/aarch64/arm_ehf.c
plat/arm/css/sgi/include/sgi_base_platform_def.h

index 4fd4aef85b68b7697161b7115ad98cd3d2fc8750..58b68abf91cbdb58fde2914b2b1b8de0edccabc8 100644 (file)
 #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 */
index 665871b4add1146850614b8f3beb99e99411c18b..f313851852013b6949eb4859e4921135f266dea1 100644 (file)
@@ -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. */
index 90eb3360b7b73616792d1e291962a335ff182ebd..1395373ceb83ef17e9891368b5ccb93a6a459afb 100644 (file)
                                        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)