ppc/85xx: Introduce RESET_VECTOR_ADDRESS to handle non-standard link address
PATCH 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.
--- 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 ++ cpu/mpc85xx/u-boot.lds | 10 +++++++--- 5 files changed, 15 insertions(+), 3 deletions(-)
board/freescale/mpc8536ds/config.mk +2 -0
@@ -26,3 +26,5 @@ ifndef TEXT_BASE TEXT_BASE = 0xeff80000 endif + +PLATFORM_CPPFLAGS += -DRESET_VECTOR_ADDRESS=0xeffffffc
board/freescale/mpc8572ds/config.mk +2 -0
@@ -26,3 +26,5 @@ ifndef TEXT_BASE TEXT_BASE = 0xeff80000 endif + +PLATFORM_CPPFLAGS += -DRESET_VECTOR_ADDRESS=0xeffffffc
board/freescale/p1_p2_rdb/config.mk +2 -0
@@ -27,3 +27,5 @@ ifndef TEXT_BASE TEXT_BASE = 0xeff80000 endif + +PLATFORM_CPPFLAGS += -DRESET_VECTOR_ADDRESS=0xeffffffc
board/freescale/p2020ds/config.mk +2 -0
@@ -26,3 +26,5 @@ ifndef TEXT_BASE TEXT_BASE = 0xeff80000 endif + +PLATFORM_CPPFLAGS += -DRESET_VECTOR_ADDRESS=0xeffffffc
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 1/1 ppc/85xx: Introduce RESET_VECTOR_ADDRESS to handle non-standard link address
Dear Kumar Gala,
Quoted 19 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.Signed-off-by Kumar Gala <[email protected]>--- 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 ++ cpu/mpc85xx/u-boot.lds | 10 +++++++--- 5 files changed, 15 insertions(+), 3 deletions(-)board/freescale/mpc8536ds/config.mk +0
-0
board/freescale/mpc8536ds/config.mk line 30
Quoted 5 lines
board/freescale/mpc8536ds/config.mk +2
-0@@ -26,3 +26,5 @@ ifndef TEXT_BASE TEXT_BASE = 0xeff80000 endif + +PLATFORM_CPPFLAGS += -DRESET_VECTOR_ADDRESS=0xeffffffc
I suggest we handle this the same way as we do with TEXT_BASE, i. e. only add a "RESET_VECTOR_ADDRESS=0xeffffffc" in the board config. The auto-export it to the preprocessor in the toplevel config.mk as done for TEXT_BASE.
Best regards,
Wolfgang Denk
Signature · 7 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 believe the use of noise to make music will increase until we reach a music produced through the aid of electrical instruments which will make available for musical purposes any and all sounds that can be heard." - composer John Cage, 1937