summaryrefslogtreecommitdiff
path: root/lib/efi_loader/helloworld.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-04-09 11:08:39 -0400
committerTom Rini <trini@konsulko.com>2023-04-09 11:08:39 -0400
commit7daa8dd59bc8455a43cdd2d0e34206e406e5cdcc (patch)
tree975875173c54134724ee81a05773d69795c3e924 /lib/efi_loader/helloworld.c
parentfa6f458c679f55edd11e8e34f209d4a0e01bf7bc (diff)
parentd9d07d751e0f41d009051e8c25e2d5d9cf7ca41c (diff)
Merge tag 'efi-2023-07-rc1' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2023-07-rc1 Documentation: * man-page for coninfo command * documentation style * switch settings for boot modes on AM62 SK UEFI: * avoid using deprecated HandleProtocol() * set static attribute for non-exported functions and variables
Diffstat (limited to 'lib/efi_loader/helloworld.c')
-rw-r--r--lib/efi_loader/helloworld.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/efi_loader/helloworld.c b/lib/efi_loader/helloworld.c
index 49fa8cc2f00..6405f58ec3f 100644
--- a/lib/efi_loader/helloworld.c
+++ b/lib/efi_loader/helloworld.c
@@ -197,8 +197,10 @@ efi_status_t EFIAPI efi_main(efi_handle_t handle,
print_config_tables();
/* Get the loaded image protocol */
- ret = boottime->handle_protocol(handle, &loaded_image_guid,
- (void **)&loaded_image);
+ ret = boottime->open_protocol(handle, &loaded_image_guid,
+ (void **)&loaded_image, NULL, NULL,
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL);
+
if (ret != EFI_SUCCESS) {
con_out->output_string
(con_out, u"Cannot open loaded image protocol\r\n");
@@ -219,9 +221,10 @@ efi_status_t EFIAPI efi_main(efi_handle_t handle,
(con_out, u"Missing device handle\r\n");
goto out;
}
- ret = boottime->handle_protocol(loaded_image->device_handle,
- &device_path_guid,
- (void **)&device_path);
+ ret = boottime->open_protocol(loaded_image->device_handle,
+ &device_path_guid,
+ (void **)&device_path, NULL, NULL,
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL);
if (ret != EFI_SUCCESS) {
con_out->output_string
(con_out, u"Missing device path for device handle\r\n");