Skip to content

x86: Add support for booting from TPL

Simon Glass u-boot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest40 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/40binman: Don't generate an error in 'text' entry constructortools/binman/etype/text.py+2 -21 reply
2/40binman: Don't show image-skip message by defaulttools/binman/control.py+2 -21 reply
3/40binman: Add a missing comment in Entry_vblocktools/binman/etype/vblock.py+1 -01 reply
4/40dm: core: Fix translate condition in ofnode_get_addr_size()drivers/core/ofnode.c+1 -11 reply
5/40cros_ec: Use a hyphen in the uclass namedrivers/misc/cros_ec.c+1 -11 reply
6/40spl: Allow sandbox to build a device-tree filescripts/Makefile.spl+13 -11 reply
7/40RFC: binman: Allow sections to have an offsettools/binman/bsection.py tools/binman/etype/section.py+5 -31 reply
8/40x86: start64: Fix copyright messagearch/x86/cpu/start64.S+1 -11 reply
9/40x86: mp_init: Use proper error numbersarch/x86/cpu/mp_init.c+5 -51 reply
10/40x86: Add a way to reinit the cpuarch/x86/cpu/i386/cpu.c arch/x86/cpu/x86_64/cpu.c arch/x86/include/asm/u-boot-x86.h+94 -441 reply
11/40x86: dts: Add device-tree labels for rtc and resetarch/x86/dts/reset.dtsi arch/x86/dts/rtc.dtsi+2 -21 reply
12/40x86: Update a stale comment about ifdtoolarch/x86/cpu/intel_common/car.S+1 -11 reply
13/40x86: Support SPL and TPLarch/Kconfig arch/x86/Kconfig+30 -11 reply
14/40x86: Support booting with TPLarch/x86/Kconfig+8 -11 reply
15/40x86: Add a handoff header filearch/x86/include/asm/handoff.h+15 -01 reply
16/40x86: broadwell: Improve SDRAM debugging outputarch/x86/cpu/broadwell/sdram.c+20 -121 reply
17/40x86: broadwell: Allow SDRAM init from SPLarch/x86/cpu/broadwell/Makefile arch/x86/cpu/broadwell/northbridge.c arch/x86/cpu/broadwell/sdram.c+94 -941 reply
17/40x86: broadwell: Allow SDRAM init from SPL+0 -00 replies
18/40x86: Move init of debug UART to cpu.carch/x86/cpu/broadwell/cpu.c arch/x86/cpu/broadwell/sdram.c+13 -111 reply
19/40x86: broadwell: Split CPU initarch/x86/cpu/broadwell/Makefile arch/x86/cpu/broadwell/cpu.c arch/x86/cpu/broadwell/cpu_full.c+695 -6731 reply
20/40x86: Add support for starting from SPL/TPLarch/x86/Makefile arch/x86/cpu/Makefile arch/x86/cpu/start_from_spl.S +1 more+147 -11 reply
21/40x86: Allow 16-bit init to be in TPLMakefile arch/x86/Makefile arch/x86/cpu/intel_common/Makefile +2 more+14 -51 reply
22/40x86: broadwell: Allow booting from SPLarch/x86/cpu/broadwell/Makefile arch/x86/cpu/broadwell/cpu_from_spl.c+78 -01 reply
23/40x86: broadwell: Select refcode and CPU code for SPLarch/x86/cpu/broadwell/Makefile+4 -31 reply
24/40x86: Add common Intel code for SPLarch/x86/cpu/intel_common/Makefile arch/x86/cpu/intel_common/cpu_from_spl.c+33 -01 reply
25/40x86: Support saving MRC data from SPLarch/x86/include/asm/mrccache.h arch/x86/lib/mrccache.c+38 -91 reply
26/40x86: Add a simple TPL implementationsarch/x86/include/asm/spl.h arch/x86/lib/Makefile arch/x86/lib/spl.c +3 more+183 -111 reply
27/40x86: mrccache: Add more debuggingarch/x86/lib/mrccache.c+12 -41 reply
28/40x86: Add a sysreset driver for the Intel PCHarch/x86/cpu/broadwell/Kconfig drivers/sysreset/Kconfig drivers/sysreset/Makefile +1 more+136 -01 reply
28/40x86: Add a sysreset driver for the Intel PCH+0 -01 reply
28/40x86: Add a sysreset driver for the Intel PCH+0 -01 reply
29/40x86: Support TPL in Intel common codearch/x86/cpu/intel_common/Makefile+6 -31 reply
30/40x86: Don't set up MTRRs in SPLarch/x86/lib/init_helpers.c+4 -11 reply
31/40x86: Don't generate a bootstage report in SPLarch/x86/lib/bootm.c+1 -11 reply
32/40x86: Support PCI VGA ROM when TPL is useddrivers/pci/pci_rom.c+1 -11 reply
33/40x86: sysreset: Implement the get_last() methoddrivers/sysreset/sysreset_x86.c+6 -01 reply
33/40x86: sysreset: Implement the get_last() method+0 -00 replies
34/40x86: Add documention on the samus flashmapdoc/README.x86+14 -01 reply
35/40x86: samus: Update device tree for SPLarch/x86/dts/chromebook_samus.dts+34 -41 reply
36/40x86: samus: Update device tree for verified bootarch/x86/dts/chromebook_samus.dts+21 -11 reply
37/40x86: Update device tree for TPLarch/x86/dts/u-boot.dtsi+24 -21 reply
37/40x86: Update device tree for TPL+0 -00 replies
38/40x86: Update device tree for Chromium OS verified bootarch/x86/dts/u-boot.dtsi+15 -21 reply
39/40x86: Fix device-tree indentationarch/x86/dts/u-boot.dtsi+73 -741 reply
40/40x86: samus: Add a target to boot through TPLboard/google/Kconfig board/google/chromebook_samus/Kconfig board/google/chromebook_samus/MAINTAINERS +2 more+110 -21 reply

Reviews trailers per patch

32 of 45 patches have a Reviewed-by or Acked-by.

PatchBin Meng
1/40R-b
2/40
3/40R-b
4/40R-b
5/40
6/40
7/40R-b
8/40R-b
9/40R-b
10/40R-b
11/40R-b
12/40R-b
13/40R-b
14/40R-b
15/40R-b
16/40R-b
17/40
17/40
18/40R-b
19/40R-b
20/40
21/40R-b
22/40R-b
23/40R-b
24/40R-b
25/40R-b
26/40R-b
27/40R-b
28/40
28/40
28/40
29/40R-b
30/40R-b
31/40R-b
32/40R-b
33/40
33/40
34/40R-b
35/40R-b
36/40R-b
37/40
37/40
38/40R-b
39/40R-b
40/40R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [U-Boot] [PATCH 00/40] x86: Add support for booting from TPL

At present SPL is used on 64-bit platforms, to allow SPL to be built as a 32-bit program and U-Boot proper to be built as 64-bit.

However it is useful to be able to use SPL on any x86 platform, where U-Boot needs to be updated in the field. Then SPL can select which U-Boot to run (A or B) and most of the code can be updated. Similarly, using TPL allows both SPL and U-Boot to be updated. This is the best approach, since it means that all of U-Boot proper as well as SPL (in particular SDRAM init) can be updated in the field. This provides for the smallest possible amount of read-only (non-updateable) code: just the TPL code.

This series contains a number of changes to allow x86 boards to use TPL, SPL and U-Boot proper. As a test, it is enabled for samus with a new chromebook_samus_tpl board.

