mirror of
https://github.com/apache/nuttx.git
synced 2026-08-02 04:38:59 +00:00
arch/riscv: fix PMP in sbi_start()
This fixes PMP setting for open everything before going S-mode, which has been broken since pull/12398. Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
This commit is contained in:
parent
2fa7b9cc34
commit
bfd93d41cf
1 changed files with 7 additions and 1 deletions
|
|
@ -32,6 +32,12 @@
|
|||
|
||||
#include "sbi_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Preprocecssor definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define NAPOT_OPENALL (PMPCFG_A_NAPOT | PMPCFG_RWX_MASK)
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
|
@ -119,7 +125,7 @@ void sbi_start(void)
|
|||
|
||||
/* Open everything for PMP */
|
||||
|
||||
riscv_append_pmp_region(PMPCFG_A_NAPOT | PMPCFG_RWX_MASK, 0, -1);
|
||||
DEBUGASSERT(riscv_append_pmp_region(NAPOT_OPENALL, 0, 0) == 0);
|
||||
|
||||
/* Then jump to the S-mode start function */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue