mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 23:41:23 +01:00
lib: utils: Use SU-{R/W/X} flags for region permissions during parsing
Use the newer SU-{R/W/X} flags for checking and assigning region permissions. Signed-off-by: Himanshu Chauhan <hchauhan@ventanamicro.com> Reviewed-by: Anup Patel <anup@brainfault.org> Tested-by: Anup Patel <anup@brainfault.org>
This commit is contained in:

committed by
Anup Patel

parent
44f736c96e
commit
20646e0184
@@ -338,9 +338,9 @@ static int __fdt_parse_domain(void *fdt, int domain_offset, void *opaque)
|
|||||||
* 2) mmio regions protecting M-mode only mmio devices
|
* 2) mmio regions protecting M-mode only mmio devices
|
||||||
*/
|
*/
|
||||||
sbi_domain_for_each_memregion(&root, reg) {
|
sbi_domain_for_each_memregion(&root, reg) {
|
||||||
if ((reg->flags & SBI_DOMAIN_MEMREGION_READABLE) ||
|
if ((reg->flags & SBI_DOMAIN_MEMREGION_SU_READABLE) ||
|
||||||
(reg->flags & SBI_DOMAIN_MEMREGION_WRITEABLE) ||
|
(reg->flags & SBI_DOMAIN_MEMREGION_SU_WRITABLE) ||
|
||||||
(reg->flags & SBI_DOMAIN_MEMREGION_EXECUTABLE))
|
(reg->flags & SBI_DOMAIN_MEMREGION_SU_EXECUTABLE))
|
||||||
continue;
|
continue;
|
||||||
if (FDT_DOMAIN_REGION_MAX_COUNT <= val32)
|
if (FDT_DOMAIN_REGION_MAX_COUNT <= val32)
|
||||||
return SBI_EINVAL;
|
return SBI_EINVAL;
|
||||||
|
Reference in New Issue
Block a user