[U-Boot] [PATCH 00/32] Massive x86 Update - Bring x86 in line with ARM and PPC

Graeme Russ graeme.russ at gmail.com
Fri Feb 4 13:35:27 CET 2011


This patch series marks a considerably significant milestone in the x86
port of U-Boot - Running the initial init sequence from Flash using the
CPU on-die cache as a temporary stack.

Prior to this patch series, the low-level assembler code running in Flash
was responsible for initialising SDRAM and getting the C environment (the
stack) set up. The C code would then simply copy the U-Boot image to RAM,
do some relocation adjustments and jump into the in-RAM copy - only then
would the init sequence run.

Thank to the assistance of Juergen Beisert (who had done a Cache-As-RAM
implementation for the sc520 quite some time ago), the x86 boot sequence
is more 'standard':
  - Initialise Cache-As-RAM (CAR)
  - Setup a restricted 'C' environment
  - Setup initial global data in CAR
  - Run init sequence from Flash
  - Copy global data to a newly malloc'd block
  - Jump to RAM

This patch does have three 'negative' impacts:
  - Boot time is slightly slower due to running the init sequence from
    Flash rather than SDRAM
  - The image is no longer position independent - If you want to create
    a warm-boot u-boot image, you need to link it to a different address
  - You can no longer do a warm-boot to a new u-boot image from SDARM
    (SDRAM is always re-initialised during the init sequence)

Regards,

Graeme

Changes since RFC:
  - Ran checkpatch.pl and fixed (most) errors and warnings (a few long
    lines remain for readability and sc520_enable_ecc() in
    arch\i386\cpu\sc520 contains raw asm which is #ifdef'd out - This is
    ECC initialisation copied from the original asm file which is retained
    in case someone with ECC capable hardware (which I do not have) would
    care to implement properly
  - Merged some patches that logically belonged together
  - Added a code tidy-up for eNET
  - #defined all 'magic numbers' in the eNET configuration file
  - rebased to u-boot/master

Graeme Russ (32):
  x86: Fix definition of global_data struct for asm-offsets.c
  x86: Align config.mk and linker scripts with other arches
  eNET: Create distinct board configurations
  x86: Parametize values used in linker script
  sc520: Sort Makefile
  x86: Fix mangled umlauts
  x86: Add stack dump to register dump
  x86: Move Global Descriptor Table defines to processor.h
  x86: Add processor flags header from linux
  x86: Call early_board_init when warm booting
  x86: Make cpu init functions weak
  sc520: Define MMCR address in include file
  sc520: Move board specific settings to board init function
  sc520: Remove printf calls from cpu_init_f
  eNET: Fix eNET Interrupt Setup for Linux
  eNET: Add RTC support to eNET
  eNET: Define MMCR values in config.h
  eNET: Rearrange PAR assignments
  eNET: General code cleanup
  x86: Move initial gd to fixed location
  x86: Use Cache-As-RAM for initial stack
  sc520: Move RAM sizing code from asm to C
  x86: Defer setup of final stack
  x86: Move call to dram_init_f into board_init_f
  x86: Move test for cold boot into init functions
  x86: Move console initialisation into board_init_f
  x86: Fix incorrect usage of relocation offset
  x86: Split board_init_f() into init_fnc_t compatible functions
  x86: Rearrange function calls in board_init_f
  x86: Convert board_init_f to use an init_sequence
  sc520: Release CAR and enable caching
  eNET: Move initial Global Data into CAR

 arch/i386/config.mk                     |   14 +-
 arch/i386/cpu/config.mk                 |   10 +-
 arch/i386/cpu/cpu.c                     |   35 +-
 arch/i386/cpu/interrupts.c              |   19 +-
 arch/i386/cpu/sc520/Makefile            |    5 +-
 arch/i386/cpu/sc520/sc520.c             |  148 +-------
 arch/i386/cpu/sc520/sc520_asm.S         |  615 ----------------------------
 arch/i386/cpu/sc520/sc520_car.S         |   94 +++++
 arch/i386/cpu/sc520/sc520_sdram.c       |  532 ++++++++++++++++++++++++
 arch/i386/cpu/start.S                   |  107 +++---
 arch/i386/cpu/start16.S                 |    5 +-
 arch/i386/cpu/u-boot.lds                |   96 +++++
 arch/i386/include/asm/global_data.h     |   21 +-
 arch/i386/include/asm/ic/sc520.h        |   93 ++++-
 arch/i386/include/asm/processor-flags.h |  100 +++++
 arch/i386/include/asm/processor.h       |    9 +-
 arch/i386/include/asm/u-boot-i386.h     |    3 +
 arch/i386/lib/board.c                   |  144 ++++---
 arch/i386/lib/realmode.c                |    8 +-
 board/eNET/config.mk                    |    6 +-
 board/eNET/eNET.c                       |  192 +++++----
 board/eNET/eNET_start.S                 |    7 -
 board/eNET/eNET_start16.S               |   15 +-
 board/eNET/u-boot.lds                   |  104 -----
 boards.cfg                              |    3 +-
 drivers/rtc/mc146818.c                  |    6 +
 include/configs/eNET.h                  |  678 +++++++++++++++++++++++--------
 27 files changed, 1786 insertions(+), 1283 deletions(-)
 delete mode 100644 arch/i386/cpu/sc520/sc520_asm.S
 create mode 100644 arch/i386/cpu/sc520/sc520_car.S
 create mode 100644 arch/i386/cpu/sc520/sc520_sdram.c
 create mode 100644 arch/i386/cpu/u-boot.lds
 create mode 100644 arch/i386/include/asm/processor-flags.h
 delete mode 100644 board/eNET/u-boot.lds



More information about the U-Boot mailing list