SAMV7 protected mode: Don't enable D-Cache until userspace data has been initialized

This commit is contained in:
Gregory Nutt
2015-11-07 09:35:23 -06:00
parent 2e99311fb4
commit dd69967934
2 changed files with 15 additions and 12 deletions
+12 -12
View File
@@ -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
+3
View File
@@ -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)