lib: sbi: Use finer permission sematics to decide on PMP bits
authorHimanshu Chauhan <hchauhan@ventanamicro.com>
Mon, 9 Jan 2023 05:20:38 +0000 (05:20 +0000)
committerAnup Patel <anup@brainfault.org>
Mon, 9 Jan 2023 12:34:17 +0000 (18:04 +0530)
commit1ac14f10f6f27f1078d684b7931718db0e6822c4
treed34b8924fc463ff8ed477ceb7a87448506c28580
parent22dbdb3d60c64975d7e5704a6bd64f7b73bee157
lib: sbi: Use finer permission sematics to decide on PMP bits

Use the fine grained permission bits to decide if the region
permissions are to be enforced on all modes. Also use the new
permission bits for deciding on R/W/X bits in pmpcfg register.

Signed-off-by: Himanshu Chauhan <hchauhan@ventanamicro.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Tested-by: Anup Patel <anup@brainfault.org>
lib/sbi/sbi_hart.c