forked from Mirrors/opensbi
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 <duchao@eswincomputing.com> Reviewed-by: Xiang W <wxjstz@126.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
@@ -289,8 +289,10 @@ static int __fdt_parse_region(const void *fdt, int domain_offset,
|
|||||||
return SBI_EINVAL;
|
return SBI_EINVAL;
|
||||||
order = val32;
|
order = val32;
|
||||||
|
|
||||||
|
flags = region_access & (SBI_DOMAIN_MEMREGION_ACCESS_MASK
|
||||||
|
| SBI_DOMAIN_MEMREGION_ENF_PERMISSIONS);
|
||||||
|
|
||||||
/* Read "mmio" DT property */
|
/* Read "mmio" DT property */
|
||||||
flags = region_access & SBI_DOMAIN_MEMREGION_ACCESS_MASK;
|
|
||||||
if (fdt_get_property(fdt, region_offset, "mmio", NULL))
|
if (fdt_get_property(fdt, region_offset, "mmio", NULL))
|
||||||
flags |= SBI_DOMAIN_MEMREGION_MMIO;
|
flags |= SBI_DOMAIN_MEMREGION_MMIO;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user