arm: in non-XIP image, make __start alias of __reset
The bootloader expects the entry point to be called __start, not __reset. Change-Id: I5a5f7f45c248b9398e58fb026c731f8617fe4856 Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This commit is contained in:
parent
ec47784a28
commit
62c65d7f00
2 changed files with 18 additions and 3 deletions
|
@ -56,7 +56,17 @@ GTEXT(__reset)
|
|||
* @return N/A
|
||||
*/
|
||||
|
||||
SECTION_FUNC(TEXT,__reset)
|
||||
SECTION_SUBSEC_FUNC(TEXT,_reset_section,__reset)
|
||||
|
||||
/*
|
||||
* In non-XIP kernels, the entry point is located at the __reset symbol, which
|
||||
* is fetched by a XIP image playing the role of a bootloader, which jumps to
|
||||
* it, not through the reset vector mechanism. Such bootloaders might want to
|
||||
* search for a __start symbol instead, so create that alias here.
|
||||
*/
|
||||
#if !defined(CONFIG_XIP)
|
||||
SECTION_SUBSEC_FUNC(TEXT,_reset_section,__start)
|
||||
#endif
|
||||
|
||||
/* lock interrupts: will get unlocked when switch to main task */
|
||||
movs.n r0, #_EXC_IRQ_DEFAULT_PRIO
|
||||
|
|
|
@ -35,8 +35,13 @@
|
|||
#include "vector_table.h"
|
||||
|
||||
_ASM_FILE_PROLOGUE
|
||||
SECTION_SUBSEC_FUNC(exc_vector_table,_Start,__start)
|
||||
SECTION_SUBSEC_FUNC(exc_vector_table,_Start,_vector_table)
|
||||
|
||||
SECTION_SUBSEC_FUNC(exc_vector_table,_vector_table_section,_vector_table)
|
||||
|
||||
/* in XIP kernels. the entry point is also the start of the vector table */
|
||||
#if defined(CONFIG_XIP)
|
||||
SECTION_SUBSEC_FUNC(exc_vector_table,_vector_table_section,__start)
|
||||
#endif
|
||||
|
||||
.word __CORTEXM_BOOT_MSP
|
||||
.word __reset
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue