[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>
This commit is contained in:
Michael Brown
2021-02-17 16:57:19 +00:00
parent 057674bb1f
commit e39cd79a00
6 changed files with 234 additions and 190 deletions

View File

@@ -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();