summaryrefslogtreecommitdiff
path: root/lib/utils/irqchip
diff options
context:
space:
mode:
Diffstat (limited to 'lib/utils/irqchip')
-rw-r--r--lib/utils/irqchip/aplic.c5
-rw-r--r--lib/utils/irqchip/imsic.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/utils/irqchip/aplic.c b/lib/utils/irqchip/aplic.c
index 0a8469b..d7fd992 100644
--- a/lib/utils/irqchip/aplic.c
+++ b/lib/utils/irqchip/aplic.c
@@ -269,7 +269,10 @@ int aplic_cold_irqchip_init(struct aplic_data *aplic)
(last_deleg_irq == aplic->num_source) &&
(first_deleg_irq == 1))) {
sbi_domain_memregion_init(aplic->addr, aplic->size,
- SBI_DOMAIN_MEMREGION_MMIO, &reg);
+ (SBI_DOMAIN_MEMREGION_MMIO |
+ SBI_DOMAIN_MEMREGION_M_READABLE |
+ SBI_DOMAIN_MEMREGION_M_WRITABLE),
+ &reg);
rc = sbi_domain_root_add_memregion(&reg);
if (rc)
return rc;
diff --git a/lib/utils/irqchip/imsic.c b/lib/utils/irqchip/imsic.c
index 98f2cb6..11667cd 100644
--- a/lib/utils/irqchip/imsic.c
+++ b/lib/utils/irqchip/imsic.c
@@ -313,7 +313,10 @@ int imsic_cold_irqchip_init(struct imsic_data *imsic)
for (i = 0; i < IMSIC_MAX_REGS && imsic->regs[i].size; i++) {
sbi_domain_memregion_init(imsic->regs[i].addr,
imsic->regs[i].size,
- SBI_DOMAIN_MEMREGION_MMIO, &reg);
+ (SBI_DOMAIN_MEMREGION_MMIO |
+ SBI_DOMAIN_MEMREGION_M_READABLE |
+ SBI_DOMAIN_MEMREGION_M_WRITABLE),
+ &reg);
rc = sbi_domain_root_add_memregion(&reg);
if (rc)
return rc;