mmu: mmu enable should after enable SMP
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
11cf3de776
commit
25d5cd11a1
3
arch/arm/src/armv7-a/arm_head.S
Normal file → Executable file
3
arch/arm/src/armv7-a/arm_head.S
Normal file → Executable file
@ -409,6 +409,7 @@ __start:
|
||||
bic r0, r0, #(SCTLR_SW | SCTLR_I | SCTLR_V | SCTLR_RR | SCTLR_HA)
|
||||
bic r0, r0, #(SCTLR_EE | SCTLR_TRE | SCTLR_AFE | SCTLR_TE)
|
||||
|
||||
#ifndef CONFIG_SMP
|
||||
/* Set bits to enable the MMU
|
||||
*
|
||||
* SCTLR_M Bit 0: Enable the MMU
|
||||
@ -416,6 +417,8 @@ __start:
|
||||
*/
|
||||
|
||||
orr r0, r0, #(SCTLR_M)
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_ARCH_CORTEXA5
|
||||
orr r0, r0, #(SCTLR_Z)
|
||||
#endif
|
||||
|
2
arch/arm/src/armv7-a/arm_scu.c
Normal file → Executable file
2
arch/arm/src/armv7-a/arm_scu.c
Normal file → Executable file
@ -203,6 +203,6 @@ void arm_enable_smp(int cpu)
|
||||
arm_set_actlr(regval);
|
||||
|
||||
regval = arm_get_sctlr();
|
||||
regval |= SCTLR_C | SCTLR_I;
|
||||
regval |= SCTLR_C | SCTLR_I | SCTLR_M;
|
||||
arm_set_sctlr(regval);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user