mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-11-23 03:04:21 +00:00
lib: sbi_hart: move sbi_hart_get_smepmp_flags() to sbi_domain
Move sbi_hart_get_smepmp_flags() from sbi_hart.c to sbi_domain.c and rename it to sbi_domain_get_smepmp_flags() to better reflect its purpose of converting domain memory region flags to PMP configuration. Also removes unused parameters (scratch and dom). Signed-off-by: Yu-Chien Peter Lin <peter.lin@sifive.com> Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20251008084444.3525615-2-peter.lin@sifive.com Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
committed by
Anup Patel
parent
37b72cb575
commit
32c1d38dcf
@@ -249,6 +249,13 @@ void sbi_domain_memregion_init(unsigned long addr,
|
||||
unsigned long flags,
|
||||
struct sbi_domain_memregion *reg);
|
||||
|
||||
/**
|
||||
* Return the Smepmp pmpcfg LRWX encoding for the flags in @reg.
|
||||
*
|
||||
* @param reg pointer to memory region; its flags field encodes permissions.
|
||||
*/
|
||||
unsigned int sbi_domain_get_smepmp_flags(struct sbi_domain_memregion *reg);
|
||||
|
||||
/**
|
||||
* Check whether we can access specified address for given mode and
|
||||
* memory region flags under a domain
|
||||
|
||||
Reference in New Issue
Block a user