summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-02-10efi_loader: static functions in efi_runtime.cHeinrich Schuchardt
Functions that are not used externally should be static. Signed-off-by: Heinrich Schuchardt <[email protected]>
2023-02-10efi_loader: static functions in efi_console.cHeinrich Schuchardt
Define function set_shift_mask() as static as it is not used externally. Signed-off-by: Heinrich Schuchardt <[email protected]>
2023-02-10efi_loader: static functions in efi_boottime.cHeinrich Schuchardt
Make functions that are no used externally static. Signed-off-by: Heinrich Schuchardt <[email protected]>
2023-02-10efi_loader: static functions in helloworld.cHeinrich Schuchardt
Make functions that are not used externally static. Signed-off-by: Heinrich Schuchardt <[email protected]>
2023-02-10efi_loader: fix efi_ecpt_register()Heinrich Schuchardt
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 <[email protected]>
2023-02-10efi_loader: add definition for efi_main()Heinrich Schuchardt
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 <[email protected]>
2023-02-10efi_loader: fix struct efi_input_keyHeinrich Schuchardt
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 <[email protected]> Signed-off-by: Heinrich Schuchardt <[email protected]>
2023-02-10efi_loader: make get_load_options() staticHeinrich Schuchardt
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 <[email protected]>
2023-02-10efi_loader: enable eficonfig command by defaultHeinrich Schuchardt
The eficonfig command is required to set boot options. Signed-off-by: Heinrich Schuchardt <[email protected]>
2023-02-10cmd: CONFIG_CMD_EFICONFIG requires CONFIG_MENUHeinrich Schuchardt
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 <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
2023-02-10efi_loader: update attribute check for QueryVariableInfo()Masahisa Kojima
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 <[email protected]> Acked-by: Heinrich Schuchardt <[email protected]> Signed-off-by: Heinrich Schuchardt <[email protected]>
2023-02-10eficonfig: set EFICONFIG_ENTRY_NUM_MAX to INT_MAX - 1Masahisa Kojima
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 <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]>
2023-02-10eficonfig: CTRL+S to save the boot orderMasahisa Kojima
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 <[email protected]> Acked-by: Heinrich Schuchardt <[email protected]>
2023-02-10menu: remove CTRL+C to quitMasahisa Kojima
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 <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]>
2023-02-10efi: use 32-bit alignment for efi_guid_tMasahisa Kojima
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/[email protected]/ Cc: Ilias Apalodimas <[email protected]> Signed-off-by: Masahisa Kojima <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
2023-02-10doc: Link to some useful talksSimon Glass
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 <[email protected]> Reviewed-by: Sean Anderson <[email protected]>
2023-02-10doc: complete setexpr configuration informationHeinrich Schuchardt
Add missing information to the configuration section of the setexpr man-page. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-02-10cmd: improve coninfo output formattingHeinrich Schuchardt
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 <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-02-10buildman: invalid reference to READMEHeinrich Schuchardt
The readme file for buildman is called buildman.rst. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-02-09Correct SPL use of FSL_MC_ENETSimon Glass
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 <[email protected]>
2023-02-09Correct SPL use of FSL_CAAMSimon Glass
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 <[email protected]>
2023-02-09Correct SPL use of FDT_SIMPLEFBSimon Glass
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 <[email protected]>
2023-02-09Correct SPL use of FASTBOOT_MMC_USER_SUPPORTSimon Glass
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 <[email protected]>
2023-02-09Correct SPL uses of FASTBOOT_FLASHSimon Glass
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 <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]>
2023-02-09Correct SPL use of EXYNOS7420Simon Glass
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 <[email protected]>
2023-02-09Correct SPL use of ENV_WRITEABLE_LISTSimon Glass
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 <[email protected]>
2023-02-09Correct SPL uses of ENV_VARS_UBOOT_RUNTIME_CONFIGSimon Glass
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 <[email protected]>
2023-02-09Correct SPL uses of ENV_IS_IN_UBISimon Glass
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 <[email protected]>
2023-02-09Correct SPL use of EFI_UNICODE_COLLATION_PROTOCOL2Simon Glass
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 <[email protected]>
2023-02-09Correct SPL use of EFI_TCG2_PROTOCOLSimon Glass
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 <[email protected]>
2023-02-09Correct SPL use of EFI_LOADER_HIISimon Glass
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 <[email protected]>
2023-02-09Correct SPL uses of EFI_HAVE_CAPSULE_SUPPORTSimon Glass
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 <[email protected]>
2023-02-09Correct SPL use of EFI_DEVICE_PATH_UTILSimon Glass
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 <[email protected]>
2023-02-09Correct SPL use of EFI_APPSimon Glass
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 <[email protected]>
2023-02-09Correct SPL uses of DWC_ETH_QOSSimon Glass
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 <[email protected]>
2023-02-09Correct SPL uses of DTB_RESELECTSimon Glass
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 <[email protected]>
2023-02-09Correct SPL use of DISPLAY_CPUINFOSimon Glass
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 <[email protected]>
2023-02-09Correct SPL use of DEBUG_UART_ZYNQSimon Glass
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 <[email protected]>
2023-02-09Correct SPL uses of CPU_MICROBLAZESimon Glass
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 <[email protected]>
2023-02-09Correct SPL uses of CMD_USBSimon Glass
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 <[email protected]>
2023-02-09Correct SPL uses of CMD_TFTPPUTSimon Glass
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 <[email protected]>
2023-02-09Correct SPL use of CMD_STM32PROGSimon Glass
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 <[email protected]>
2023-02-09Correct SPL use of CMD_STBOARDSimon Glass
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 <[email protected]>
2023-02-09Correct SPL use of CMD_SHA1SUMSimon Glass
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 <[email protected]>
2023-02-09Correct SPL uses of CMD_SFSimon Glass
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 <[email protected]>
2023-02-09Correct SPL uses of CMD_SCSISimon Glass
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 <[email protected]>
2023-02-09Correct SPL use of CMD_PSTORESimon Glass
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 <[email protected]>
2023-02-09Correct SPL uses of CMD_NVMESimon Glass
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 <[email protected]>
2023-02-09Correct SPL use of CMD_NVEDIT_EFISimon Glass
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 <[email protected]>
2023-02-09Correct SPL use of CMD_NETSimon Glass
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 <[email protected]>