]> git.baikalelectronics.ru Git - kernel.git/commitdiff
efi: libstub: fix up the last remaining open coded boot service call
authorArd Biesheuvel <ardb@kernel.org>
Fri, 16 Sep 2022 11:02:16 +0000 (13:02 +0200)
committerArd Biesheuvel <ardb@kernel.org>
Tue, 27 Sep 2022 11:26:16 +0000 (13:26 +0200)
We use a macro efi_bs_call() to call boot services, which is more
concise, and on x86, it encapsulates the mixed mode handling. This code
does not run in mixed mode, but let's switch to the macro for general
tidiness.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/libstub/efi-stub.c

index 269df915675ea5650a38bf11fc6c33e5edcb6f16..cf474f0dd261a9234fdf64283fc2b221bb6aa029 100644 (file)
@@ -154,8 +154,8 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle,
         * information about the running image, such as size and the command
         * line.
         */
-       status = efi_system_table->boottime->handle_protocol(handle,
-                                       &loaded_image_proto, (void *)&image);
+       status = efi_bs_call(handle_protocol, handle, &loaded_image_proto,
+                            (void *)&image);
        if (status != EFI_SUCCESS) {
                efi_err("Failed to get loaded image protocol\n");
                goto fail;