mirror of
https://github.com/apache/nuttx.git
synced 2026-10-06 22:05:21 +00:00
SAMV7 protected mode: Don't enable D-Cache until userspace data has been initialized
This commit is contained in:
parent
2e99311fb4
commit
dd69967934
2 changed files with 15 additions and 12 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue