Skip to contentSkip to conversation

ppc/85xx: Introduce RESET_VECTOR_ADDRESS to handle non-standard link address

PATCH Superseded Kumar Gala 2 participants 2 messages Sep 9, 2009

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

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
index f030876..c5fe1ba 100644
@@ -26,3 +26,5 @@
 ifndef TEXT_BASE
 TEXT_BASE = 0xeff80000
 endif
+
+PLATFORM_CPPFLAGS += -DRESET_VECTOR_ADDRESS=0xeffffffc
board/freescale/mpc8572ds/config.mk +2 -0
index 08b61f0..b7c18ab 100644
@@ -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
index abd64bb..674bdf0 100644
@@ -27,3 +27,5 @@
 ifndef TEXT_BASE
 TEXT_BASE = 0xeff80000
 endif
+
+PLATFORM_CPPFLAGS += -DRESET_VECTOR_ADDRESS=0xeffffffc
board/freescale/p2020ds/config.mk +2 -0
index 439fa8f..297bed5 100644
@@ -26,3 +26,5 @@
 ifndef TEXT_BASE
 TEXT_BASE = 0xeff80000
 endif
+
+PLATFORM_CPPFLAGS += -DRESET_VECTOR_ADDRESS=0xeffffffc
cpu/mpc85xx/u-boot.lds +7 -3
index d6e22a7..17753c3 100644
@@ -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
#1 lore raw

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_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 +0 -0
index f030876..c5fe1ba 100644

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