OpenSBI Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Himanshu Chauhan <hchauhan@ventanamicro.com>
To: opensbi@lists.infradead.org
Subject: [PATCH 5/9] lib: sbi: Modify the boot time region flag prints
Date: Tue, 20 Dec 2022 16:16:21 +0530	[thread overview]
Message-ID: <20221220104625.80667-6-hchauhan@ventanamicro.com> (raw)
In-Reply-To: <20221220104625.80667-1-hchauhan@ventanamicro.com>

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>
---
 lib/sbi/sbi_domain.c | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/lib/sbi/sbi_domain.c b/lib/sbi/sbi_domain.c
index 01eff18..39a00f3 100644
--- a/lib/sbi/sbi_domain.c
+++ b/lib/sbi/sbi_domain.c
@@ -344,15 +344,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++) ? ")" : "()");
 
-- 
2.39.0



  parent reply	other threads:[~2022-12-20 10:46 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-20 10:46 [PATCH 0/9] Split region permissions into M-mode and SU-mode Himanshu Chauhan
2022-12-20 10:46 ` [PATCH 1/9] include: sbi: Fine grain the permissions for M and SU modes Himanshu Chauhan
2023-01-06 17:35   ` Anup Patel
2023-01-09  4:43     ` hchauhan
2023-01-09  5:19       ` Anup Patel
2022-12-20 10:46 ` [PATCH 2/9] lib: sbi: Use finer permission semantics for address validation Himanshu Chauhan
2023-01-06 17:38   ` Anup Patel
2022-12-20 10:46 ` [PATCH 3/9] lib: sbi: Add permissions for the firmware start till end Himanshu Chauhan
2023-01-06 17:44   ` Anup Patel
2022-12-20 10:46 ` [PATCH 4/9] lib: sbi: Use finer permission sematics to decide on PMP bits Himanshu Chauhan
2023-01-06 17:45   ` Anup Patel
2022-12-20 10:46 ` Himanshu Chauhan [this message]
2023-01-06 17:47   ` [PATCH 5/9] lib: sbi: Modify the boot time region flag prints Anup Patel
2022-12-20 10:46 ` [PATCH 6/9] lib: utils: Use SU-{R/W/X} flags for region permissions during parsing Himanshu Chauhan
2023-01-06 17:49   ` Anup Patel
2022-12-20 10:46 ` [PATCH 7/9] lib: utils: Disallow non-root domains from adding M-mode regions Himanshu Chauhan
2023-01-06 17:51   ` Anup Patel
2022-12-20 10:46 ` [PATCH 8/9] lib: utils: Add M-mode {R/W} flags to the MMIO regions Himanshu Chauhan
2023-01-06 17:52   ` Anup Patel
2022-12-20 10:46 ` [PATCH 9/9] docs: Update domain's region permissions and requirements Himanshu Chauhan
2023-01-06 17:54   ` Anup Patel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221220104625.80667-6-hchauhan@ventanamicro.com \
    --to=hchauhan@ventanamicro.com \
    --cc=opensbi@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox