summaryrefslogtreecommitdiffstats
path: root/src/interface/efi/efiprefix.c
diff options
context:
space:
mode:
authorMichael Brown2021-02-17 17:57:19 +0100
committerMichael Brown2021-02-17 18:14:19 +0100
commite39cd79a00b1b353f47836f1144d28268c541ed6 (patch)
tree3984989fab45230766c58c74e28a995e5a8216d3 /src/interface/efi/efiprefix.c
parent[pxe] Split out platform-independent portions of cachedhcp.c (diff)
downloadipxe-e39cd79a00b1b353f47836f1144d28268c541ed6.tar.gz
ipxe-e39cd79a00b1b353f47836f1144d28268c541ed6.tar.xz
ipxe-e39cd79a00b1b353f47836f1144d28268c541ed6.zip
[efi] Split out autoexec script portions of efi_autoboot.c
The "autoboot device" and "autoexec script" functionalities in efi_autoboot.c are unrelated except in that they both need to be invoked by efiprefix.c before device drivers are loaded. Split out the autoexec script portions to a separate file to avoid potential confusion. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/interface/efi/efiprefix.c')
-rw-r--r--src/interface/efi/efiprefix.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/interface/efi/efiprefix.c b/src/interface/efi/efiprefix.c
index 3273b79d..928f41c7 100644
--- a/src/interface/efi/efiprefix.c
+++ b/src/interface/efi/efiprefix.c
@@ -26,6 +26,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
#include <ipxe/efi/efi_driver.h>
#include <ipxe/efi/efi_snp.h>
#include <ipxe/efi/efi_autoboot.h>
+#include <ipxe/efi/efi_autoexec.h>
#include <ipxe/efi/efi_watchdog.h>
#include <ipxe/efi/efi_veto.h>
@@ -48,8 +49,11 @@ EFI_STATUS EFIAPI _efi_start ( EFI_HANDLE image_handle,
if ( ( efirc = efi_init ( image_handle, systab ) ) != 0 )
goto err_init;
- /* Record autoboot device (if any) */
- efi_set_autoboot();
+ /* Identify autoboot device, if any */
+ efi_set_autoboot_ll_addr ( efi_loaded_image->DeviceHandle );
+
+ /* Load autoexec script, if any */
+ efi_autoexec_load ( efi_loaded_image->DeviceHandle );
/* Claim SNP devices for use by iPXE */
efi_snp_claim();