diff options
author | Himanshu Chauhan <hchauhan@ventanamicro.com> | 2023-01-09 08:20:41 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2023-01-09 15:34:25 +0300 |
commit | 3e2f573e707e78c7e00a977b28ce917ff051e69d (patch) | |
tree | a96863b9fa7772be4a33c11ea37fba58336cf04e /include | |
parent | 20646e0184e23cacfeb951060d33881453d14772 (diff) | |
download | opensbi-3e2f573e707e78c7e00a977b28ce917ff051e69d.tar.xz |
lib: utils: Disallow non-root domains from adding M-mode regions
The M-mode regions can only be added to the root domain. The non-root
domains shouldn't be able to add them from FDT.
Signed-off-by: Himanshu Chauhan <hchauhan@ventanamicro.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Tested-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/sbi/sbi_domain.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/sbi/sbi_domain.h b/include/sbi/sbi_domain.h index a42c20d..bbb3eff 100644 --- a/include/sbi/sbi_domain.h +++ b/include/sbi/sbi_domain.h @@ -51,6 +51,11 @@ struct sbi_domain_memregion { SBI_DOMAIN_MEMREGION_M_WRITABLE | \ SBI_DOMAIN_MEMREGION_M_EXECUTABLE) +#define SBI_DOMAIN_MEMREGION_SU_RWX \ + (SBI_DOMAIN_MEMREGION_SU_READABLE | \ + SBI_DOMAIN_MEMREGION_SU_WRITABLE | \ + SBI_DOMAIN_MEMREGION_SU_EXECUTABLE) + /* Unrestricted M-mode accesses but enfoced on SU-mode */ #define SBI_DOMAIN_MEMREGION_READABLE \ (SBI_DOMAIN_MEMREGION_SU_READABLE | \ |