diff options
| author | Yu-Chien Peter Lin <[email protected]> | 2025-10-08 16:44:43 +0800 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2025-11-02 16:49:47 +0530 |
| commit | b210376fe21f2a9fd3334274851196b8a376048a (patch) | |
| tree | db8d914b3cba0bb56031b628c28e2c80931bf133 /include | |
| parent | 631efeeb4913f278b8f5e5920b8c233ac250ff28 (diff) | |
lib: sbi: sbi_hart: track firmware PMP entries for SmePMP
Add fw_smepmp_ids bitmap to track PMP entries that protect firmware
regions. Allow us to preserve these critical entries across domain
transitions and check inconsistent firmware entry allocation.
Also add sbi_hart_smepmp_is_fw_region() helper function to query
whether a given SmePMP entry protects firmware regions.
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_hart.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sbi/sbi_hart.h b/include/sbi/sbi_hart.h index ff682fb4..e66dd52f 100644 --- a/include/sbi/sbi_hart.h +++ b/include/sbi/sbi_hart.h @@ -146,6 +146,7 @@ unsigned int sbi_hart_pmp_count(struct sbi_scratch *scratch); unsigned int sbi_hart_pmp_log2gran(struct sbi_scratch *scratch); unsigned int sbi_hart_pmp_addrbits(struct sbi_scratch *scratch); unsigned int sbi_hart_mhpm_bits(struct sbi_scratch *scratch); +bool sbi_hart_smepmp_is_fw_region(unsigned int pmp_idx); int sbi_hart_pmp_configure(struct sbi_scratch *scratch); int sbi_hart_map_saddr(unsigned long base, unsigned long size); int sbi_hart_unmap_saddr(void); |
