diff options
| author | Yu-Chien Peter Lin <[email protected]> | 2025-10-08 16:44:37 +0800 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2025-11-02 15:55:57 +0530 |
| commit | 32c1d38dcf1a184b100bba2e26047939c32ec625 (patch) | |
| tree | 2b165371d7a2fd278c8ce38d767b11a4b5e8ce7c /include | |
| parent | 37b72cb575b26af6b39b0508c0ef8f70dbc0e76f (diff) | |
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 <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Anup Patel <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/sbi/sbi_domain.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/sbi/sbi_domain.h b/include/sbi/sbi_domain.h index e9cff0b1..a6ee553b 100644 --- a/include/sbi/sbi_domain.h +++ b/include/sbi/sbi_domain.h @@ -250,6 +250,13 @@ void sbi_domain_memregion_init(unsigned long addr, 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 * @param dom pointer to domain |
