diff options
| author | Michael Brown | 2023-01-29 19:48:08 +0100 |
|---|---|---|
| committer | Michael Brown | 2023-01-29 19:56:11 +0100 |
| commit | 4bb521a8c4b324902651714915dfe6fd4a5c36af (patch) | |
| tree | e27012b95f0c8a88648942a8e8f2c6fbc7a9b4a1 /src/interface/efi/efi_init.c | |
| parent | [la64] Import LoongArch64 ProcessorBind.h from EDK2 headers (diff) | |
| download | ipxe-4bb521a8c4b324902651714915dfe6fd4a5c36af.tar.gz ipxe-4bb521a8c4b324902651714915dfe6fd4a5c36af.tar.xz ipxe-4bb521a8c4b324902651714915dfe6fd4a5c36af.zip | |
[efi] Accept a command line passed to an iPXE image via LoadOptions
Treat a command line passed to iPXE via UEFI LoadOptions as an image
to be registered at startup, as is already done for the .lkrn, .pxe,
and .exe BIOS images.
Originally-implemented-by: Ladi Prosek <lprosek@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/interface/efi/efi_init.c')
| -rw-r--r-- | src/interface/efi/efi_init.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/interface/efi/efi_init.c b/src/interface/efi/efi_init.c index 5d98f9ff7..d3c5042d7 100644 --- a/src/interface/efi/efi_init.c +++ b/src/interface/efi/efi_init.c @@ -27,6 +27,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); #include <ipxe/efi/efi.h> #include <ipxe/efi/efi_driver.h> #include <ipxe/efi/efi_path.h> +#include <ipxe/efi/efi_cmdline.h> #include <ipxe/efi/Protocol/LoadedImage.h> /** Image handle passed to entry point */ @@ -254,6 +255,10 @@ EFI_STATUS efi_init ( EFI_HANDLE image_handle, DBGC ( systab, "EFI image base address %p\n", efi_loaded_image->ImageBase ); + /* Record command line */ + efi_cmdline = efi_loaded_image->LoadOptions; + efi_cmdline_len = efi_loaded_image->LoadOptionsSize; + /* Get loaded image's device handle's device path */ if ( ( efirc = bs->OpenProtocol ( efi_loaded_image->DeviceHandle, &efi_device_path_protocol_guid, |
