summaryrefslogtreecommitdiff
path: root/include/sbi
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2020-03-17 17:59:38 +0300
committerAnup Patel <anup@brainfault.org>2020-03-18 06:28:26 +0300
commit5fbcd625bc8f8980164b4c905dc8097269461419 (patch)
treeebc4aef34a53d85b5768a066199f127ff723a409 /include/sbi
parent327ba362119a9cb36ff03575723546d8abcb5465 (diff)
downloadopensbi-5fbcd625bc8f8980164b4c905dc8097269461419.tar.xz
lib: sbi: Update pmp_get() to return decoded size directly
Currently pmp_get() returns the log2 length of the PMP memory region size. The caller has to calculate the size based on that and the same codes are duplicated. Update this function to return decoded size directly. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'include/sbi')
-rw-r--r--include/sbi/riscv_asm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sbi/riscv_asm.h b/include/sbi/riscv_asm.h
index 0d675f6..6c5c729 100644
--- a/include/sbi/riscv_asm.h
+++ b/include/sbi/riscv_asm.h
@@ -191,7 +191,7 @@ int pmp_set(unsigned int n, unsigned long prot, unsigned long addr,
unsigned long log2len);
int pmp_get(unsigned int n, unsigned long *prot_out, unsigned long *addr_out,
- unsigned long *log2len_out);
+ unsigned long *size);
#endif /* !__ASSEMBLY__ */