Simon Glass (40):
binman: Don't generate an error in 'text' entry constructor
binman: Don't show image-skip message by default
binman: Add a missing comment in Entry_vblock
dm: core: Fix translate condition in ofnode_get_addr_size()
cros_ec: Use a hyphen in the uclass name
spl: Allow sandbox to build a device-tree file
RFC: binman: Allow sections to have an offset
x86: start64: Fix copyright message
x86: mp_init: Use proper error numbers
x86: Add a way to reinit the cpu
x86: dts: Add device-tree labels for rtc and reset
x86: Update a stale comment about ifdtool
x86: Support SPL and TPL
x86: Support booting with TPL
x86: Add a handoff header file
x86: broadwell: Improve SDRAM debugging output
x86: broadwell: Allow SDRAM init from SPL
x86: Move init of debug UART to cpu.c
x86: broadwell: Split CPU init
x86: Add support for starting from SPL/TPL
x86: Allow 16-bit init to be in TPL
x86: broadwell: Allow booting from SPL
x86: broadwell: Select refcode and CPU code for SPL
x86: Add common Intel code for SPL
x86: Support saving MRC data from SPL
x86: Add a simple TPL implementations
x86: mrccache: Add more debugging
x86: Add a sysreset driver for the Intel PCH
x86: Support TPL in Intel common code
x86: Don't set up MTRRs in SPL
x86: Don't generate a bootstage report in SPL
x86: Support PCI VGA ROM when TPL is used
x86: sysreset: Implement the get_last() method
x86: Add documention on the samus flashmap
x86: samus: Update device tree for SPL
x86: samus: Update device tree for verified boot
x86: Update device tree for TPL
x86: Update device tree for Chromium OS verified boot
x86: Fix device-tree indentation
x86: samus: Add a target to boot through TPL

 Makefile                                  |   1 +
 arch/Kconfig                              |  30 +
 arch/x86/Kconfig                          |  10 +-
 arch/x86/Makefile                         |  16 +-
 arch/x86/cpu/Makefile                     |  15 +-
 arch/x86/cpu/broadwell/Kconfig            |   1 +
 arch/x86/cpu/broadwell/Makefile           |  23 +-
 arch/x86/cpu/broadwell/cpu.c              | 676 +--------------------
 arch/x86/cpu/broadwell/cpu_from_spl.c     |  63 ++
 arch/x86/cpu/broadwell/cpu_full.c         | 694 ++++++++++++++++++++++
 arch/x86/cpu/broadwell/northbridge.c      |  93 +++
 arch/x86/cpu/broadwell/sdram.c            | 136 +----
 arch/x86/cpu/i386/cpu.c                   | 113 ++--
 arch/x86/cpu/intel_common/Makefile        |  17 +-
 arch/x86/cpu/intel_common/car.S           |   2 +-
 arch/x86/cpu/intel_common/cpu_from_spl.c  |  27 +
 arch/x86/cpu/mp_init.c                    |  10 +-
 arch/x86/cpu/start64.S                    |   2 +-
 arch/x86/cpu/start_from_spl.S             |  71 +++
 arch/x86/cpu/start_from_tpl.S             |  50 ++
 arch/x86/cpu/u-boot-spl.lds               |   2 +-
 arch/x86/cpu/x86_64/cpu.c                 |   5 +
 arch/x86/dts/chromebook_samus.dts         |  60 +-
 arch/x86/dts/reset.dtsi                   |   2 +-
 arch/x86/dts/rtc.dtsi                     |   2 +-
 arch/x86/dts/u-boot.dtsi                  | 154 +++--
 arch/x86/include/asm/handoff.h            |  15 +
 arch/x86/include/asm/mrccache.h           |  11 +
 arch/x86/include/asm/spl.h                |  17 +-
 arch/x86/include/asm/u-boot-x86.h         |  20 +
 arch/x86/lib/Makefile                     |   9 +-
 arch/x86/lib/bootm.c                      |   2 +-
 arch/x86/lib/init_helpers.c               |   5 +-
 arch/x86/lib/mrccache.c                   |  52 +-
 arch/x86/lib/spl.c                        |  44 +-
 arch/x86/lib/tpl.c                        | 118 ++++
 board/google/Kconfig                      |   8 +
 board/google/chromebook_samus/Kconfig     |  14 +-
 board/google/chromebook_samus/MAINTAINERS |   7 +
 configs/chromebook_samus_tpl_defconfig    |  80 +++
 doc/README.x86                            |  14 +
 drivers/core/ofnode.c                     |   2 +-
 drivers/misc/cros_ec.c                    |   2 +-
 drivers/pci/pci_rom.c                     |   2 +-
 drivers/sysreset/Kconfig                  |   9 +
 drivers/sysreset/Makefile                 |   1 +
 drivers/sysreset/sysreset_intel_pch.c     | 125 ++++
 drivers/sysreset/sysreset_x86.c           |   6 +
 include/configs/chromebook_link.h         |   3 -
 include/configs/chromebook_samus.h        |   3 +
 include/configs/qemu-x86.h                |   3 -
 scripts/Makefile.spl                      |  24 +-
 tools/binman/bsection.py                  |   5 +-
 tools/binman/control.py                   |   4 +-
 tools/binman/etype/section.py             |   3 +-
 tools/binman/etype/text.py                |   4 +-
 tools/binman/etype/vblock.py              |   1 +
 57 files changed, 1933 insertions(+), 955 deletions(-)
 create mode 100644 arch/x86/cpu/broadwell/cpu_from_spl.c
 create mode 100644 arch/x86/cpu/broadwell/cpu_full.c
 create mode 100644 arch/x86/cpu/intel_common/cpu_from_spl.c
 create mode 100644 arch/x86/cpu/start_from_spl.S
 create mode 100644 arch/x86/cpu/start_from_tpl.S
 create mode 100644 arch/x86/include/asm/handoff.h
 create mode 100644 arch/x86/lib/tpl.c
 create mode 100644 configs/chromebook_samus_tpl_defconfig
 create mode 100644 drivers/sysreset/sysreset_intel_pch.c
Signature · 1 line
2.20.1.495.gaa96b0ce6b-goog