mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-01-10 20:28:59 +00:00
ppc/85xx: Introduce RESET_VECTOR_ADDRESS to handle non-standard link address
Some board ports place TEXT_BASE at a location that would cause the RESET_VECTOR_ADDRESS not to be at 0xfffffffc when we link. By default we assume RESET_VECTOR_ADDRESS will be 0xfffffffc if the board doesn't explicitly set it. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Wolfgang Denk <wd@denx.de>
This commit is contained in:
parent
5079ae4a20
commit
bbff2d2861
6 changed files with 19 additions and 3 deletions
|
@ -26,3 +26,5 @@
|
||||||
ifndef TEXT_BASE
|
ifndef TEXT_BASE
|
||||||
TEXT_BASE = 0xeff80000
|
TEXT_BASE = 0xeff80000
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
RESET_VECTOR_ADDRESS = 0xeffffffc
|
||||||
|
|
|
@ -26,3 +26,5 @@
|
||||||
ifndef TEXT_BASE
|
ifndef TEXT_BASE
|
||||||
TEXT_BASE = 0xeff80000
|
TEXT_BASE = 0xeff80000
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
RESET_VECTOR_ADDRESS = 0xeffffffc
|
||||||
|
|
|
@ -27,3 +27,5 @@
|
||||||
ifndef TEXT_BASE
|
ifndef TEXT_BASE
|
||||||
TEXT_BASE = 0xeff80000
|
TEXT_BASE = 0xeff80000
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
RESET_VECTOR_ADDRESS = 0xeffffffc
|
||||||
|
|
|
@ -26,3 +26,5 @@
|
||||||
ifndef TEXT_BASE
|
ifndef TEXT_BASE
|
||||||
TEXT_BASE = 0xeff80000
|
TEXT_BASE = 0xeff80000
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
RESET_VECTOR_ADDRESS = 0xeffffffc
|
||||||
|
|
|
@ -128,6 +128,10 @@ ifneq ($(TEXT_BASE),)
|
||||||
CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE)
|
CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(RESET_VECTOR_ADDRESS),)
|
||||||
|
CPPFLAGS += -DRESET_VECTOR_ADDRESS=$(RESET_VECTOR_ADDRESS)
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(OBJTREE),$(SRCTREE))
|
ifneq ($(OBJTREE),$(SRCTREE))
|
||||||
CPPFLAGS += -I$(OBJTREE)/include2 -I$(OBJTREE)/include
|
CPPFLAGS += -I$(OBJTREE)/include2 -I$(OBJTREE)/include
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -20,6 +20,10 @@
|
||||||
* MA 02111-1307 USA
|
* MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef RESET_VECTOR_ADDRESS
|
||||||
|
#define RESET_VECTOR_ADDRESS 0xfffffffc
|
||||||
|
#endif
|
||||||
|
|
||||||
OUTPUT_ARCH(powerpc)
|
OUTPUT_ARCH(powerpc)
|
||||||
/* Do we need any of these for elf?
|
/* Do we need any of these for elf?
|
||||||
__DYNAMIC = 0; */
|
__DYNAMIC = 0; */
|
||||||
|
@ -116,17 +120,17 @@ SECTIONS
|
||||||
. = ALIGN(256);
|
. = ALIGN(256);
|
||||||
__init_end = .;
|
__init_end = .;
|
||||||
|
|
||||||
.bootpg ADDR(.text) + 0x7f000 :
|
.bootpg RESET_VECTOR_ADDRESS - 0xffc :
|
||||||
{
|
{
|
||||||
cpu/mpc85xx/start.o (.bootpg)
|
cpu/mpc85xx/start.o (.bootpg)
|
||||||
} :text = 0xffff
|
} :text = 0xffff
|
||||||
|
|
||||||
.resetvec ADDR(.text) + 0x7fffc :
|
.resetvec RESET_VECTOR_ADDRESS :
|
||||||
{
|
{
|
||||||
*(.resetvec)
|
*(.resetvec)
|
||||||
} :text = 0xffff
|
} :text = 0xffff
|
||||||
|
|
||||||
. = ADDR(.text) + 0x80000;
|
. = RESET_VECTOR_ADDRESS + 0x4;
|
||||||
|
|
||||||
__bss_start = .;
|
__bss_start = .;
|
||||||
.bss (NOLOAD) :
|
.bss (NOLOAD) :
|
||||||
|
|
Loading…
Reference in a new issue