Massive x86 Update - Bring x86 in line with ARM and PPC
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest32 patches 0 repliesNew
Changes since RFC from the cover letter
- 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
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/32 | x86: Fix definition of global_data struct for asm-offsets.carch/ | +1 | 0 replies | |
| 1/32 | x86: Fix definition of global_data struct for asm-offsets.c | +0 | 0 replies | |
| 2/32 | x86: Align config.mk and linker scripts with other archesarch/ arch/ arch/ +2 more | +114 | 2 replies | |
| 2/32 | x86: Align config.mk and linker scripts with other arches | +0 | 0 replies | |
| 2/32 | x86: Align config.mk and linker scripts with other arches | +0 | 0 replies | |
| 3/32 | eNET: Create distinct board configurationsboard/ boards.cfg | +2 | 0 replies | |
| 3/32 | eNET: Create distinct board configurations | +0 | 0 replies | |
| 4/32 | x86: Parametize values used in linker scriptarch/ arch/ arch/ +2 more | +20 | 0 replies | |
| 4/32 | x86: Parametize values used in linker script | +0 | 0 replies | |
| 5/32 | sc520: Sort Makefilearch/ | +1 | 0 replies | |
| 5/32 | sc520: Sort Makefile | +0 | 0 replies | |
| 5/32 | sc520: Sort Makefile | +0 | 0 replies | |
| 6/32 | x86: Fix mangled umlautsarch/ arch/ | +2 | 0 replies | |
| 6/32 | x86: Fix mangled umlauts | +0 | 0 replies | |
| 7/32 | x86: Add stack dump to register dumparch/ | +16 | 0 replies | |
| 7/32 | x86: Add stack dump to register dump | +0 | 0 replies | |
| 8/32 | x86: Move Global Descriptor Table defines to processor.harch/ arch/ | +7 | 0 replies | |
| 8/32 | x86: Move Global Descriptor Table defines to processor.h | +0 | 0 replies | |
| 9/32 | x86: Add processor flags header from linuxarch/ arch/ arch/ +3 more | +121 | 0 replies | |
| 9/32 | x86: Add processor flags header from linux | +0 | 0 replies | |
| 10/32 | x86: Call early_board_init when warm bootingarch/ | +5 | 0 replies | |
| 10/32 | x86: Call early_board_init when warm booting | +0 | 0 replies | |
| 11/32 | x86: Make cpu init functions weakarch/ arch/ arch/ +1 more | +17 | 0 replies | |
| 11/32 | x86: Make cpu init functions weak | +0 | 0 replies | |
| 12/32 | sc520: Define MMCR address in include filearch/ arch/ arch/ +1 more | +55 | 0 replies | |
| 12/32 | sc520: Define MMCR address in include file | +0 | 0 replies | |
| 13/32 | sc520: Move board specific settings to board init functionarch/ board/ | +9 | 0 replies | |
| 13/32 | sc520: Move board specific settings to board init function | +0 | 0 replies | |
| 14/32 | sc520: Remove printf calls from cpu_init_farch/ | +0 | 0 replies | |
| 14/32 | sc520: Remove printf calls from cpu_init_f | +0 | 0 replies | |
| 15/32 | eNET: Fix eNET Interrupt Setup for Linuxboard/ | +9 | 0 replies | |
| 15/32 | eNET: Fix eNET Interrupt Setup for Linux | +0 | 0 replies | |
| 16/32 | eNET: Add RTC support to eNETdrivers/ include/ | +8 | 0 replies | |
| 16/32 | eNET: Add RTC support to eNET | +0 | 0 replies | |
| 17/32 | eNET: Define MMCR values in config.hboard/ board/ include/ | +445 | 0 replies | |
| 17/32 | eNET: Define MMCR values in config.h | +0 | 0 replies | |
| 18/32 | eNET: Rearrange PAR assignmentsboard/ include/ | +46 | 0 replies | |
| 18/32 | eNET: Rearrange PAR assignments | +0 | 0 replies | |
| 19/32 | eNET: General code cleanupboard/ board/ include/ | +129 | 0 replies | |
| 19/32 | eNET: General code cleanup | +0 | 0 replies | |
| 20/32 | x86: Move initial gd to fixed locationarch/ arch/ arch/ +1 more | +39 | 0 replies | |
| 20/32 | x86: Move initial gd to fixed location | +0 | 0 replies | |
| 21/32 | x86: Use Cache-As-RAM for initial stackarch/ arch/ arch/ +2 more | +135 | 0 replies | |
| 21/32 | x86: Use Cache-As-RAM for initial stack | +0 | 0 replies | |
| 22/32 | sc520: Move RAM sizing code from asm to Carch/ arch/ arch/ +7 more | +612 | 0 replies | |
| 22/32 | sc520: Move RAM sizing code from asm to C | +0 | 0 replies | |
| 23/32 | x86: Defer setup of final stackarch/ arch/ | +33 | 0 replies | |
| 23/32 | x86: Defer setup of final stack | +0 | 0 replies | |
| 24/32 | x86: Move call to dram_init_f into board_init_farch/ arch/ arch/ | +4 | 0 replies | |
| 24/32 | x86: Move call to dram_init_f into board_init_f | +0 | 0 replies | |
| 25/32 | x86: Move test for cold boot into init functionsarch/ arch/ | +11 | 0 replies | |
| 25/32 | x86: Move test for cold boot into init functions | +0 | 0 replies | |
| 26/32 | x86: Move console initialisation into board_init_farch/ | +12 | 0 replies | |
| 26/32 | x86: Move console initialisation into board_init_f | +0 | 0 replies | |
| 27/32 | x86: Fix incorrect usage of relocation offsetarch/ arch/ | +6 | 0 replies | |
| 27/32 | x86: Fix incorrect usage of relocation offset | +0 | 0 replies | |
| 28/32 | x86: Split board_init_f() into init_fnc_t compatible functionsarch/ arch/ | +74 | 0 replies | |
| 28/32 | x86: Split board_init_f() into init_fnc_t compatible functions | +0 | 0 replies | |
| 29/32 | x86: Rearrange function calls in board_init_farch/ | +8 | 0 replies | |
| 29/32 | x86: Rearrange function calls in board_init_f | +0 | 0 replies | |
| 30/32 | x86: Convert board_init_f to use an init_sequencearch/ | +29 | 0 replies | |
| 30/32 | x86: Convert board_init_f to use an init_sequence | +0 | 0 replies | |
| 31/32 | sc520: Release CAR and enable cachingarch/ | +11 | 0 replies | |
| 31/32 | sc520: Release CAR and enable caching | +0 | 0 replies | |
| 32/32 | eNET: Move initial Global Data into CARinclude/ | +1 | 0 replies | |
| 32/32 | eNET: Move initial Global Data into CAR | +0 | 0 replies |
Reviews trailers per patch
3 of 66 patches have a Reviewed-by or Acked-by.
| Patch | Lo?c Minier |
|---|---|
| 1/32 | |
| 1/32 | |
| 2/32 | A-b |
| 2/32 | A-b |
| 2/32 | A-b |
| 3/32 | |
| 3/32 | |
| 4/32 | |
| 4/32 | |
| 5/32 | |
| 5/32 | |
| 5/32 | |
| 6/32 | |
| 6/32 | |
| 7/32 | |
| 7/32 | |
| 8/32 | |
| 8/32 | |
| 9/32 | |
| 9/32 | |
| 10/32 | |
| 10/32 | |
| 11/32 | |
| 11/32 | |
| 12/32 | |
| 12/32 | |
| 13/32 | |
| 13/32 | |
| 14/32 | |
| 14/32 | |
| 15/32 | |
| 15/32 | |
| 16/32 | |
| 16/32 | |
| 17/32 | |
| 17/32 | |
| 18/32 | |
| 18/32 | |
| 19/32 | |
| 19/32 | |
| 20/32 | |
| 20/32 | |
| 21/32 | |
| 21/32 | |
| 22/32 | |
| 22/32 | |
| 23/32 | |
| 23/32 | |
| 24/32 | |
| 24/32 | |
| 25/32 | |
| 25/32 | |
| 26/32 | |
| 26/32 | |
| 27/32 | |
| 27/32 | |
| 28/32 | |
| 28/32 | |
| 29/32 | |
| 29/32 | |
| 30/32 | |
| 30/32 | |
| 31/32 | |
| 31/32 | |
| 32/32 | |
| 32/32 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [U-Boot] [PATCH 00/32] Massive x86 Update - Bring x86 in line with ARM and PPC
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