[U-Boot] [PATCH 0/4] Make u-boot true PIC for ppc

Joakim Tjernlund Joakim.Tjernlund at transmode.se
Wed Dec 30 16:08:28 CET 2009


This series adds link_off(), a function to calculate
the difference between load address and link address.

Using this function it is possible to make u-boot 100%
PIC by wrapping global data accesses LINK_OFF() calls.
Plenty of examples in the code to show how to use it.

All start.S needs to be updated too and I have done
so with mpc83xx.

-DCONFIG_LINK_OFF in your platform config.mk to
make use of this function.

Needs the -ffixed-r14 patches I just sent or
you can fix the conflicts manually.

Would really appreciate some testing by 83xx owners.
Scott?

Note: this is a resend.

        Jocke

Joakim Tjernlund (4):
  ppc: Add const void *link_off(const void *addr)
  Use LINK_OFF to access global data
  Use LINK_OFF in enviroment too
  ppc: Make mpc83xx start.S relative.

 common/cmd_nvedit.c           |    2 +
 common/console.c              |   12 ++++++--
 common/env_common.c           |    2 +-
 common/env_flash.c            |   65 ++++++++++++++++++++++++----------------
 cpu/mpc83xx/cpu.c             |   10 +++---
 cpu/mpc83xx/cpu_init.c        |   38 ++++++++++++-----------
 cpu/mpc83xx/speed.c           |   28 +++++++-----------
 cpu/mpc83xx/start.S           |   35 +++++++++++++++++----
 drivers/serial/serial.c       |   21 +++++++------
 include/common.h              |    7 ++++
 include/linux/ctype.h         |    6 ++--
 lib_generic/crc32.c           |    7 ++++-
 lib_generic/ctype.c           |    2 +-
 lib_generic/display_options.c |    5 ++-
 lib_generic/vsprintf.c        |    9 ++++--
 lib_ppc/board.c               |    5 ++-
 lib_ppc/reloc.S               |   21 +++++++++++++
 tools/updater/ctype.c         |    2 +-
 18 files changed, 177 insertions(+), 100 deletions(-)



More information about the U-Boot mailing list