[U-Boot] [RFC][PATCH 00/19] arm: add full relocation / cache support

Heiko Schocher hs at denx.de
Thu Jul 29 12:44:13 CEST 2010


This patch series add full relocation and cache support for arm
based boards. I did this for arm1136, arm_cortexa8 and arm926ejs
based boards. As this change is not compatible to old code,
before this can go to mainline *all* plattforms and boards
have to be converted! As I don;t have access to all plattforms/
boards I need help here! Also I couldn;t test all boards,
so please test and report, send bugfixes!

Relocation support:

changed arch/arm/lib/board.c to get in sync with arch/powerpc/lib/board.c
maybe it is possible to merge them to one arch/generic/lib/board.c?

This approach is similiar to powerpc, so there is a need for
an initial stack pointer addr defined through CONFIG_SYS_INIT_SP_ADDR.
As I don;t know all architectures/boards, I set this value where
I didn;t find such a stack, for example in the processor,
to RAM, as RAM is actual setup in low_level_init.S. Please
check this for boards where this is in RAM to find a "better"
place.

Please also read doc/README.arm-relocation There is more
info what is done, and maybe should be done.

Cache support:

I used the patches from Alessandro Rubini:
http://lists.denx.de/pipermail/u-boot/2010-January/067099.html

and rebased them to actual code. Also, in case of full relocation,
the position of the TLB can not be set on compile time, instead
it is calculated in board_init_f() and stored in gd. Also added
support for arm_cortexa8 and arm1136.

As this is a RFC, this patch series is in a state where
things *can* and *should* be discussed!

Also I think, it would be good to create an "arm-relocation.git"
where patches (for example board maintainers bugfixes) for this
change are collected.

I tested the patch series on the qong(arm1136), beagle(arm_cortexa8)
tx25(arm926ejs) and magnesium(arm926ejs) boards. Relocation
worked fine.

Cache results:

    Test 1: Loading 127 MB of data from NAND flash into RAM:


    Instr. Cache	off	on	on
      Data Cache	off	off	on
    --------------------------------------------------
    QONG (ARM11)	177s	95s	43s	= x 4.1	
    Beagle (Cortex A8)	116s	106s	30.3s	= x 3.8

    Test 2: uncompressing a gzipped image from RAM to RAM
            (size compressed: 6.5 MiB, uncompressed: 35 MiB):

    Instr. Cache	off	on	on
      Data Cache	off	off	on
    --------------------------------------------------
    QONG (ARM11)	1.54s	0.95s	0.18s	= x 8.6
    Beagle (Cortex A8)	1.84s	1.64s	0.12s	= x 15.3



