diff options
| author | Anup Patel <[email protected]> | 2023-09-07 17:19:44 +0530 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2023-09-24 16:40:52 +0530 |
| commit | 2b51a9dd9c24783154dd776773603116d53a2d28 (patch) | |
| tree | 98bd2ee14f73380089906804fb2b439cfb3011af | |
| parent | 5240d312d310f1325802f6b66b0d92afabb23911 (diff) | |
lib: sbi: Fix pmp_flags for Smepmp read-only shared region
The Smepmp read-only shared region must have pmpcfg.L, pmpcfg.R,
pmpcfg.W, and pmpcfg.X bits set so sbi_hart_get_smepmp_flags()
must return pmp_flags accordingly.
Signed-off-by: Anup Patel <[email protected]>
Signed-off-by: Mayuresh Chitale <[email protected]>
| -rw-r--r-- | lib/sbi/sbi_hart.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sbi/sbi_hart.c b/lib/sbi/sbi_hart.c index 6320ea6e..c8aa342e 100644 --- a/lib/sbi/sbi_hart.c +++ b/lib/sbi/sbi_hart.c @@ -297,7 +297,7 @@ static unsigned int sbi_hart_get_smepmp_flags(struct sbi_scratch *scratch, if (SBI_DOMAIN_MEMREGION_IS_SHARED(reg->flags)) { /* Read only for both M and SU modes */ if (SBI_DOMAIN_MEMREGION_IS_SUR_MR(reg->flags)) - pmp_flags = (PMP_R | PMP_W | PMP_X); + pmp_flags = (PMP_L | PMP_R | PMP_W | PMP_X); /* Execute for SU but Read/Execute for M mode */ else if (SBI_DOMAIN_MEMREGION_IS_SUX_MRX(reg->flags)) |
