]> git.dujemihanovic.xyz Git - u-boot.git/commit
efi_loader: use efi_install_multiple_protocol_interfaces()
authorIlias Apalodimas <ilias.apalodimas@linaro.org>
Mon, 19 Jun 2023 11:14:02 +0000 (14:14 +0300)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Thu, 20 Jul 2023 07:12:50 +0000 (09:12 +0200)
commit4a3baf9da6f721ada4d603a1d1d20c491a54d609
treebefd5bb708e896819e287ff28c2274018ecd880c
parent6287021ff9143718310075c414e535f1679a3929
efi_loader: use efi_install_multiple_protocol_interfaces()

The TCG2 protocol currently adds and removes protocols with
efi_(add/remove)_protocol().

Removing protocols with efi_remove_protocol() might prove
problematic since it doesn't call DisconnectController() when
uninstalling the protocol and does not comply with the UEFI specification.

It's also beneficial for readability to have protocol installations and
removals in pairs -- IOW when efi_install_multiple_protocol_interfaces()
is called,  efi_uninstall_multiple_protocol_interfaces() should be used to
remove it.  So let's swap the efi_add_protocol() as well.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
lib/efi_loader/efi_tcg2.c