From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Tom Rini <trini@konsulko.com>, Simon Glass <sjg@chromium.org>,
Devarsh Thakkar <devarsht@ti.com>,
Gary Bisson <bisson.gary@gmail.com>,
Greg Malysa <greg.malysa@timesys.com>,
Heinrich Schuchardt <xypron.glpk@gmx.de>,
Jerome Forissier <jerome.forissier@linaro.org>,
Julien Masson <jmasson@baylibre.com>,
Lukas Funke <lukas.funke@weidmueller.com>,
Marek Vasut <marek.vasut+renesas@mailbox.org>,
Marek Vasut <marex@denx.de>,
Mattijs Korpershoek <mkorpershoek@baylibre.com>,
Michael Trimarchi <michael@amarulasolutions.com>,
Michal Simek <michal.simek@amd.com>,
Nathan Barrett-Morrison <nathan.morrison@timesys.com>,
Oliver Gaskell <Oliver.Gaskell@analog.com>,
Paul Kocialkowski <contact@paulk.fr>, Peng Fan <peng.fan@nxp.com>,
Quentin Schulz <quentin.schulz@cherry.de>,
Samuel Holland <samuel@sholland.org>,
Sean Anderson <seanga2@gmail.com>,
Sughosh Ganu <sughosh.ganu@linaro.org>,
Trevor Woerner <twoerner@gmail.com>
Subject: [PATCH 00/15] vbe: Series part F
Date: Thu, 9 Jan 2025 05:29:55 -0700 [thread overview]
Message-ID: <20250109123010.4005298-1-sjg@chromium.org> (raw)
This includes various patches towards implementing the VBE abrec
bootmeth in U-Boot. It mostly focuses on introducing a relocating
SPL-loader so that VBE can run in the limited amount of SRAM available
on many devices.
Another minor new feature is support in VBE for specifying the image
phase when loading from a FIT. This allows a single FIT to include
images for several boot phases, thus simplifying image-creation.
One lingering niggle in this series is that it has a different code path
for sandbox, since it does not support the relocating jump. It should be
possible to resolve this with additional work, but I have not attempted
this so far.
Again, only MMC is supported so far.
Looking ahead, series G will have some more plumbing and H some rk3399
pieces. That should be enough to complete these feature.
Here is a run in my lab, with the VBE ABrec bootmeth. You can see that
VPL runs before memory is set up. SPL sets up memory and can be upgraded
in the field reliably.
$ ub-int vbe
Building U-Boot in sourcedir for rk3399-generic
Bootstrapping U-Boot from dir /tmp/b/rk3399-generic
Writing U-Boot using method rockchip
U-Boot TPL 2025.01-rc3-00345-gdfbdbf1eb56c-dirty (Jan 08 2025 - 10:47:58)
Trying to boot from vbe_abrec
load: Firefly-RK3399 Board
Using 'config-3' configuration
Trying 'image-vpl' firmware subimage
Using 'config-3' configuration
Trying 'fdt-3' fdt subimage
U-Boot VPL 2025.01-rc3-00345-gdfbdbf1eb56c-dirty (Jan 08 2025 - 10:47:58)
Trying to boot from vbe_abrec
load: Firefly-RK3399 Board
Starting with empty state
VBE: Firmware pick A at 800000
Using 'config-3' configuration
Trying 'spl' firmware subimage
Using 'config-3' configuration
Trying 'fdt-3' fdt subimage
Channel 0: DDR3, 800MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
Channel 1: DDR3, 800MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
256B stride
U-Boot SPL 2025.01-rc3-00345-gdfbdbf1eb56c-dirty (Jan 08 2025 - 10:47:58 -0700)
Trying to boot from vbe_abrec
load: Firefly-RK3399 Board
VBE: Firmware pick A at 900000
load_simple_fit: Skip load 'atf-5': image size is 0!
Relocating bloblist ff8eff00 to 100000: done
ns16550_serial serial@ff1a0000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19
U-Boot 2025.01-rc3-00345-gdfbdbf1eb56c-dirty (Jan 08 2025 - 10:47:58 -0700)
SoC: Rockchip rk3399
Reset cause: POR
Model: Firefly-RK3399 Board
DRAM: 4 GiB (effective 3.9 GiB)
Core: 314 devices, 33 uclasses, devicetree: separate
MMC: mmc@fe310000: 3, mmc@fe320000: 1, mmc@fe330000: 0
Loading Environment from SPIFlash... Invalid bus 0 (err=-19)
*** Warning - spi_flash_probe_bus_cs() failed, using default environment
In: serial,usbkbd
Out: serial,vidconsole
Err: serial,vidconsole
Model: Firefly-RK3399 Board
Net: PMIC: RK808
eth0: ethernet@fe300000
starting USB...
Bus usb@fe380000: USB EHCI 1.00
Bus usb@fe3a0000: USB OHCI 1.0
Bus usb@fe3c0000: USB EHCI 1.00
Bus usb@fe3e0000: USB OHCI 1.0
Bus usb@fe900000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus usb@fe380000 for devices... 1 USB Device(s) found
scanning bus usb@fe3a0000 for devices... 1 USB Device(s) found
scanning bus usb@fe3c0000 for devices... 2 USB Device(s) found
scanning bus usb@fe3e0000 for devices... 1 USB Device(s) found
scanning bus usb@fe900000 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot: 0
Simon Glass (15):
vbe: Split out some VBE code into a common file
vbe: Split out reading a FIT into a common file
vbe: Allocate space for the FIT header
vbe: Allow VBE to load FITs on any architecture
vbe: Tidy up error checking with blk_read()
vbe: Handle loading from an unaligned offset
vbe: Allow loading loadables if there is no firmware
vbe: Support loading an FDT from the FIT
spl: Add fields for VBE
spl: Add a type for the jumper function
spl: Add support for a relocating jump to the next phase
spl: Plumb in the relocating loader
vbe: Support loading an FDT with the relocating loader
vbe: Support loading SPL images
vbe: Update simple-fw to support using the SPL loader
boot/Makefile | 2 +-
boot/vbe_common.c | 362 +++++++++++++++++++++++++++++++++++++++++
boot/vbe_common.h | 173 ++++++++++++++++++++
boot/vbe_simple.c | 99 +++--------
boot/vbe_simple.h | 15 +-
boot/vbe_simple_fw.c | 207 +++++++++--------------
common/spl/Kconfig | 8 +
common/spl/Kconfig.tpl | 8 +
common/spl/Kconfig.vpl | 8 +
common/spl/Makefile | 1 +
common/spl/spl.c | 15 +-
common/spl/spl_reloc.c | 183 +++++++++++++++++++++
include/spl.h | 90 +++++++++-
13 files changed, 948 insertions(+), 223 deletions(-)
create mode 100644 boot/vbe_common.c
create mode 100644 boot/vbe_common.h
create mode 100644 common/spl/spl_reloc.c
--
2.34.1
next reply other threads:[~2025-01-09 12:30 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-09 12:29 Simon Glass [this message]
2025-01-09 12:29 ` [PATCH 01/15] vbe: Split out some VBE code into a common file Simon Glass
2025-01-14 1:22 ` Tom Rini
2025-01-14 12:58 ` Simon Glass
2025-01-14 13:26 ` Simon Glass
2025-01-14 16:58 ` Tom Rini
2025-01-14 17:33 ` Tom Rini
2025-01-15 1:18 ` Simon Glass
2025-01-15 1:41 ` Tom Rini
2025-01-15 2:48 ` Simon Glass
2025-01-15 14:10 ` Simon Glass
2025-01-09 12:29 ` [PATCH 02/15] vbe: Split out reading a FIT " Simon Glass
2025-01-11 22:54 ` Tom Rini
2025-01-13 20:03 ` Simon Glass
2025-01-13 20:44 ` Tom Rini
2025-01-14 0:13 ` Simon Glass
2025-01-14 1:22 ` Tom Rini
2025-01-15 14:43 ` Tom Rini
2025-01-15 23:21 ` Simon Glass
2025-01-09 12:29 ` [PATCH 03/15] vbe: Allocate space for the FIT header Simon Glass
2025-01-09 12:29 ` [PATCH 04/15] vbe: Allow VBE to load FITs on any architecture Simon Glass
2025-01-09 12:30 ` [PATCH 05/15] vbe: Tidy up error checking with blk_read() Simon Glass
2025-01-09 12:30 ` [PATCH 06/15] vbe: Handle loading from an unaligned offset Simon Glass
2025-01-09 12:30 ` [PATCH 07/15] vbe: Allow loading loadables if there is no firmware Simon Glass
2025-01-09 12:30 ` [PATCH 08/15] vbe: Support loading an FDT from the FIT Simon Glass
2025-01-09 12:30 ` [PATCH 09/15] spl: Add fields for VBE Simon Glass
2025-01-09 12:30 ` [PATCH 10/15] spl: Add a type for the jumper function Simon Glass
2025-01-09 12:30 ` [PATCH 11/15] spl: Add support for a relocating jump to the next phase Simon Glass
2025-01-09 12:30 ` [PATCH 12/15] spl: Plumb in the relocating loader Simon Glass
2025-01-09 12:30 ` [PATCH 13/15] vbe: Support loading an FDT with " Simon Glass
2025-01-09 12:30 ` [PATCH 14/15] vbe: Support loading SPL images Simon Glass
2025-01-09 12:30 ` [PATCH 15/15] vbe: Update simple-fw to support using the SPL loader Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250109123010.4005298-1-sjg@chromium.org \
--to=sjg@chromium.org \
--cc=Oliver.Gaskell@analog.com \
--cc=bisson.gary@gmail.com \
--cc=contact@paulk.fr \
--cc=devarsht@ti.com \
--cc=greg.malysa@timesys.com \
--cc=jerome.forissier@linaro.org \
--cc=jmasson@baylibre.com \
--cc=lukas.funke@weidmueller.com \
--cc=marek.vasut+renesas@mailbox.org \
--cc=marex@denx.de \
--cc=michael@amarulasolutions.com \
--cc=michal.simek@amd.com \
--cc=mkorpershoek@baylibre.com \
--cc=nathan.morrison@timesys.com \
--cc=peng.fan@nxp.com \
--cc=quentin.schulz@cherry.de \
--cc=samuel@sholland.org \
--cc=seanga2@gmail.com \
--cc=sughosh.ganu@linaro.org \
--cc=trini@konsulko.com \
--cc=twoerner@gmail.com \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.