Commit 7ccf6bf5 authored by Anup Patel's avatar Anup Patel Committed by Anup Patel
Browse files

lib: sbi: Allow specifying mode in sbi_hart_pmp_check_addr() API



We extend sbi_hart_pmp_check_addr() API so that users can specify
privilege mode of the address for checking PMP access permissions.

To achieve this, we end-up converting "unsigned long *size" parameter
to "unsigned long *log2len" for pmp_get() implementation so that we
can deal with regions of "1UL << __riscv_xlen" size in a special case
in sbi_hart_pmp_check_addr() implementation.

Signed-off-by: default avatarAnup Patel <anup.patel@wdc.com>
Reviewed-by: default avatarAtish Patra <atish.patra@wdc.com>
parent 6734304f
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment