summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimanshu Chauhan <hchauhan@ventanamicro.com>2023-01-09 08:20:39 +0300
committerAnup Patel <anup@brainfault.org>2023-01-09 15:34:19 +0300
commit44f736c96ed997df6e40d90acdd1cdd3342a8ff4 (patch)
tree47806b4daa03f6d15cbd472ac518bebcd1002706
parent1ac14f10f6f27f1078d684b7931718db0e6822c4 (diff)
downloadopensbi-44f736c96ed997df6e40d90acdd1cdd3342a8ff4.tar.xz
lib: sbi: Modify the boot time region flag prints
With the finer permission semantics, the region access permissions must be displayed separately for M and SU mode. Signed-off-by: Himanshu Chauhan <hchauhan@ventanamicro.com> Reviewed-by: Anup Patel <anup@brainfault.org> Tested-by: Anup Patel <anup@brainfault.org>
-rw-r--r--lib/sbi/sbi_domain.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/lib/sbi/sbi_domain.c b/lib/sbi/sbi_domain.c
index b08d6e3..60fda01 100644
--- a/lib/sbi/sbi_domain.c
+++ b/lib/sbi/sbi_domain.c
@@ -345,15 +345,25 @@ void sbi_domain_dump(const struct sbi_domain *dom, const char *suffix)
dom->index, i, suffix, rstart, rend);
k = 0;
- if (reg->flags & SBI_DOMAIN_MEMREGION_MMODE)
- sbi_printf("%cM", (k++) ? ',' : '(');
+
+ sbi_printf("M: ");
if (reg->flags & SBI_DOMAIN_MEMREGION_MMIO)
sbi_printf("%cI", (k++) ? ',' : '(');
- if (reg->flags & SBI_DOMAIN_MEMREGION_READABLE)
+ if (reg->flags & SBI_DOMAIN_MEMREGION_M_READABLE)
+ sbi_printf("%cR", (k++) ? ',' : '(');
+ if (reg->flags & SBI_DOMAIN_MEMREGION_M_WRITABLE)
+ sbi_printf("%cW", (k++) ? ',' : '(');
+ if (reg->flags & SBI_DOMAIN_MEMREGION_M_EXECUTABLE)
+ sbi_printf("%cX", (k++) ? ',' : '(');
+ sbi_printf("%s ", (k++) ? ")" : "()");
+
+ k = 0;
+ sbi_printf("S/U: ");
+ if (reg->flags & SBI_DOMAIN_MEMREGION_SU_READABLE)
sbi_printf("%cR", (k++) ? ',' : '(');
- if (reg->flags & SBI_DOMAIN_MEMREGION_WRITEABLE)
+ if (reg->flags & SBI_DOMAIN_MEMREGION_SU_WRITABLE)
sbi_printf("%cW", (k++) ? ',' : '(');
- if (reg->flags & SBI_DOMAIN_MEMREGION_EXECUTABLE)
+ if (reg->flags & SBI_DOMAIN_MEMREGION_SU_EXECUTABLE)
sbi_printf("%cX", (k++) ? ',' : '(');
sbi_printf("%s\n", (k++) ? ")" : "()");