aboutsummaryrefslogtreecommitdiff
path: root/lib/utils
diff options
context:
space:
mode:
authorMayuresh Chitale <mchitale@ventanamicro.com>2023-01-21 12:15:59 +0530
committerAnup Patel <anup@brainfault.org>2023-01-22 17:49:10 +0530
commita990309fa362aa050caf7fb175f35c7bfa486ccc (patch)
tree99b5c545e5509e99eac473f08a3402bc1a9918af /lib/utils
parent7aaeeab9e794e5a15a0253ef3c3453496f74117a (diff)
downloadopensbi-a990309fa362aa050caf7fb175f35c7bfa486ccc.zip
opensbi-a990309fa362aa050caf7fb175f35c7bfa486ccc.tar.gz
opensbi-a990309fa362aa050caf7fb175f35c7bfa486ccc.tar.bz2
lib: utils: Fix reserved memory node for firmware memory
The commit 9e0ba090 introduced more fine grained permissions for memory regions and did not update the fdt_reserved_memory_fixup() function. As a result, the fdt_reserved_memory_fixup continued to use the older coarse permissions which causes the reserved memory node to be not inserted into the DT. To fix the above issue, we correct the flags used for memory region permission checks in the fdt_reserved_memory_fixup() function. Fixes: 9e0ba090 ("include: sbi: Fine grain the permissions for M and SU modes") Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com> Reviewed-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'lib/utils')
-rw-r--r--lib/utils/fdt/fdt_fixup.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/utils/fdt/fdt_fixup.c b/lib/utils/fdt/fdt_fixup.c
index 41f6cbb..42692cc 100644
--- a/lib/utils/fdt/fdt_fixup.c
+++ b/lib/utils/fdt/fdt_fixup.c
@@ -259,11 +259,11 @@ int fdt_reserved_memory_fixup(void *fdt)
/* Ignore MMIO or READABLE or WRITABLE or EXECUTABLE regions */
if (reg->flags & SBI_DOMAIN_MEMREGION_MMIO)
continue;
- if (reg->flags & SBI_DOMAIN_MEMREGION_READABLE)
+ if (reg->flags & SBI_DOMAIN_MEMREGION_SU_READABLE)
continue;
- if (reg->flags & SBI_DOMAIN_MEMREGION_WRITEABLE)
+ if (reg->flags & SBI_DOMAIN_MEMREGION_SU_WRITABLE)
continue;
- if (reg->flags & SBI_DOMAIN_MEMREGION_EXECUTABLE)
+ if (reg->flags & SBI_DOMAIN_MEMREGION_SU_EXECUTABLE)
continue;
addr = reg->base;