6 Commits

Author SHA1 Message Date
Heinrich Schuchardt
ea99509b67 efi_client: correct memset() return value
Memset() must return a pointer to the start of the updated memory block.

Fixes: 476476e73b14 ("efi: Add support for loading U-Boot through an EFI stub")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-15 11:36:50 +01:00
Heinrich Schuchardt
033780768e efi_client: don't include asm/global_data.h twice
Remove duplicate #include.

Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-15 11:36:33 +01:00
Heinrich Schuchardt
1a30ddeda9 efi_client: efi_store_memory_map() must return int
The type efi_status_t is not compatible with the return type int.

Let efi_store_memory_map() return -EFAULT instead of a truncated EFI error
code.

Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-06 23:26:28 +01:00
Simon Glass
81ce639e61 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-07-26 07:34:31 +02:00
Simon Glass
0029f2447b 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-07-26 07:34:28 +02:00
Simon Glass
2ea9579523 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-07-26 07:29:31 +02:00