ppc/85xx: Introduce RESET_VECTOR_ADDRESS to handle non-standard link address
PATCH v2 1/1 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.
---
* Updated to add RESET_VECTOR_ADDRESS to top level config.mk to match how we handle TEXT_BASE
board/freescale/mpc8536ds/config.mk | 2 ++ board/freescale/mpc8572ds/config.mk | 2 ++ board/freescale/p1_p2_rdb/config.mk | 2 ++ board/freescale/p2020ds/config.mk | 2 ++ config.mk | 4 ++++ cpu/mpc85xx/u-boot.lds | 10 +++++++--- 6 files changed, 19 insertions(+), 3 deletions(-)
board/freescale/mpc8536ds/config.mk +2 -0
@@ -26,3 +26,5 @@ ifndef TEXT_BASE TEXT_BASE = 0xeff80000 endif + +RESET_VECTOR_ADDRESS = 0xeffffffc
board/freescale/mpc8572ds/config.mk +2 -0
@@ -26,3 +26,5 @@ ifndef TEXT_BASE TEXT_BASE = 0xeff80000 endif + +RESET_VECTOR_ADDRESS = 0xeffffffc
board/freescale/p1_p2_rdb/config.mk +2 -0
@@ -27,3 +27,5 @@ ifndef TEXT_BASE TEXT_BASE = 0xeff80000 endif + +RESET_VECTOR_ADDRESS = 0xeffffffc
board/freescale/p2020ds/config.mk +2 -0
@@ -26,3 +26,5 @@ ifndef TEXT_BASE TEXT_BASE = 0xeff80000 endif + +RESET_VECTOR_ADDRESS = 0xeffffffc
config.mk +4 -0
@@ -128,6 +128,10 @@ ifneq ($(TEXT_BASE),) CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE) endif +ifneq ($(RESET_VECTOR_ADDRESS),) +CPPFLAGS += -DRESET_VECTOR_ADDRESS=$(RESET_VECTOR_ADDRESS) +endif + ifneq ($(OBJTREE),$(SRCTREE)) CPPFLAGS += -I$(OBJTREE)/include2 -I$(OBJTREE)/include endif
cpu/mpc85xx/u-boot.lds +7 -3
@@ -20,6 +20,10 @@ * MA 02111-1307 USA */ +#ifndef RESET_VECTOR_ADDRESS +#define RESET_VECTOR_ADDRESS (0xfffffffc) +#endif + OUTPUT_ARCH(powerpc) /* Do we need any of these for elf? __DYNAMIC = 0; */
@@ -116,17 +120,17 @@ SECTIONS . = ALIGN(256); __init_end = .; - .bootpg ADDR(.text) + 0x7f000 : + .bootpg RESET_VECTOR_ADDRESS - 0xffc : { cpu/mpc85xx/start.o (.bootpg) } :text = 0xffff - .resetvec ADDR(.text) + 0x7fffc : + .resetvec RESET_VECTOR_ADDRESS : { *(.resetvec) } :text = 0xffff - . = ADDR(.text) + 0x80000; + . = RESET_VECTOR_ADDRESS + 0x4; __bss_start = .; .bss (NOLOAD) :
Signature · 1 line
1.6.0.6
PATCH v2 1/1 ppc/85xx: Introduce RESET_VECTOR_ADDRESS to handle non-standard link address
Dear Kumar Gala,
Quoted 4 lines · In message <[email protected]> you…
Some board ports place
TEXT_BASEat a location that would cause theRESET_VECTOR_ADDRESSnot to be at0xfffffffcwhen we link. By default we assumeRESET_VECTOR_ADDRESSwill be0xfffffffcif the board doesn't explicitly set it.
thanks.
Just some nitpicking:
cpu/mpc85xx/u-boot.lds line 25
Quoted 9 lines
cpu/mpc85xx/u-boot.lds +3
-0@@ -20,6 +20,10 @@ * MA 02111-1307 USA */ +#ifndef RESET_VECTOR_ADDRESS +#define RESET_VECTOR_ADDRESS (0xfffffffc) +#endif
No parens needed here.
Except from that:
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "I go on working for the same reason a hen goes on laying eggs." - H. L. Mencken
PATCH v2 1/1 ppc/85xx: Introduce RESET_VECTOR_ADDRESS to handle non-standard link address
Quoted 21 lines · Wolfgang Denk
Dear Kumar Gala,
In message <[email protected]
Quoted 7 lines
you wrote:
Some board ports placeTEXT_BASEat a location that would cause theRESET_VECTOR_ADDRESSnot to be at0xfffffffcwhen we link. By default
we assumeRESET_VECTOR_ADDRESSwill be0xfffffffcif the board doesn't
explicitly set it.thanks.
Just some nitpicking:
Quoted 6 lines
cpu/mpc85xx/u-boot.lds +0
-0@@ -20,6 +20,10 @@ * MA 02111-1307 USA */
Quoted 5 lines
cpu/mpc85xx/u-boot.lds line 25
Quoted 3 lines
cpu/mpc85xx/u-boot.lds +3
-0+#ifndef RESET_VECTOR_ADDRESS +#define RESET_VECTOR_ADDRESS (0xfffffffc) +#endifNo parens needed here.
Fixed in my commit :)
Quoted 7 lines
Except from that:
Acked-by Wolfgang Denk <[email protected]>Best regards,
Wolfgang Denk
- k