aboutsummaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_root_node.c
Commit message (Collapse)AuthorAgeFilesLines
* efi_loader: Remove <common.h>Tom Rini2023-12-211-1/+0
| | | | | | | | | We largely do not need <common.h> in these files, so drop it. The only exception here is that efi_freestanding.c needs <linux/types.h> and had been getting that via <common.h>. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
* Correct SPL use of EFI_UNICODE_COLLATION_PROTOCOL2Simon Glass2023-02-091-1/+1
| | | | | | | 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>
* Correct SPL use of EFI_LOADER_HIISimon Glass2023-02-091-1/+1
| | | | | | | 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>
* Correct SPL use of EFI_DEVICE_PATH_UTILSimon Glass2023-02-091-1/+1
| | | | | | | 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>
* efi_loader: define internal implementations of install/uninstallmultipleIlias Apalodimas2022-10-061-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | A following patch is cleaning up the core EFI code trying to remove sequences of efi_create_handle, efi_add_protocol. Although this works fine there's a problem with the latter since it is usually combined with efi_delete_handle() which blindly removes all protocols on a handle and deletes the handle. We should try to adhere to the EFI spec which only deletes a handle if the last instance of a protocol has been removed. Another problem is that efi_delete_handle() never checks for opened protocols, but the EFI spec defines that the caller is responsible for ensuring that there are no references to a protocol interface that is going to be removed. So let's fix this by replacing all callsites of efi_create_handle(), efi_add_protocol() , efi_delete_handle() with Install/UninstallMultipleProtocol. In order to do that redefine functions that can be used by the U-Boot proper internally and add '_ext' variants that will be used from the EFI API Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: remove EFI_UNICODE_COLLATION_PROTOCOLHeinrich Schuchardt2021-01-201-6/+0
| | | | | | | | | | | | In EFI 1.10 a version of the Unicode collation protocol using ISO 639-2 language codes existed. This protocol is not part of the UEFI specification any longer. It was however required to run the UEFI Self Certification Test (SCT) II, version 2.6, 2017. So we implemented it for the sole purpose of running the SCT. As the SCT does not need the protocol anymore it is time for removal. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: EFI_DEVICE_PATH_UTILITIES_PROTOCOL configurableHeinrich Schuchardt2021-01-201-0/+2
| | | | | | | | | | Allow the EFI_DEVICE_PATH_UTILITIES_PROTOCOL to be disabled via configuration. On systems that are very tight on U-Boot image size we may want to disable the protocol. As it is required to run the UEFI Shell enable it by default. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: make EFI_DT_FIXUP_PROTOCOL configurableHeinrich Schuchardt2021-01-201-1/+1
| | | | | | Allow EFI_DT_FIXUP_PROTOCOL to be disabled via configuration. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: implement EFI_DT_FIXUP_PROTOCOLHeinrich Schuchardt2021-01-131-0/+6
| | | | | | | | | | A boot manager like GRUB can use the protocol to * apply U-Boot's fix-ups to the a device-tree * let U-Boot make memory reservations according to the device-tree * install the device-tree as a configuration table Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: remove EFI_HII_CONFIG_ROUTING_PROTOCOLHeinrich Schuchardt2020-12-101-3/+0
| | | | | | | | | Our implementation of the EFI_HII_CONFIG_ROUTING_PROTOCOL is a mere stub, where all services return an error code. The protocol is neither needed for the EFI shell nor for the UEFI SCT. To reduce the code size remove it from the U-Boot binary. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: installation of EFI_RNG_PROTOCOLHeinrich Schuchardt2020-09-271-4/+0
| | | | | | | | | | | | Having an EFI_RNG_PROTOCOL without a backing RNG device leads to failure to boot Linux 5.8. Only install the EFI_RNG_PROTOCOL if we have a RNG device. Reported-by: Scott K Logan <logans@cottsay.net> Cc: Neil Armstrong <narmstrong@baylibre.com> Cc: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_rng_protocol: Install the efi_rng_protocol on the root nodeSughosh Ganu2020-01-071-0/+4
| | | | | | | | Install the EFI_RNG_PROTOCOL implementation for it's subsequent use by the kernel for features like kaslr. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: implement deprecated Unicode collation protocolHeinrich Schuchardt2019-05-191-1/+6
| | | | | | | | | | | | | | | | | | In EFI 1.10 a version of the Unicode collation protocol using ISO 639-2 language codes existed. This protocol is not part of the UEFI specification any longer. Unfortunately it is required to run the UEFI Self Certification Test (SCT) II, version 2.6, 2017. So we implement it here for the sole purpose of running the SCT. It can be removed once a compliant SCT is available. The configuration option defaults to no. Signed-off-by: Rob Clark <robdclark@gmail.com> Most of Rob's original patch is already merged. Only the deprecated protocol is missing. Rebase it and make it configurable. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: rename Unicode collation protocol 2 variablesHeinrich Schuchardt2019-05-191-3/+3
| | | | | | | Rename variables to make it clear they refer to the Unicode collation protocol identified by the EFI_UNICODE_PROTOCOL2_GUID. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: make device path to text protocol customizableHeinrich Schuchardt2019-05-121-0/+2
| | | | | | | The device path to text protocol is not needed for EBBR compliance. So let's make it a customizable option. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: make Unicode collation protocol customizableHeinrich Schuchardt2019-05-121-0/+2
| | | | | | | | | | The Unicode collation protocol is not needed for EBBR compliance. So let's make it a customizable option. The Unicode capitalization table is only needed by this protocol. So let it depend on the Unicode collation protocol. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: LoadImage() check parent imageHeinrich Schuchardt2019-05-071-22/+26
| | | | | | | | | | | If the parent image handle does not refer to a loaded image return EFI_INVALID_PARAMETER. (UEFI SCT II 2017: 3.4.1 LoadImage() - 5.1.4.1.1) Mark our root node as a loaded image to avoid an error when using it as parent image. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: export root node handleAKASHI Takahiro2019-04-231-2/+3
| | | | | | | | | | | | This is a preparatory patch. The root node handle will be used as a dummy parent handle when invoking an EFI image from bootefi/bootmgr command. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Rebased. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: simplify protocol installationHeinrich Schuchardt2019-04-121-51/+25
| | | | | | | | By using InstallMultipleProtocolInterfaces() the coding for installing protocol interfaces on the root node can be simplified. Suggested-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: assign HII protocols to root nodeHeinrich Schuchardt2019-04-121-0/+20
| | | | | | | We should not install the HII protocols on every loaded image. It is sufficient to install them once on the root node. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: create root nodeHeinrich Schuchardt2018-09-231-0/+79
Currently we assign a lot of protocols to loaded images though these protocols are not related to them. Instead they should be installed on a separate handle. Via the device path it is the parent to the devices like the network adapter. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>