Minor changes.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11317 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
isiora 2018-01-18 09:37:12 +00:00
parent b84e6eeff1
commit cc1316f252
1 changed files with 12 additions and 0 deletions

View File

@ -21,6 +21,13 @@
* @addtogroup SAMA5D2_BOOT
* @{
*/
#define FALSE 0
#define TRUE 1
#define _FROM_ASM_
#include "chlicense.h"
#include "chconf.h"
#include "armparams.h"
#if !defined(__DOXYGEN__)
.set AIC_REDIR_KEY, 0x5B6C0E26 << 1
@ -42,6 +49,8 @@ Boot_Handler:
*/
ldr r0, =_start
mcr p15, 0, r0, c12, c0, 0
#if (CH_CFG_SEC_WORLD == TRUE)
/*
* Do not redirect secure interrupts to AIC
*/
@ -52,6 +61,7 @@ Boot_Handler:
bic r0, r0, #0x1
ldr r1, =SFR_AICREDIR
str r0, [r1]
#endif
/*
* Reset SCTLR Settings
*/
@ -63,6 +73,7 @@ Boot_Handler:
bic r0, r0, #(0x1 << 13) // Clear V bit 13 to disable hivecs
mcr p15, 0, r0, c1, c0, 0 // Write value back to CP15 System Control register
isb
#if (CH_CFG_SEC_WORLD == TRUE)
/*
* Turn off L2Cache
*/
@ -75,6 +86,7 @@ Boot_Handler:
bic r0, r0, #0x1
ldr r1, =SFR_L2CC_HRAMC
str r0, [r1]
#endif
b Reset_Handler
#endif /* !defined(__DOXYGEN__) */