Skip to content

Commit

Permalink
sbi_hart: enable PBMT for rv32
Browse files Browse the repository at this point in the history
  • Loading branch information
cp0613 committed Nov 19, 2024
1 parent ad40f17 commit 498a750
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/sbi/sbi_hart.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ static void mstatus_init(struct sbi_scratch *scratch)
*/
#if __riscv_xlen > 32
menvcfg_val |= ENVCFG_PBMTE;
#else
unsigned long menvcfgh_val;
menvcfgh_val = csr_read(CSR_MENVCFGH);
menvcfgh_val |= ENVCFGH_PBMTE;
csr_write(CSR_MENVCFGH, menvcfgh_val);
#endif

/*
Expand Down

0 comments on commit 498a750

Please sign in to comment.