summaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_root_node.c
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2019-04-07 23:53:53 +0200
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2019-04-12 22:00:41 +0200
commit8ec7d5d35531f9a321181e60b088980da8c68d1c (patch)
treefb7c2472e9ee90f8edaa41d8543bf1bf08010482 /lib/efi_loader/efi_root_node.c
parent40a9546c7b6217a78a3a010a0142529a837e46b6 (diff)
efi_loader: assign HII protocols to root node
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>
Diffstat (limited to 'lib/efi_loader/efi_root_node.c')
-rw-r--r--lib/efi_loader/efi_root_node.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_root_node.c b/lib/efi_loader/efi_root_node.c
index b056ba3ee8..b58d9d8c96 100644
--- a/lib/efi_loader/efi_root_node.c
+++ b/lib/efi_loader/efi_root_node.c
@@ -74,6 +74,26 @@ efi_status_t efi_root_node_register(void)
if (ret != EFI_SUCCESS)
goto failure;
+#if CONFIG_IS_ENABLED(EFI_LOADER_HII)
+ /* Install HII string protocol */
+ ret = efi_add_protocol(root, &efi_guid_hii_string_protocol,
+ (void *)&efi_hii_string);
+ if (ret != EFI_SUCCESS)
+ goto failure;
+
+ /* Install HII database protocol */
+ ret = efi_add_protocol(root, &efi_guid_hii_database_protocol,
+ (void *)&efi_hii_database);
+ if (ret != EFI_SUCCESS)
+ goto failure;
+
+ /* Install HII configuration routing protocol */
+ ret = efi_add_protocol(root, &efi_guid_hii_config_routing_protocol,
+ (void *)&efi_hii_config_routing);
+ if (ret != EFI_SUCCESS)
+ goto failure;
+#endif
+
failure:
return ret;
}