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
13bbea0f1c
commit
28eaa08cbc
@ -32,6 +32,12 @@
|
|||||||
|
|
||||||
#include "sbi_internal.h"
|
#include "sbi_internal.h"
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Preprocecssor definitions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#define NAPOT_OPENALL (PMPCFG_A_NAPOT | PMPCFG_RWX_MASK)
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Functions
|
* Private Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -119,7 +125,7 @@ void sbi_start(void)
|
|||||||
|
|
||||||
/* Open everything for PMP */
|
/* 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 */
|
/* Then jump to the S-mode start function */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user