Heiko Schocher (19):
      arm: get rid of bi_env
      relocation: fixup cmdtable
      common: move TOTAL_MALLOC_LEN to include/common.h
      arm, arm1136, qong: add relocation support
      arm, arm1136: all arm1136 boards converted to new relocation
      arm, bdinfo: print some more infos.
      arm, relocation: add documentation
      i2c: fix command usage help
      i2c, omap24xx: only set bus_initialized, if uboot is relocated
      part: fix relocation fixup
      cortex8, beagle: add relocation support
      arm, cortexa8: all arm_cortexa8 based boards converted
      arm926, tx25: add relocation
      nand_fsl_nfc: get rid of local var
      arm, 926: convert all arm926ejs based board
      arm926: flush cache for arm926
      arm cp15: setup mmu and enable dcache
      beagle, cache: activate cache command
      arm1136, dcache: enable cache command for qong board

 arch/arm/config.mk                              |    3 +
 arch/arm/cpu/arm1136/start.S                    |  181 +++++++++----
 arch/arm/cpu/arm1136/u-boot.lds                 |   14 +-
 arch/arm/cpu/arm926ejs/orion5x/dram.c           |   12 +-
 arch/arm/cpu/arm926ejs/start.S                  |  165 ++++++++----
 arch/arm/cpu/arm926ejs/u-boot.lds               |   14 +-
 arch/arm/cpu/armv7/mx51/u-boot.lds              |   14 +-
 arch/arm/cpu/armv7/omap3/cache.S                |   82 ++++++
 arch/arm/cpu/armv7/omap3/emif4.c                |   14 +-
 arch/arm/cpu/armv7/omap3/sdrc.c                 |   14 +-
 arch/arm/cpu/armv7/start.S                      |  174 +++++++++----
 arch/arm/cpu/armv7/u-boot.lds                   |   14 +-
 arch/arm/include/asm/config.h                   |    3 -
 arch/arm/include/asm/global_data.h              |    9 +
 arch/arm/include/asm/u-boot-arm.h               |    8 +-
 arch/arm/include/asm/u-boot.h                   |    1 -
 arch/arm/lib/board.c                            |  326 +++++++++++++++++++----
 arch/arm/lib/cache-cp15.c                       |   55 ++++
 arch/arm/lib/cache.c                            |   13 +-
 arch/arm/lib/interrupts.c                       |   15 +-
 arch/powerpc/lib/board.c                        |   10 -
 board/Marvell/guruplug/guruplug.c               |   15 +-
 board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c |   12 +-
 board/Marvell/openrd_base/openrd_base.c         |   11 +-
 board/Marvell/rd6281a/rd6281a.c                 |   15 +-
 board/Marvell/sheevaplug/sheevaplug.c           |   15 +-
 board/apollon/apollon.c                         |   13 +-
 board/armltd/integrator/integrator.c            |   14 +-
 board/armltd/integrator/lowlevel_init.S         |    2 +-
 board/armltd/versatile/versatile.c              |   10 +
 board/atmel/at91cap9adk/at91cap9adk.c           |   11 +-
 board/atmel/at91sam9260ek/at91sam9260ek.c       |   11 +-
 board/atmel/at91sam9261ek/at91sam9261ek.c       |   11 +-
 board/atmel/at91sam9263ek/at91sam9263ek.c       |   11 +-
 board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c |   11 +-
 board/atmel/at91sam9rlek/at91sam9rlek.c         |   11 +-
 board/calao/sbc35_a9g20/sbc35_a9g20.c           |   15 +-
 board/calao/tny_a9260/tny_a9260.c               |   14 +-
 board/davedenx/qong/config.mk                   |    4 +-
 board/davedenx/qong/qong.c                      |   92 ++++---
 board/davinci/common/misc.c                     |   12 +-
 board/esd/meesc/meesc.c                         |   13 +-
 board/esd/otc570/otc570.c                       |   13 +-
 board/eukrea/cpu9260/cpu9260.c                  |   15 +-
 board/freescale/mx31ads/config.mk               |    2 +-
 board/freescale/mx31ads/mx31ads.c               |   10 +-
 board/freescale/mx31ads/u-boot.lds              |   14 +-
 board/freescale/mx31pdk/mx31pdk.c               |   11 +-
 board/freescale/mx51evk/mx51evk.c               |   14 +-
 board/imx31_phycore/config.mk                   |    2 +-
 board/imx31_phycore/imx31_phycore.c             |   10 +-
 board/karo/tx25/config.mk                       |    4 +-
 board/karo/tx25/tx25.c                          |   11 +-
 board/keymile/km_arm/km_arm.c                   |   13 +-
 board/logicpd/imx27lite/config.mk               |    2 +-
 board/logicpd/imx27lite/imx27lite.c             |   15 +-
 board/logicpd/imx31_litekit/config.mk           |    2 +-
 board/logicpd/imx31_litekit/imx31_litekit.c     |   11 +-
 board/ronetix/pm9261/pm9261.c                   |   13 +-
 board/ronetix/pm9263/pm9263.c                   |   13 +-
 board/ronetix/pm9g45/pm9g45.c                   |   13 +-
 board/samsung/goni/goni.c                       |   11 +-
 board/samsung/smdkc100/smdkc100.c               |    9 +-
 board/st/nhk8815/nhk8815.c                      |   11 +-
 board/ti/beagle/config.mk                       |    2 +-
 board/ti/omap1510inn/config.mk                  |    3 +-
 board/ti/omap1510inn/omap1510innovator.c        |   13 +-
 board/ti/omap1610inn/config.mk                  |    3 +-
 board/ti/omap1610inn/omap1610innovator.c        |   12 +-
 board/ti/omap2420h4/config.mk                   |    6 +-
 board/ti/omap2420h4/omap2420h4.c                |   18 ++-
 board/ti/omap5912osk/omap5912osk.c              |   12 +-
 board/ti/omap730p2/omap730p2.c                  |   12 +-
 common/cmd_bdinfo.c                             |   10 +-
 common/cmd_bmp.c                                |    6 +
 common/cmd_i2c.c                                |   11 +
 common/command.c                                |   33 +++
 disk/part.c                                     |   11 +-
 doc/README.arm-relocation                       |  315 ++++++++++++++++++++++
 drivers/i2c/omap24xx_i2c.c                      |    4 +-
 include/command.h                               |    3 +
 include/common.h                                |    9 +
 include/configs/am3517_evm.h                    |    5 +
 include/configs/apollon.h                       |    7 +
 include/configs/at91cap9adk.h                   |    4 +
 include/configs/at91sam9260ek.h                 |    4 +
 include/configs/at91sam9261ek.h                 |    4 +
 include/configs/at91sam9263ek.h                 |    4 +
 include/configs/at91sam9m10g45ek.h              |    4 +
 include/configs/at91sam9rlek.h                  |    4 +
 include/configs/cpu9260.h                       |    4 +
 include/configs/da830evm.h                      |    5 +
 include/configs/da850evm.h                      |    4 +
 include/configs/davinci_dm355evm.h              |    4 +
 include/configs/davinci_dm355leopard.h          |    4 +
 include/configs/davinci_dm365evm.h              |    4 +
 include/configs/davinci_dm6467evm.h             |    4 +
 include/configs/davinci_dvevm.h                 |    6 +
 include/configs/davinci_schmoogie.h             |    5 +
 include/configs/davinci_sffsdr.h                |    5 +
 include/configs/davinci_sonata.h                |    6 +
 include/configs/devkit8000.h                    |    5 +
 include/configs/edminiv2.h                      |    4 +
 include/configs/guruplug.h                      |    4 +
 include/configs/imx27lite-common.h              |    4 +
 include/configs/imx31_litekit.h                 |    7 +
 include/configs/imx31_phycore.h                 |    9 +
 include/configs/integratorcp.h                  |    6 +
 include/configs/km_arm.h                        |    4 +
 include/configs/meesc.h                         |    4 +
 include/configs/mv88f6281gtw_ge.h               |    4 +
 include/configs/mx31ads.h                       |    7 +
 include/configs/mx31pdk.h                       |    7 +
 include/configs/mx51evk.h                       |    5 +
 include/configs/nhk8815.h                       |    4 +
 include/configs/ns9750dev.h                     |    4 +
 include/configs/omap1610h2.h                    |    4 +
 include/configs/omap1610inn.h                   |    4 +
 include/configs/omap2420h4.h                    |    7 +
 include/configs/omap3_beagle.h                  |    5 +
 include/configs/omap3_evm.h                     |    5 +
 include/configs/omap3_overo.h                   |    5 +
 include/configs/omap3_pandora.h                 |    5 +
 include/configs/omap3_sdp3430.h                 |    5 +
 include/configs/omap3_zoom1.h                   |    5 +
 include/configs/omap3_zoom2.h                   |    5 +
 include/configs/omap5912osk.h                   |    4 +
 include/configs/omap730p2.h                     |    4 +
 include/configs/openrd_base.h                   |    4 +
 include/configs/otc570.h                        |    4 +
 include/configs/pm9261.h                        |    4 +
 include/configs/pm9263.h                        |    4 +
 include/configs/pm9g45.h                        |    4 +
 include/configs/qong.h                          |   10 +
 include/configs/rd6281a.h                       |    4 +
 include/configs/s5p_goni.h                      |    4 +
 include/configs/sbc35_a9g20.h                   |    4 +
 include/configs/sheevaplug.h                    |    4 +
 include/configs/smdkc100.h                      |    4 +
 include/configs/tny_a9260.h                     |    4 +
 include/configs/tx25.h                          |   12 +-
 include/configs/versatile.h                     |    4 +
 nand_spl/board/freescale/mx31pdk/u-boot.lds     |   14 +-
 nand_spl/board/karo/tx25/u-boot.lds             |   14 +-
 nand_spl/nand_boot.c                            |    5 +
 nand_spl/nand_boot_fsl_nfc.c                    |   19 +-
 onenand_ipl/board/apollon/apollon.c             |   23 ++
 onenand_ipl/board/apollon/u-boot.onenand.lds    |   15 +-
 148 files changed, 2143 insertions(+), 406 deletions(-)
 create mode 100644 doc/README.arm-relocation

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany


More information about the U-Boot mailing list