[PATCH v4 2/2] lib: sbi: Improve boot time print with additional PMP information

Anup Patel Anup.Patel at wdc.com
Tue Oct 27 03:41:37 EDT 2020



> -----Original Message-----
> From: Atish Patra <atish.patra at wdc.com>
> Sent: 27 October 2020 02:34
> To: opensbi at lists.infradead.org
> Cc: Atish Patra <Atish.Patra at wdc.com>; Anup Patel <Anup.Patel at wdc.com>
> Subject: [PATCH v4 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 at wdc.com>
> Reviewed-by: Anup Patel <anup.patel at 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..f9a88ec8e6a6 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_granularity(scratch));
> +	sbi_printf("Boot HART PMP Address bits: %d\n",
> sbi_hart_pmp_addrbits(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

Applied this patch to the riscv/opensbi repo

Thanks,
Anup




More information about the opensbi mailing list