mbox series

[v2,0/2] Improve PMP feature detection

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

Message

Atish Patra Oct. 21, 2020, 12:57 a.m. UTC
This series improves the PMP detection by detecting the minimum granularity
and address size supported by the platform. It prevents any pmp region writes
that are not supported by platform leading to more robust and secure
implementation.

Tested generic platform for following boards:
1. Qemu
2. HiFive Unleashed
3. OmniXtend 

Changes from v1->v2:
1. Implement pmp address size computation.
2. Improve pmp granularity detection mechanism. 

Atish Patra (2):
lib: sbi: Check pmp range granularity and size before setting pmp
lib: sbi: Improve boot time print with additional PMP information

include/sbi/sbi_hart.h |  2 ++
lib/sbi/sbi_hart.c     | 56 ++++++++++++++++++++++++++++++++++++++----
lib/sbi/sbi_init.c     | 15 ++++++-----
3 files changed, 62 insertions(+), 11 deletions(-)

--
2.25.1

Comments

Anup Patel Oct. 23, 2020, 9:53 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 0/2] Improve PMP feature detection
> 
> This series improves the PMP detection by detecting the minimum
> granularity and address size supported by the platform. It prevents any pmp
> region writes that are not supported by platform leading to more robust and
> secure implementation.
> 
> Tested generic platform for following boards:
> 1. Qemu
> 2. HiFive Unleashed
> 3. OmniXtend

Make sure you test on QEMU RV32 as well.

Regards,
Anup

> 
> Changes from v1->v2:
> 1. Implement pmp address size computation.
> 2. Improve pmp granularity detection mechanism.
> 
> Atish Patra (2):
> lib: sbi: Check pmp range granularity and size before setting pmp
> lib: sbi: Improve boot time print with additional PMP information
> 
> include/sbi/sbi_hart.h |  2 ++
> lib/sbi/sbi_hart.c     | 56 ++++++++++++++++++++++++++++++++++++++----
> lib/sbi/sbi_init.c     | 15 ++++++-----
> 3 files changed, 62 insertions(+), 11 deletions(-)
> 
> --
> 2.25.1