diff mbox series

[v2,2/2] lib: sbi: Improve boot time print with additional PMP information

Message ID 20201021005754.2386272-3-atish.patra@wdc.com
State Superseded
Headers show
Series Improve PMP feature detection | expand

Commit Message

Atish Patra Oct. 21, 2020, 12:57 a.m. UTC
We know about pmp granularity and number of bits supported by PMP.
Show those information in the boot time info print

Signed-off-by: Atish Patra <atish.patra@wdc.com>
---
 lib/sbi/sbi_init.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

Comments

Anup Patel Oct. 23, 2020, 9:52 a.m. UTC | #1
> -----Original Message-----
> From: Atish Patra <atish.patra@wdc.com>
> Sent: 21 October 2020 06:28
> To: opensbi@lists.infradead.org
> Cc: Atish Patra <Atish.Patra@wdc.com>; Anup Patel <Anup.Patel@wdc.com>
> Subject: [PATCH v2 2/2] lib: sbi: Improve boot time print with additional PMP
> information
> 
> We know about pmp granularity and number of bits supported by PMP.
> Show those information in the boot time info print
> 
> Signed-off-by: Atish Patra <atish.patra@wdc.com>
> ---
>  lib/sbi/sbi_init.c | 15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/lib/sbi/sbi_init.c b/lib/sbi/sbi_init.c index
> 318163602e4a..bd9a3a88b655 100644
> --- a/lib/sbi/sbi_init.c
> +++ b/lib/sbi/sbi_init.c
> @@ -79,14 +79,17 @@ static void sbi_boot_prints(struct sbi_scratch
> *scratch, u32 hartid)
>  	sbi_domain_dump_all("");
> 
>  	/* Boot HART details */
> -	sbi_printf("Boot HART ID        : %u\n", hartid);
> -	sbi_printf("Boot HART Domain    : %s\n", dom->name);
> +	sbi_printf("Boot HART ID              : %u\n", hartid);
> +	sbi_printf("Boot HART Domain          : %s\n", dom->name);
>  	misa_string(xlen, str, sizeof(str));
> -	sbi_printf("Boot HART ISA       : %s\n", str);
> +	sbi_printf("Boot HART ISA             : %s\n", str);
>  	sbi_hart_get_features_str(scratch, str, sizeof(str));
> -	sbi_printf("Boot HART Features  : %s\n", str);
> -	sbi_printf("Boot HART PMP Count : %d\n",
> sbi_hart_pmp_count(scratch));
> -	sbi_printf("Boot HART MHPM Count: %d\n",
> sbi_hart_mhpm_count(scratch));
> +	sbi_printf("Boot HART Features        : %s\n", str);
> +	sbi_printf("Boot HART PMP Count       : %d\n",
> sbi_hart_pmp_count(scratch));
> +	sbi_printf("Boot HART PMP Granularity : %lu\n",
> sbi_hart_pmp_gran(scratch));
> +	sbi_printf("Boot HART PMP Address bits: %d\n",
> sbi_hart_pmp_sz_bits(scratch));
> +	sbi_printf("Boot HART MHPM Count      : %d\n",
> sbi_hart_mhpm_count(scratch));
> +	sbi_printf("Boot HART MHPM Count      : %d\n",
> sbi_hart_mhpm_count(scratch));
>  	sbi_hart_delegation_dump(scratch, "Boot HART ", "   ");
>  }
> 
> --
> 2.25.1

Looks good to me.

Reviewed-by: Anup Patel <anup.patel@wdc.com>

Regards,
Anup
diff mbox series

Patch

diff --git a/lib/sbi/sbi_init.c b/lib/sbi/sbi_init.c
index 318163602e4a..bd9a3a88b655 100644
--- a/lib/sbi/sbi_init.c
+++ b/lib/sbi/sbi_init.c
@@ -79,14 +79,17 @@  static void sbi_boot_prints(struct sbi_scratch *scratch, u32 hartid)
 	sbi_domain_dump_all("");
 
 	/* Boot HART details */
-	sbi_printf("Boot HART ID        : %u\n", hartid);
-	sbi_printf("Boot HART Domain    : %s\n", dom->name);
+	sbi_printf("Boot HART ID              : %u\n", hartid);
+	sbi_printf("Boot HART Domain          : %s\n", dom->name);
 	misa_string(xlen, str, sizeof(str));
-	sbi_printf("Boot HART ISA       : %s\n", str);
+	sbi_printf("Boot HART ISA             : %s\n", str);
 	sbi_hart_get_features_str(scratch, str, sizeof(str));
-	sbi_printf("Boot HART Features  : %s\n", str);
-	sbi_printf("Boot HART PMP Count : %d\n", sbi_hart_pmp_count(scratch));
-	sbi_printf("Boot HART MHPM Count: %d\n", sbi_hart_mhpm_count(scratch));
+	sbi_printf("Boot HART Features        : %s\n", str);
+	sbi_printf("Boot HART PMP Count       : %d\n", sbi_hart_pmp_count(scratch));
+	sbi_printf("Boot HART PMP Granularity : %lu\n", sbi_hart_pmp_gran(scratch));
+	sbi_printf("Boot HART PMP Address bits: %d\n", sbi_hart_pmp_sz_bits(scratch));
+	sbi_printf("Boot HART MHPM Count      : %d\n", sbi_hart_mhpm_count(scratch));
+	sbi_printf("Boot HART MHPM Count      : %d\n", sbi_hart_mhpm_count(scratch));
 	sbi_hart_delegation_dump(scratch, "Boot HART ", "   ");
 }