From 062b6c6bf23f9656332b0aa3fed59c15f34f9361 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Tue, 14 Mar 2023 20:48:43 +0000 Subject: feat(pie/por): support permission indirection and overlay Arm v8.9 introduces a series of features providing a new way to set memory permissions. Instead of directly encoding the permissions in the page tables the PTEs contain indexes into an array of permissions stored in system registers, allowing greater flexibility and density of encoding. Enable access to these features for EL2 and below, context switching the newly added EL2 registers as appropriate. Since all of FEAT_S[12]P[IO]E are separately discoverable we have separate build time options for enabling them, but note that there is overlap in the registers that they implement and the enable bit required for lower EL access. Change the FVP platform to default to handling them as dynamic options so the right decision can be made by the code at runtime. Signed-off-by: Mark Brown Change-Id: Icf89e444e39e1af768739668b505661df18fb234 --- common/feat_detect.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'common') diff --git a/common/feat_detect.c b/common/feat_detect.c index 9394304bf..1582b9dcb 100644 --- a/common/feat_detect.c +++ b/common/feat_detect.c @@ -210,6 +210,14 @@ void detect_arch_features(void) /* v8.9 features */ check_feature(ENABLE_FEAT_TCR2, read_feat_tcrx_id_field(), "TCR2", 1, 1); + check_feature(ENABLE_FEAT_S2PIE, read_feat_s2pie_id_field(), + "S2PIE", 1, 1); + check_feature(ENABLE_FEAT_S1PIE, read_feat_s1pie_id_field(), + "S1PIE", 1, 1); + check_feature(ENABLE_FEAT_S2POE, read_feat_s2poe_id_field(), + "S2POE", 1, 1); + check_feature(ENABLE_FEAT_S1POE, read_feat_s1poe_id_field(), + "S1POE", 1, 1); /* v9.0 features */ check_feature(ENABLE_BRBE_FOR_NS, read_feat_brbe_id_field(), -- cgit v1.2.1