mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 09:18:00 +08:00
SAMV7 protected mode: Don't enable D-Cache until userspace data has been initialized
This commit is contained in:
@@ -367,18 +367,6 @@ void __start(void)
|
||||
|
||||
sam_boardinitialize();
|
||||
|
||||
/* Enable I- and D-Caches */
|
||||
|
||||
arch_dcache_writethrough();
|
||||
arch_enable_icache();
|
||||
arch_enable_dcache();
|
||||
|
||||
/* Perform early serial initialization */
|
||||
|
||||
#ifdef USE_EARLYSERIALINIT
|
||||
up_earlyserialinit();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARMV7M_MPU
|
||||
/* For the case of the separate user-/kernel-space build, perform whatever
|
||||
* platform specific initialization of the user memory is required.
|
||||
@@ -398,6 +386,18 @@ void __start(void)
|
||||
sam_mpu_initialize();
|
||||
#endif
|
||||
|
||||
/* Enable I- and D-Caches */
|
||||
|
||||
arch_dcache_writethrough();
|
||||
arch_enable_icache();
|
||||
arch_enable_dcache();
|
||||
|
||||
/* Perform early serial initialization */
|
||||
|
||||
#ifdef USE_EARLYSERIALINIT
|
||||
up_earlyserialinit();
|
||||
#endif
|
||||
|
||||
/* Then start NuttX */
|
||||
|
||||
#ifdef CONFIG_STACK_COLORATION
|
||||
|
||||
@@ -62,6 +62,9 @@
|
||||
* Normally this just means initializing the user space .data and .bss
|
||||
* segments.
|
||||
*
|
||||
* Assumptions:
|
||||
* The D-Cache has not yet been enabled.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void sam_userspace(void)
|
||||
|
||||
Reference in New Issue
Block a user