Commit ccd0ef38 authored by Max Filippov's avatar Max Filippov

xtensa: nommu: fix Image.elf reset code and ld script

Don't hardcode kernel entry address as 0x3000 or 0xd0003000, use
LOAD_MEMORY_ADDRESS macro. Don't compile MMU remapping code and don't try
to link it when building noMMU configuration.
Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
parent be603092
...@@ -41,6 +41,7 @@ SECTIONS ...@@ -41,6 +41,7 @@ SECTIONS
__bss_end = .; __bss_end = .;
} }
#ifdef CONFIG_MMU
/* /*
* This is a remapped copy of the Reset Vector Code. * This is a remapped copy of the Reset Vector Code.
* It keeps gdb in sync with the PC after switching * It keeps gdb in sync with the PC after switching
...@@ -51,4 +52,5 @@ SECTIONS ...@@ -51,4 +52,5 @@ SECTIONS
{ {
*(.ResetVector.remapped_text) *(.ResetVector.remapped_text)
} }
#endif
} }
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <asm/page.h> #include <asm/page.h>
#include <asm/cacheasm.h> #include <asm/cacheasm.h>
#include <asm/initialize_mmu.h> #include <asm/initialize_mmu.h>
#include <asm/vectors.h>
#include <linux/linkage.h> #include <linux/linkage.h>
.section .ResetVector.text, "ax" .section .ResetVector.text, "ax"
...@@ -34,12 +35,7 @@ _ResetVector: ...@@ -34,12 +35,7 @@ _ResetVector:
.align 4 .align 4
RomInitAddr: RomInitAddr:
#if defined(CONFIG_INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX) && \ .word LOAD_MEMORY_ADDRESS
XCHAL_HAVE_PTP_MMU && XCHAL_HAVE_SPANNING_WAY
.word 0x00003000
#else
.word 0xd0003000
#endif
RomBootParam: RomBootParam:
.word _bootparam .word _bootparam
_bootparam: _bootparam:
...@@ -79,6 +75,7 @@ reset: ...@@ -79,6 +75,7 @@ reset:
movi a4, 0 movi a4, 0
jx a0 jx a0
#ifdef CONFIG_MMU
.align 4 .align 4
.section .ResetVector.remapped_text, "x" .section .ResetVector.remapped_text, "x"
...@@ -102,3 +99,4 @@ _RemappedSetupMMU: ...@@ -102,3 +99,4 @@ _RemappedSetupMMU:
#endif #endif
.end no-absolute-literals .end no-absolute-literals
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment