Simon Glass [Sun, 5 Feb 2023 22:44:26 +0000 (15:44 -0700)]
Correct SPL uses of USB_MUSB_HOST
This converts 2 usages of this option to the non-SPL form, since there is
no SPL_USB_MUSB_HOST defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 6 Feb 2023 00:55:28 +0000 (17:55 -0700)]
Correct SPL uses of USB_KEYBOARD
This converts 2 usages of this option to the non-SPL form, since there is
no SPL_USB_KEYBOARD defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:44:23 +0000 (15:44 -0700)]
Correct SPL use of USB_FUNCTION_FASTBOOT
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_USB_FUNCTION_FASTBOOT defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Simon Glass [Sun, 5 Feb 2023 22:44:20 +0000 (15:44 -0700)]
Correct SPL use of UDP_FUNCTION_FASTBOOT
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_UDP_FUNCTION_FASTBOOT defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Simon Glass [Sun, 5 Feb 2023 22:44:19 +0000 (15:44 -0700)]
Correct SPL use of TPM_RNG
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_TPM_RNG defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 6 Feb 2023 00:55:21 +0000 (17:55 -0700)]
Correct SPL uses of TEN64_CONTROLLER
This converts 2 usages of this option to the non-SPL form, since there is
no SPL_TEN64_CONTROLLER defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:44:17 +0000 (15:44 -0700)]
Correct SPL use of TEE
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_TEE defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:44:16 +0000 (15:44 -0700)]
Correct SPL use of TARGET_PG_WCOM_SELI8
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_TARGET_PG_WCOM_SELI8 defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Aleksandar Gerasimovski <aleksandar.gerasimovski@hitachienergy.com>
Simon Glass [Sun, 5 Feb 2023 22:41:00 +0000 (15:41 -0700)]
Correct SPL use of TARGET_PG_WCOM_EXPU1
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_TARGET_PG_WCOM_EXPU1 defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Aleksandar Gerasimovski <aleksandar.gerasimovski@hitachienergy.com>
Simon Glass [Sun, 5 Feb 2023 22:40:59 +0000 (15:40 -0700)]
Correct SPL use of TARGET_MX6UL_9X9_EVK
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_TARGET_MX6UL_9X9_EVK defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 6 Feb 2023 00:55:16 +0000 (17:55 -0700)]
Correct SPL uses of TARGET_LX2160ARDB
This converts 3 usages of this option to the non-SPL form, since there is
no SPL_TARGET_LX2160ARDB defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:40:57 +0000 (15:40 -0700)]
Correct SPL use of SYS_MEM_RSVD_FOR_MMU
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_SYS_MEM_RSVD_FOR_MMU defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:40:56 +0000 (15:40 -0700)]
Correct SPL uses of SYS_LONGHELP
This converts 5 usages of this option to the non-SPL form, since there is
no SPL_SYS_LONGHELP defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:40:55 +0000 (15:40 -0700)]
Correct SPL use of SYS_FSL_ERRATUM_A010539
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_SYS_FSL_ERRATUM_A010539 defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:40:54 +0000 (15:40 -0700)]
Correct SPL use of SUPPORT_EMMC_RPMB
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_SUPPORT_EMMC_RPMB defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Simon Glass [Sun, 5 Feb 2023 22:40:53 +0000 (15:40 -0700)]
Correct SPL use of STM32MP15X_STM32IMAGE
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_STM32MP15X_STM32IMAGE defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 6 Feb 2023 00:55:10 +0000 (17:55 -0700)]
Correct SPL use of SPLASH_SOURCE
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_SPLASH_SOURCE defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:40:49 +0000 (15:40 -0700)]
Correct SPL use of SL28_SPL_LOADS_OPTEE_BL32
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_SL28_SPL_LOADS_OPTEE_BL32 defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:40:48 +0000 (15:40 -0700)]
Correct SPL use of SL28CPLD
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_SL28CPLD defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:40:47 +0000 (15:40 -0700)]
Correct SPL uses of SIFIVE_OTP
This converts 2 usages of this option to the non-SPL form, since there is
no SPL_SIFIVE_OTP defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 6 Feb 2023 00:55:03 +0000 (17:55 -0700)]
Correct SPL uses of SAVE_PREV_BL_INITRAMFS_START_ADDR
This converts 2 usages of this option to the non-SPL form, since there is
no SPL_SAVE_PREV_BL_INITRAMFS_START_ADDR defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:40:44 +0000 (15:40 -0700)]
Correct SPL uses of SAVE_PREV_BL_FDT_ADDR
This converts 2 usages of this option to the non-SPL form, since there is
no SPL_SAVE_PREV_BL_FDT_ADDR defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:40:43 +0000 (15:40 -0700)]
Correct SPL uses of SANDBOX_CLK_CCF
This converts 12 usages of this option to the non-SPL form, since there is
no SPL_SANDBOX_CLK_CCF defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:40:42 +0000 (15:40 -0700)]
Correct SPL use of SANDBOX
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_SANDBOX defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:40:40 +0000 (15:40 -0700)]
Correct SPL uses of ROCKCHIP_EFUSE
This converts 2 usages of this option to the non-SPL form, since there is
no SPL_ROCKCHIP_EFUSE defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:40:39 +0000 (15:40 -0700)]
Correct SPL use of RESV_RAM
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_RESV_RAM defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:40:38 +0000 (15:40 -0700)]
Correct SPL use of RENESAS_SDHI
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_RENESAS_SDHI defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:40:37 +0000 (15:40 -0700)]
Correct SPL use of REGEX
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_REGEX defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:40:35 +0000 (15:40 -0700)]
Correct SPL uses of PMIC_STPMIC1
This converts 2 usages of this option to the non-SPL form, since there is
no SPL_PMIC_STPMIC1 defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:40:30 +0000 (15:40 -0700)]
Correct SPL uses of PG_WCOM_UBOOT_UPDATE
This converts 2 usages of this option to the non-SPL form, since there is
no SPL_PG_WCOM_UBOOT_UPDATE defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Aleksandar Gerasimovski <aleksandar.gerasimovski@hitachienergy.com>
Simon Glass [Sun, 5 Feb 2023 22:40:29 +0000 (15:40 -0700)]
Correct SPL uses of PG_WCOM_UBOOT_BOOTPACKAGE
This converts 2 usages of this option to the non-SPL form, since there is
no SPL_PG_WCOM_UBOOT_BOOTPACKAGE defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Aleksandar Gerasimovski <aleksandar.gerasimovski@hitachienergy.com>
Simon Glass [Sun, 5 Feb 2023 22:40:27 +0000 (15:40 -0700)]
Correct SPL use of PARTITION_TYPE_GUID
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_PARTITION_TYPE_GUID defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:40:25 +0000 (15:40 -0700)]
Correct SPL use of OF_EMBED
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_OF_EMBED defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:40:23 +0000 (15:40 -0700)]
Correct SPL use of OCTEON_SERIAL_PCIE_CONSOLE
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_OCTEON_SERIAL_PCIE_CONSOLE defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:40:22 +0000 (15:40 -0700)]
Correct SPL use of OCTEON_SERIAL_BOOTCMD
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_OCTEON_SERIAL_BOOTCMD defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:40:20 +0000 (15:40 -0700)]
Correct SPL use of NETDEVICES
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_NETDEVICES defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:40:19 +0000 (15:40 -0700)]
Correct SPL uses of NEEDS_MANUAL_RELOC
This converts 3 usages of this option to the non-SPL form, since there is
no SPL_NEEDS_MANUAL_RELOC defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:40:17 +0000 (15:40 -0700)]
Correct SPL uses of MTD
This converts 2 usages of this option to the non-SPL form, since there is
no SPL_MTD defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:40:15 +0000 (15:40 -0700)]
Correct SPL use of MIPS_CM
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_MIPS_CM defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:40:14 +0000 (15:40 -0700)]
Correct SPL uses of MICROBLAZE
This converts 2 usages of this option to the non-SPL form, since there is
no SPL_MICROBLAZE defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:40:13 +0000 (15:40 -0700)]
Correct SPL uses of LMB
This converts 9 usages of this option to the non-SPL form, since there is
no SPL_LMB defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:40:11 +0000 (15:40 -0700)]
Correct SPL uses of IMX_MODULE_FUSE
This converts 6 usages of this option to the non-SPL form, since there is
no SPL_IMX_MODULE_FUSE defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:40:10 +0000 (15:40 -0700)]
Correct SPL use of IMX8MN_BEACON_2GB_LPDDR
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_IMX8MN_BEACON_2GB_LPDDR defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Adam Ford <aford173@gmail.com>
Simon Glass [Sun, 5 Feb 2023 22:40:07 +0000 (15:40 -0700)]
Correct SPL uses of HW_WATCHDOG
This converts 2 usages of this option to the non-SPL form, since there is
no SPL_HW_WATCHDOG defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Simon Glass [Sun, 5 Feb 2023 22:40:06 +0000 (15:40 -0700)]
Correct SPL use of HUSH_PARSER
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_HUSH_PARSER defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:40:03 +0000 (15:40 -0700)]
Correct SPL use of FS_EROFS
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_FS_EROFS defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Huang Jianan <jnhuang95@gmail.com>
Heinrich Schuchardt [Fri, 10 Feb 2023 08:06:17 +0000 (09:06 +0100)]
efi_loader: static efi_query_variable_info_runtime()
This function is not used externally and hence should be static.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Fri, 10 Feb 2023 08:05:03 +0000 (09:05 +0100)]
efi_loader: make gop_blt() static
This function is not used externally.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Fri, 10 Feb 2023 08:02:56 +0000 (09:02 +0100)]
efi_loader: include definition of allow_unaligned()
Add missing include.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Fri, 10 Feb 2023 08:01:13 +0000 (09:01 +0100)]
efi_loader: provide definition for efi_add_known_memory()
We should provide a definition in an include for efi_add_known_memory().
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Fri, 10 Feb 2023 07:56:06 +0000 (08:56 +0100)]
efi_loader: static functions in efi_runtime.c
Functions that are not used externally should be static.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Fri, 10 Feb 2023 07:51:41 +0000 (08:51 +0100)]
efi_loader: static functions in efi_console.c
Define function set_shift_mask() as static as it is not used externally.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Fri, 10 Feb 2023 07:50:06 +0000 (08:50 +0100)]
efi_loader: static functions in efi_boottime.c
Make functions that are no used externally static.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Fri, 10 Feb 2023 07:45:38 +0000 (08:45 +0100)]
efi_loader: static functions in helloworld.c
Make functions that are not used externally static.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Fri, 10 Feb 2023 08:19:41 +0000 (09:19 +0100)]
efi_loader: fix efi_ecpt_register()
num_entries should be unsigned to avoid warnings. As the target field is
u16 we should use this type.
lib/efi_loader/efi_conformance.c: In function ‘efi_ecpt_register’:
lib/efi_loader/efi_conformance.c:30:33: warning:
conversion to ‘long unsigned int’ from ‘int’ may change
the sign of the result [-Wsign-conversion]
30 | ecpt_size = num_entries * sizeof(efi_guid_t)
| ^
lib/efi_loader/efi_conformance.c:46:36: warning:
conversion from ‘int’ to ‘u16’ {aka ‘short unsigned int’}
may change value [-Wconversion]
46 | ecpt->number_of_profiles = num_entries;
| ^~~~~~~~~~~
Fixes:
6b92c1735205 ("efi: Create ECPT table")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Fri, 10 Feb 2023 07:23:24 +0000 (08:23 +0100)]
efi_loader: add definition for efi_main()
U-Boot provides multiple EFI applications. The entry point is called
efi_main(). Provide a definition for this function. This avoids
build warnings like
lib/efi_loader/initrddump.c:468:21: warning:
no previous prototype for ‘efi_main’ [-Wmissing-prototypes]
468 | efi_status_t EFIAPI efi_main(efi_handle_t image_handle,
| ^~~~~~~~
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Fri, 10 Feb 2023 07:13:23 +0000 (08:13 +0100)]
efi_loader: fix struct efi_input_key
The UEFI specification defines filed UnicodeChar as CHAR16. We use
u16 for CHAR16 throughout our code. The change fixes the following errors:
lib/efi_loader/initrddump.c: In function ‘efi_input’:
lib/efi_loader/initrddump.c:218:38: warning:
comparison is always false due to limited range of data type
[-Wtype-limits]
218 | if (key.unicode_char >= 0xD800 && key.unicode_char <= 0xDBFF)
| ^~
lib/efi_loader/initrddump.c:218:68: warning:
comparison is always true due to limited range of data type
[-Wtype-limits]
218 | if (key.unicode_char >= 0xD800 && key.unicode_char <= 0xDBFF)
| ^~
Fixes:
867a6ac86dd8 ("efi: Add start-up library code")
Reported-by: Marek Vasut <marex@denx.de>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Fri, 10 Feb 2023 07:09:40 +0000 (08:09 +0100)]
efi_loader: make get_load_options() static
In program initrddump.efi function get_load_options() can be static.
This avoids a warning when building with 'make W=1':
lib/efi_loader/initrddump.c:442:6: warning:
no previous prototype for ‘get_load_options’ [-Wmissing-prototypes]
442 | u16 *get_load_options(void)
| ^~~~~~~~~~~~~~~~
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Wed, 8 Feb 2023 08:57:00 +0000 (09:57 +0100)]
efi_loader: enable eficonfig command by default
The eficonfig command is required to set boot options.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Wed, 8 Feb 2023 12:56:33 +0000 (13:56 +0100)]
cmd: CONFIG_CMD_EFICONFIG requires CONFIG_MENU
The eficonfig command invokes functions implemented in common/menu.c like
* menu_default_set()
* menu_get_choice()
* menu_destroy()
* menu_item_add()
Fixes:
87d791423ac6 ("eficonfig: menu-driven addition of UEFI boot option")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Masahisa Kojima [Thu, 2 Feb 2023 13:53:35 +0000 (22:53 +0900)]
efi_loader: update attribute check for QueryVariableInfo()
Current U-Boot supports two EFI variable service, U-Boot own
implementation and op-tee based StMM variable service.
With ACS Security Interface Extension(SIE) v22.10_SIE_REL1.1.0,
there are several failure items of QueryVariableInfo().
Current attribute check for QueryVariableInfo() was implemented
based on the Self Certification Test (SCT) II Case Specification,
June 2017, chapter 4.1.4 QueryVariableInfo().
This test case specification is outdated and don't align at all
with the SCT test case code, and UEFI specification v2.10 does
not clearly define the priority of the attribute check.
For U-Boot standard case that EFI variables are stored in a file
in the ESP, this commit modifies the attribute check to get align
to the EDK2 implementation.
For latter case(op-tee based StMM variable service), parameter check
should be delegated to StMM.
Now all ACS SIE QueryVariableInfo() test cases passed both EFI variable
storage implementations.
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Acked-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Masahisa Kojima [Thu, 2 Feb 2023 09:24:45 +0000 (18:24 +0900)]
eficonfig: set EFICONFIG_ENTRY_NUM_MAX to INT_MAX - 1
eficonfig_append_menu_entryi() accepts the number of entries
less than or equal to EFICONFIG_ENTRY_NUM_MAX.
EFICONFIG_ENTRY_NUM_MAX is currently set as INT_MAX, so
the invalid menu count check(efi_menu->count > EFICONFIG_ENTRY_NUM_MAX)
in eficonfig_process_common() is always false.
This commit sets EFICONFIG_ENTRY_NUM_MAX to (INT_MAX - 1).
Reported-by: Coverity (CID 435659)
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Masahisa Kojima [Thu, 2 Feb 2023 09:24:44 +0000 (18:24 +0900)]
eficonfig: CTRL+S to save the boot order
The change boot order menu in eficonfig can have at most INT_MAX lines
and it is troublesome to scroll down to the "Save" entry.
This commit assigns CTRL+S to save the boot order.
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Acked-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Masahisa Kojima [Thu, 2 Feb 2023 09:24:43 +0000 (18:24 +0900)]
menu: remove CTRL+C to quit
On the sandbox called without "--terminal raw" CTRL+C leaves U-Boot,
"ESC/CTRL+C to quit" is misleading.
Let's remove CTRL+C to quit key handling from bootmenu and eficonfig menu.
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Masahisa Kojima [Sat, 28 Jan 2023 04:56:14 +0000 (13:56 +0900)]
efi: use 32-bit alignment for efi_guid_t
Current U-Boot implements 64-bit boundary for efi_guid_t structure.
It follows the UEFI specification, page 21 of the UEFI Specification v2.10
says about EFI_GUID:
128-bit buffer containing a unique identifier value. Unless
otherwise specified, aligned on a 64-bit boundary.
On the other hand, page 163 of the UEFI specification v2.10 and
EDK2 reference implementation both define EFI_GUID as
struct { u32 a; u16; b; u16 c; u8 d[8]; }; and so the implied
alignment is 32-bit not 64-bit like U-Boot efi_guid_t.
Due to this alignment difference, EDK2 application "CapsuleApp.efi -P"
does not work as expected.
This calls EFI_FIRMWARE_MANAGEMENT_PROTOCOL.GetImageInfo()
and dump the EFI_FIRMWARE_IMAGE_DESCRIPTOR structure,
offsetof(EFI_FIRMWARE_IMAGE_DESCRIPTOR, ImageTypeId) is different,
8 in U-Boot and 4 in EDK2(CapsuleApp.efi).
Here is the wrong EFI_GUID dump.
wrong dump : ImageTypeId -
00000000-7D83-058B-D550-
474CA19560D8
expected : ImageTypeId -
058B7D83-50D5-4C47-A195-
60D86AD341C4
EFI_FIRMWARE_IMAGE_DESCRIPTOR structure is defined in UEFI specification:
typedef struct {
UINT8 ImageIndex;
EFI_GUID ImageTypeId;
UINT64 ImageId
<snip>
} EFI_FIRMWARE_IMAGE_DESCRIPTOR;
There was the relevant patch for linux kernel to use 32-bit alignment
for efi_guid_t [1].
U-Boot should get aligned to EDK2 reference implementation and
linux kernel.
Due to this alignment change, efi_hii_ref structure in include/efi_api.h
is affected, but it is not used in the current U-Boot code.
[1] https://lore.kernel.org/all/
20190202094119.13230-5-ard.biesheuvel@linaro.org/
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Simon Glass [Sun, 5 Feb 2023 22:30:52 +0000 (15:30 -0700)]
doc: Link to some useful talks
Talks are a great way to learn about U-Boot and have been lost now that
the Denx Wiki has gone away.
These are stored at elinux.org so link to that .
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Heinrich Schuchardt [Fri, 27 Jan 2023 21:00:30 +0000 (22:00 +0100)]
doc: complete setexpr configuration information
Add missing information to the configuration section of the setexpr
man-page.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Heinrich Schuchardt [Sat, 28 Jan 2023 00:11:56 +0000 (01:11 +0100)]
cmd: improve coninfo output formatting
Device name are typically longer than 8 characters. This leads to ragged
output.
Only the I and O bit of the device flags are of interest for the user.
Writing a hexadecimal number is just confusing.
Before the patch the output looked like this:
=> coninfo
List of available devices:
pl011@9000000
00000007 IO stdin stdout stderr
serial
00000003 IO
usbkbd
00000001 I.
With the patch the output looks like this:
=> coninfo
List of available devices
|-- pl011@9000000 (IO)
| |-- stdin
| |-- stdout
| |-- stderr
|-- serial (IO)
|-- usbkbd (I)
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Heinrich Schuchardt [Thu, 19 Jan 2023 15:22:10 +0000 (16:22 +0100)]
buildman: invalid reference to README
The readme file for buildman is called buildman.rst.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:40:01 +0000 (15:40 -0700)]
Correct SPL use of FSL_MC_ENET
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_FSL_MC_ENET defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:39:59 +0000 (15:39 -0700)]
Correct SPL use of FSL_CAAM
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_FSL_CAAM defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:39:57 +0000 (15:39 -0700)]
Correct SPL use of FDT_SIMPLEFB
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_FDT_SIMPLEFB defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:39:56 +0000 (15:39 -0700)]
Correct SPL use of FASTBOOT_MMC_USER_SUPPORT
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_FASTBOOT_MMC_USER_SUPPORT defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:39:53 +0000 (15:39 -0700)]
Correct SPL uses of FASTBOOT_FLASH
This converts 3 usages of this option to the non-SPL form, since there is
no SPL_FASTBOOT_FLASH defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Simon Glass [Sun, 5 Feb 2023 22:39:51 +0000 (15:39 -0700)]
Correct SPL use of EXYNOS7420
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_EXYNOS7420 defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:39:50 +0000 (15:39 -0700)]
Correct SPL use of ENV_WRITEABLE_LIST
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_ENV_WRITEABLE_LIST defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:39:49 +0000 (15:39 -0700)]
Correct SPL uses of ENV_VARS_UBOOT_RUNTIME_CONFIG
This converts 4 usages of this option to the non-SPL form, since there is
no SPL_ENV_VARS_UBOOT_RUNTIME_CONFIG defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:39:48 +0000 (15:39 -0700)]
Correct SPL uses of ENV_IS_IN_UBI
This converts 2 usages of this option to the non-SPL form, since there is
no SPL_ENV_IS_IN_UBI defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:39:47 +0000 (15:39 -0700)]
Correct SPL use of EFI_UNICODE_COLLATION_PROTOCOL2
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_EFI_UNICODE_COLLATION_PROTOCOL2 defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:39:46 +0000 (15:39 -0700)]
Correct SPL use of EFI_TCG2_PROTOCOL
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_EFI_TCG2_PROTOCOL defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:39:43 +0000 (15:39 -0700)]
Correct SPL use of EFI_LOADER_HII
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_EFI_LOADER_HII defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:39:42 +0000 (15:39 -0700)]
Correct SPL uses of EFI_HAVE_CAPSULE_SUPPORT
This converts 13 usages of this option to the non-SPL form, since there is
no SPL_EFI_HAVE_CAPSULE_SUPPORT defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:39:41 +0000 (15:39 -0700)]
Correct SPL use of EFI_DEVICE_PATH_UTIL
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_EFI_DEVICE_PATH_UTIL defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:39:40 +0000 (15:39 -0700)]
Correct SPL use of EFI_APP
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_EFI_APP defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:39:39 +0000 (15:39 -0700)]
Correct SPL uses of DWC_ETH_QOS
This converts 3 usages of this option to the non-SPL form, since there is
no SPL_DWC_ETH_QOS defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:39:38 +0000 (15:39 -0700)]
Correct SPL uses of DTB_RESELECT
This converts 2 usages of this option to the non-SPL form, since there is
no SPL_DTB_RESELECT defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:39:36 +0000 (15:39 -0700)]
Correct SPL use of DISPLAY_CPUINFO
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_DISPLAY_CPUINFO defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:39:32 +0000 (15:39 -0700)]
Correct SPL use of DEBUG_UART_ZYNQ
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_DEBUG_UART_ZYNQ defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:39:31 +0000 (15:39 -0700)]
Correct SPL uses of CPU_MICROBLAZE
This converts 2 usages of this option to the non-SPL form, since there is
no SPL_CPU_MICROBLAZE defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:36:46 +0000 (15:36 -0700)]
Correct SPL uses of CMD_USB
This converts 8 usages of this option to the non-SPL form, since there is
no SPL_CMD_USB defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:36:45 +0000 (15:36 -0700)]
Correct SPL uses of CMD_TFTPPUT
This converts 3 usages of this option to the non-SPL form, since there is
no SPL_CMD_TFTPPUT defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:36:44 +0000 (15:36 -0700)]
Correct SPL use of CMD_STM32PROG
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_CMD_STM32PROG defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:36:43 +0000 (15:36 -0700)]
Correct SPL use of CMD_STBOARD
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_CMD_STBOARD defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:36:42 +0000 (15:36 -0700)]
Correct SPL use of CMD_SHA1SUM
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_CMD_SHA1SUM defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:36:41 +0000 (15:36 -0700)]
Correct SPL uses of CMD_SF
This converts 2 usages of this option to the non-SPL form, since there is
no SPL_CMD_SF defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:36:40 +0000 (15:36 -0700)]
Correct SPL uses of CMD_SCSI
This converts 2 usages of this option to the non-SPL form, since there is
no SPL_CMD_SCSI defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:36:38 +0000 (15:36 -0700)]
Correct SPL use of CMD_PSTORE
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_CMD_PSTORE defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:36:37 +0000 (15:36 -0700)]
Correct SPL uses of CMD_NVME
This converts 3 usages of this option to the non-SPL form, since there is
no SPL_CMD_NVME defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:36:36 +0000 (15:36 -0700)]
Correct SPL use of CMD_NVEDIT_EFI
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_CMD_NVEDIT_EFI defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 5 Feb 2023 22:36:35 +0000 (15:36 -0700)]
Correct SPL use of CMD_NET
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_CMD_NET defined in Kconfig
Signed-off-by: Simon Glass <sjg@chromium.org>