9 Commits

Author SHA1 Message Date
Simon Glass
7477fe4d9b efi: Allow excluding efi_main()
In some cases this function may be provided outside the library, e.g. by
a Rust main program. Add a Kconfig to control this and refactor the code
so that it is optional.

Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-11-12 08:40:05 -07:00
Simon Glass
b304fb16d7 efi: Use the console mux by default with the EFI app
It is handy to have the pager in the app, since some output can be quite
long. Enable the console mux since the pager feature depends on it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-02 08:45:36 -06:00
Simon Glass
480be6d905 efi: Enable the console pager for the app
The app can produce quite a bit of output, so enable the pager feature.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-08-26 14:36:07 -06:00
Simon Glass
d50a7577e1 efi: x86: Show app banner on startup
Print a line that indicates if this is the app, to match the line shown
for the payload, i.e.:

   Model: EFI x86 Application

or:

   Model: EFI x86 Payload

or:

   Model: EFI ARM Application

Drop CONFIG_DISPLAY_BOARDINFO_LATE as it is not needed.

Note that there is no (generic) stub for ARM.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-06-30 14:26:16 -06:00
Simon Glass
207bf34de7 boot: efi: Use an event to relocate the OS
Rather than a weak function, use the recently added event to adjust the
OS load-address. Tidy up the code a little while here.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-06-05 14:42:47 -06:00
Simon Glass
21ae2207d5 efi: Provide an easy way to debug with gdb
Add a Kconfig option to easily enable debugging of the app using the
recommended method. Provide some docs too.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-06-02 08:25:41 -06:00
Simon Glass
a07abd67da efi: Create a new CONFIG_EFI
Create a Kconfig which indicates that EFI functionality is in use,
either as a client (EFI app / stub) or provider (EFI loader). This will
make it easier to share code between these two parts of U-Boot

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-28 08:02:11 +01:00
Simon Glass
ca1f2dbd8e efi: Rename CONFIG_EFI to CONFIG_EFI_CLIENT
The generic name 'EFI' would be more useful for common EFI features. At
present it just refers to the EFI app and stub, which is confusing.

Rename it to EFI_CLIENT

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-28 08:02:11 +01:00
Simon Glass
5f4327ec9f efi: Rename the lib/efi directory
This directory was created when U-Boot gained the ability to run as an
EFI app in 2015. Since then the EFI-loader feature has been added.

The code in lib/efi is not actually used by the loader, so the name is
confusing.

Rename the directory to efi_client to indicate that it includes files
just for U-Boot being a client of EFI, i.e. the EFI app and stub.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-28 08:02:11 +01:00