summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChao Du <[email protected]>2025-01-07 02:43:14 +0000
committerAnup Patel <[email protected]>2025-02-11 17:56:48 +0530
commit3f25380d85df0c8b8f188d23d0f80a560b416fb3 (patch)
treebd5eddcda7c2c46e4911d0f50322c13f4a7b70ad
parenta76aca030d1b2026d9b1b8867d59bb57bd47241a (diff)
lib: utils: Make the enforce permission bit configurable from DT
The domain_support.md documentation states that the enforce permission bit (BIT[6]) could be set in the "regions" property of a domain instance DT node. However, this bit is masked in the current implementation. This patch unmasks the bit to make it configurable from DT. Signed-off-by: Chao Du <[email protected]> Reviewed-by: Xiang W <[email protected]> Reviewed-by: Anup Patel <[email protected]>
-rw-r--r--lib/utils/fdt/fdt_domain.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/utils/fdt/fdt_domain.c b/lib/utils/fdt/fdt_domain.c
index 4bc7ed86..d7efc56b 100644
--- a/lib/utils/fdt/fdt_domain.c
+++ b/lib/utils/fdt/fdt_domain.c
@@ -289,8 +289,10 @@ static int __fdt_parse_region(const void *fdt, int domain_offset,
return SBI_EINVAL;
order = val32;
+ flags = region_access & (SBI_DOMAIN_MEMREGION_ACCESS_MASK
+ | SBI_DOMAIN_MEMREGION_ENF_PERMISSIONS);
+
/* Read "mmio" DT property */
- flags = region_access & SBI_DOMAIN_MEMREGION_ACCESS_MASK;
if (fdt_get_property(fdt, region_offset, "mmio", NULL))
flags |= SBI_DOMAIN_MEMREGION_MMIO;