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 <apatel@ventanamicro.com>
Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
*/
#include <libfdt.h>
+#include <sbi/riscv_asm.h>
#include <sbi/riscv_io.h>
#include <sbi/sbi_byteorder.h>
#include <sbi/sbi_error.h>
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;