xtensa: move vecbase SR initialization to _startup
Instead of initializing vecbase in initialize_mmu macro, which may be expanded either in Image.elf reset vector hadler or in the kernel head.S, both times only when CONFIG_MMU is enabled, do this initialization once in _startup function. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
This commit is contained in:
parent
a4f9846da7
commit
53490121e9
|
@ -141,9 +141,6 @@
|
||||||
jx a4
|
jx a4
|
||||||
|
|
||||||
1:
|
1:
|
||||||
movi a2, VECBASE_RESET_VADDR
|
|
||||||
wsr a2, vecbase
|
|
||||||
|
|
||||||
/* Step 5: remove temporary mapping. */
|
/* Step 5: remove temporary mapping. */
|
||||||
idtlb a7
|
idtlb a7
|
||||||
iitlb a7
|
iitlb a7
|
||||||
|
|
|
@ -112,6 +112,11 @@ ENTRY(_startup)
|
||||||
|
|
||||||
movi a0, 0
|
movi a0, 0
|
||||||
|
|
||||||
|
#if XCHAL_HAVE_VECBASE
|
||||||
|
movi a2, VECBASE_RESET_VADDR
|
||||||
|
wsr a2, vecbase
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Clear debugging registers. */
|
/* Clear debugging registers. */
|
||||||
|
|
||||||
#if XCHAL_HAVE_DEBUG
|
#if XCHAL_HAVE_DEBUG
|
||||||
|
|
Loading…
Reference in New Issue