diff options
| author | Samuel Holland <samuel.holland@sifive.com> | 2025-11-21 11:37:52 -0800 |
|---|---|---|
| committer | Anup Patel <anup@brainfault.org> | 2025-12-08 16:47:55 +0530 |
| commit | 51fe6a8bc958166ff79805cf69bafe5e297776f4 (patch) | |
| tree | c1b36f55193e2b8f2642484104fd1a32220659b0 /lib/utils/fdt | |
| parent | 1f9677582af552bfaaf87579bb28b864d4b4130f (diff) | |
| download | opensbi-master.zip opensbi-master.tar.gz opensbi-master.tar.bz2 | |
Drivers or platforms may create memory regions with the MMIO flag set
that contain S-mode-accessible MMIO devices. This is strictly correct
and should be allowed, along with the existing default case of
S-mode-accessible MMIO devices appearing in non-MMIO memory regions.
When passed SBI_DOMAIN_MMIO, sbi_domain_check_addr() will perform the
correct set of permission checks.
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Yu-Chien Peter Lin <peter.lin@sifive.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20251121193808.1528050-3-samuel.holland@sifive.com
Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'lib/utils/fdt')
| -rw-r--r-- | lib/utils/fdt/fdt_fixup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/utils/fdt/fdt_fixup.c b/lib/utils/fdt/fdt_fixup.c index f3fe8af..b0ed20c 100644 --- a/lib/utils/fdt/fdt_fixup.c +++ b/lib/utils/fdt/fdt_fixup.c @@ -185,7 +185,7 @@ static void fdt_domain_based_fixup_one(void *fdt, int nodeoff) return; if (!sbi_domain_check_addr(dom, reg_addr, dom->next_mode, - SBI_DOMAIN_READ | SBI_DOMAIN_WRITE)) { + SBI_DOMAIN_READ | SBI_DOMAIN_WRITE | SBI_DOMAIN_MMIO)) { rc = fdt_open_into(fdt, fdt, fdt_totalsize(fdt) + 32); if (rc < 0) return; |
