diff mbox series

[v4,9/9] x86: Add documentation for the chain-load feature

Message ID 20200426151302.93418-9-sjg@chromium.org
State Accepted
Commit 249154672d43db6c7978fd9b67d224e9dec09867
Headers show
Series x86: Improve support for chain-loading U-Boot | expand

Commit Message

Simon Glass April 26, 2020, 3:13 p.m. UTC
Add a few notes about this feature, which is aimed for development.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

Changes in v4: None
Changes in v3: None
Changes in v2: None

 doc/arch/x86.rst | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

Comments

Bin Meng April 30, 2020, 9:33 a.m. UTC | #1
On Sun, Apr 26, 2020 at 11:13 PM Simon Glass <sjg at chromium.org> wrote:
>
> Add a few notes about this feature, which is aimed for development.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> Changes in v4: None
> Changes in v3: None
> Changes in v2: None
>
>  doc/arch/x86.rst | 28 ++++++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
>

Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
diff mbox series

Patch

diff --git a/doc/arch/x86.rst b/doc/arch/x86.rst
index a441738ad1..c6b70ce61a 100644
--- a/doc/arch/x86.rst
+++ b/doc/arch/x86.rst
@@ -712,6 +712,34 @@  to load a 'u-boot-payload.efi', see below test logs on QEMU.
 See :doc:`../uefi/u-boot_on_efi` and :doc:`../uefi/uefi` for details of
 EFI support in U-Boot.
 
+Chain-loading
+-------------
+U-Boot can be chain-loaded from another bootloader, such as coreboot or
+Slim Bootloader. Typically this is done by building for targets 'coreboot' or
+'slimbootloader'.
+
+For example, at present we have a 'coreboot' target but this runs very
+different code from the bare-metal targets, such as coral. There is very little
+in common between them.
+
+It is useful to be able to boot the same U-Boot on a device, with or without a
+first-stage bootloader. For example, with chromebook_coral, it is helpful for
+testing to be able to boot the same U-Boot (complete with FSP) on bare metal
+and from coreboot. It allows checking of things like CPU speed, comparing
+registers, ACPI tables and the like.
+
+To do this you can use ll_boot_init() in appropriate places to skip init that
+has already been done by the previous stage. This works by setting a
+GD_FLG_NO_LL_INIT flag when U-Boot detects that it is running from another
+bootloader.
+
+With this feature, you can build a bare-metal target and boot it from
+coreboot, for example.
+
+Note that this is a development feature only. It is not intended for use in
+production environments. Also it is not currently part of the automated tests
+so may break in the future.
+
 TODO List
 ---------
 - Audio