mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-25 07:41:42 +01:00
lib: sbi: Don't clear mseccfg.MML bit in sbi_hart_smepmp_configure()
The mseccfg.MML bit is a sticky bit which remains unchanged once set so no need to clear it in sbi_hart_smepmp_configure(). Signed-off-by: Anup Patel <apatel@ventanamicro.com> Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
This commit is contained in:
@@ -360,12 +360,10 @@ static int sbi_hart_smepmp_configure(struct sbi_scratch *scratch,
|
|||||||
unsigned long pmp_addr;
|
unsigned long pmp_addr;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set the RLB and clear MML so that, we can write to
|
* Set the RLB so that, we can write to PMP entries without
|
||||||
* entries without enforcement even if some entries
|
* enforcement even if some entries are locked.
|
||||||
* are locked.
|
|
||||||
*/
|
*/
|
||||||
csr_set(CSR_MSECCFG, MSECCFG_RLB);
|
csr_set(CSR_MSECCFG, MSECCFG_RLB);
|
||||||
csr_clear(CSR_MSECCFG, MSECCFG_MML);
|
|
||||||
|
|
||||||
/* Disable the reserved entry */
|
/* Disable the reserved entry */
|
||||||
pmp_disable(SBI_SMEPMP_RESV_ENTRY);
|
pmp_disable(SBI_SMEPMP_RESV_ENTRY);
|
||||||
|
Reference in New Issue
Block a user