diff options
| author | Anup Patel <[email protected]> | 2023-09-07 17:19:47 +0530 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2023-09-24 17:14:26 +0530 |
| commit | b7e9d34edf4f728bb02d11f73a2f9f79ad4acce4 (patch) | |
| tree | 74b849a8e857e4ad972928116f90067a94e56bf2 /lib/utils | |
| parent | e8bc1621c6882766815d2a46f5c2ae88c977bfa4 (diff) | |
lib: utils/regmap: Mark syscon region as shared read-write
The syscon region used by OpenSBI should be marked as a shared
read-write region between M-mode and SU-mode.
Signed-off-by: Anup Patel <[email protected]>
Signed-off-by: Mayuresh Chitale <[email protected]>
Diffstat (limited to 'lib/utils')
| -rw-r--r-- | lib/utils/regmap/fdt_regmap_syscon.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/utils/regmap/fdt_regmap_syscon.c b/lib/utils/regmap/fdt_regmap_syscon.c index 29263ddd..d87b6e09 100644 --- a/lib/utils/regmap/fdt_regmap_syscon.c +++ b/lib/utils/regmap/fdt_regmap_syscon.c @@ -8,6 +8,7 @@ */ #include <libfdt.h> +#include <sbi/riscv_asm.h> #include <sbi/riscv_io.h> #include <sbi/sbi_byteorder.h> #include <sbi/sbi_error.h> @@ -240,6 +241,12 @@ static int regmap_syscon_init(void *fdt, int nodeoff, u32 phandle, goto fail_free_syscon; } + rc = sbi_domain_root_add_memrange(addr, size, PAGE_SIZE, + (SBI_DOMAIN_MEMREGION_MMIO | + SBI_DOMAIN_MEMREGION_SHARED_SURW_MRW)); + if (rc) + goto fail_free_syscon; + rc = regmap_add(&srm->rmap); if (rc) goto fail_free_syscon; |
