public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 00/32] Massive x86 Update - Bring x86 in line with ARM and PPC
@ 2011-02-04 12:35 Graeme Russ
  2011-02-04 12:35 ` [U-Boot] [PATCH 01/32] x86: Fix definition of global_data struct for asm-offsets.c Graeme Russ
                   ` (31 more replies)
  0 siblings, 32 replies; 69+ messages in thread
From: Graeme Russ @ 2011-02-04 12:35 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 69+ messages in thread

end of thread, other threads:[~2011-02-12  4:31 UTC | newest]

Thread overview: 69+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-04 12:35 [U-Boot] [PATCH 00/32] Massive x86 Update - Bring x86 in line with ARM and PPC Graeme Russ
2011-02-04 12:35 ` [U-Boot] [PATCH 01/32] x86: Fix definition of global_data struct for asm-offsets.c Graeme Russ
2011-02-12  4:25   ` Graeme Russ
2011-02-04 12:35 ` [U-Boot] [PATCH 02/32] x86: Align config.mk and linker scripts with other arches Graeme Russ
2011-02-04 20:42   ` Scott Wood
2011-02-04 22:45     ` Graeme Russ
2011-02-10  1:05   ` =?//TRANSLIT?Q?Lo=EFc?= Minier
2011-02-12  4:26   ` Graeme Russ
2011-02-04 12:35 ` [U-Boot] [PATCH 03/32] eNET: Create distinct board configurations Graeme Russ
2011-02-12  4:26   ` Graeme Russ
2011-02-04 12:35 ` [U-Boot] [PATCH 04/32] x86: Parametize values used in linker script Graeme Russ
2011-02-12  4:26   ` Graeme Russ
2011-02-04 12:35 ` [U-Boot] [PATCH 05/32] sc520: Sort Makefile Graeme Russ
2011-02-12  4:27   ` Graeme Russ
2011-02-12  4:27   ` Graeme Russ
2011-02-04 12:35 ` [U-Boot] [PATCH 06/32] x86: Fix mangled umlauts Graeme Russ
2011-02-12  4:27   ` Graeme Russ
2011-02-04 12:35 ` [U-Boot] [PATCH 07/32] x86: Add stack dump to register dump Graeme Russ
2011-02-12  4:27   ` Graeme Russ
2011-02-04 12:35 ` [U-Boot] [PATCH 08/32] x86: Move Global Descriptor Table defines to processor.h Graeme Russ
2011-02-12  4:27   ` Graeme Russ
2011-02-04 12:35 ` [U-Boot] [PATCH 09/32] x86: Add processor flags header from linux Graeme Russ
2011-02-12  4:27   ` Graeme Russ
2011-02-04 12:35 ` [U-Boot] [PATCH 10/32] x86: Call early_board_init when warm booting Graeme Russ
2011-02-12  4:28   ` Graeme Russ
2011-02-04 12:35 ` [U-Boot] [PATCH 11/32] x86: Make cpu init functions weak Graeme Russ
2011-02-12  4:28   ` Graeme Russ
2011-02-04 12:35 ` [U-Boot] [PATCH 12/32] sc520: Define MMCR address in include file Graeme Russ
2011-02-12  4:28   ` Graeme Russ
2011-02-04 12:35 ` [U-Boot] [PATCH 13/32] sc520: Move board specific settings to board init function Graeme Russ
2011-02-12  4:28   ` Graeme Russ
2011-02-04 12:35 ` [U-Boot] [PATCH 14/32] sc520: Remove printf calls from cpu_init_f Graeme Russ
2011-02-12  4:28   ` Graeme Russ
2011-02-04 12:35 ` [U-Boot] [PATCH 15/32] eNET: Fix eNET Interrupt Setup for Linux Graeme Russ
2011-02-12  4:28   ` Graeme Russ
2011-02-04 12:35 ` [U-Boot] [PATCH 16/32] eNET: Add RTC support to eNET Graeme Russ
2011-02-12  4:29   ` Graeme Russ
2011-02-04 12:35 ` [U-Boot] [PATCH 17/32] eNET: Define MMCR values in config.h Graeme Russ
2011-02-12  4:29   ` Graeme Russ
2011-02-04 12:35 ` [U-Boot] [PATCH 18/32] eNET: Rearrange PAR assignments Graeme Russ
2011-02-12  4:29   ` Graeme Russ
2011-02-04 12:35 ` [U-Boot] [PATCH 19/32] eNET: General code cleanup Graeme Russ
2011-02-12  4:29   ` Graeme Russ
2011-02-04 12:35 ` [U-Boot] [PATCH 20/32] x86: Move initial gd to fixed location Graeme Russ
2011-02-12  4:29   ` Graeme Russ
2011-02-04 12:35 ` [U-Boot] [PATCH 21/32] x86: Use Cache-As-RAM for initial stack Graeme Russ
2011-02-12  4:29   ` Graeme Russ
2011-02-04 12:35 ` [U-Boot] [PATCH 22/32] sc520: Move RAM sizing code from asm to C Graeme Russ
2011-02-12  4:30   ` Graeme Russ
2011-02-04 12:35 ` [U-Boot] [PATCH 23/32] x86: Defer setup of final stack Graeme Russ
2011-02-12  4:30   ` Graeme Russ
2011-02-04 12:35 ` [U-Boot] [PATCH 24/32] x86: Move call to dram_init_f into board_init_f Graeme Russ
2011-02-12  4:30   ` Graeme Russ
2011-02-04 12:35 ` [U-Boot] [PATCH 25/32] x86: Move test for cold boot into init functions Graeme Russ
2011-02-12  4:30   ` Graeme Russ
2011-02-04 12:35 ` [U-Boot] [PATCH 26/32] x86: Move console initialisation into board_init_f Graeme Russ
2011-02-12  4:30   ` Graeme Russ
2011-02-04 12:35 ` [U-Boot] [PATCH 27/32] x86: Fix incorrect usage of relocation offset Graeme Russ
2011-02-12  4:30   ` Graeme Russ
2011-02-04 12:35 ` [U-Boot] [PATCH 28/32] x86: Split board_init_f() into init_fnc_t compatible functions Graeme Russ
2011-02-12  4:31   ` Graeme Russ
2011-02-04 12:35 ` [U-Boot] [PATCH 29/32] x86: Rearrange function calls in board_init_f Graeme Russ
2011-02-12  4:31   ` Graeme Russ
2011-02-04 12:35 ` [U-Boot] [PATCH 30/32] x86: Convert board_init_f to use an init_sequence Graeme Russ
2011-02-12  4:31   ` Graeme Russ
2011-02-04 12:35 ` [U-Boot] [PATCH 31/32] sc520: Release CAR and enable caching Graeme Russ
2011-02-12  4:31   ` Graeme Russ
2011-02-04 12:35 ` [U-Boot] [PATCH 32/32] eNET: Move initial Global Data into CAR Graeme Russ
2011-02-12  4:31   ` Graeme Russ

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox