Execute EFI image.
171 DBGC (
image,
"EFIIMAGE %s could not identify SNP device\n",
183 DBGC (
image,
"EFIIMAGE %s executing via %s\n",
191 goto err_register_image;
195 DBGC (
image,
"EFIIMAGE %s could not install file protocol: " 197 goto err_file_install;
202 DBGC (
image,
"EFIIMAGE %s could not install PXE protocol: " 204 goto err_pxe_install;
209 DBGC (
image,
"EFIIMAGE %s could not install iPXE download " 211 goto err_download_install;
216 DBGC (
image,
"EFIIMAGE %s could not install FDT: %s\n",
218 goto err_fdt_install;
224 DBGC (
image,
"EFIIMAGE %s could not create device path\n",
233 DBGC (
image,
"EFIIMAGE %s could not create command line\n",
242 DBGC (
image,
"EFIIMAGE %s could not install shim handling: " 244 goto err_shim_install;
259 DBGC (
image,
"EFIIMAGE %s could not load: %s\n",
262 goto err_load_image_security_violation;
272 goto err_open_protocol;
277 DBGC (
image,
"EFIIMAGE %s filling in missing DeviceHandle\n",
311 DBGC (
image,
"EFIIMAGE %s could not start (or returned with " 313 goto err_start_image;
343 err_load_image_security_violation:
357 err_download_install:
EFI_BOOT_SERVICES * BootServices
A pointer to the EFI Boot Services Table.
struct arbelprm_rc_send_wqe rc
void efi_download_uninstall(EFI_HANDLE handle)
Uninstall iPXE download protocol.
uint32_t type
Operating system type.
int efi_shim_install(struct image *shim, EFI_HANDLE handle, wchar_t **cmdline)
Install UEFI shim special handling.
#define EEFI_START(efirc)
EFI_GUID efi_loaded_image_protocol_guid
Loaded image protocol GUID.
void efi_file_uninstall(EFI_HANDLE handle)
Uninstall EFI simple file system protocol.
EFI_IMAGE_UNLOAD UnloadImage
This protocol can be used on any device handle to obtain generic path/location information concerning...
static void efi_snp_claim(void)
Claim network devices for use by iPXE.
uint16_t device
Device ID.
EFI_HANDLE handle
EFI device handle.
size_t wcslen(const wchar_t *string)
Calculate length of wide-character string.
EFI_MEMORY_TYPE ImageCodeType
The memory type that the code sections were loaded as.
char * cmdline
Command line to pass to image.
int efi_file_install(EFI_HANDLE handle)
Install EFI simple file system protocol.
struct image * find_image_tag(struct image_tag *tag)
Find image by tag.
struct net_device * netdev
The underlying iPXE network device.
struct efi_snp_device * last_opened_snpdev(void)
Get most recently opened SNP device.
#define ENOMEM
Not enough space.
Can be used on any image handle to obtain information about the loaded image.
void efi_pxe_uninstall(EFI_HANDLE handle)
Uninstall PXE base code protocol.
void efi_driver_reconnect_all(void)
Reconnect original EFI drivers to all possible devices.
EFI_MEMORY_TYPE
Enumeration of memory types introduced in UEFI.
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
VOID * LoadOptions
A pointer to the image's binary load options.
The code portions of a loaded Boot Services Driver.
int efi_pxe_install(EFI_HANDLE handle, struct net_device *netdev)
Install PXE base code protocol.
static int efi_can_load(struct image *image)
Check if EFI image can be loaded directly.
int register_image(struct image *image)
Register executable image.
char * strerror(int errno)
Retrieve string representation of error number.
static void(* free)(struct refcnt *refcnt))
EFI_HANDLE efi_image_handle
Image handle passed to entry point.
size_t len
Length of raw file image.
#define IMAGE_HIDDEN
Image will be hidden from enumeration.
#define ENODEV
No such device.
static void efi_snp_release(void)
Release network devices for use via SNP.
#define efi_open(handle, protocol, interface)
Open protocol for ephemeral use.
__weak int efi_fdt_uninstall(void)
Uninstall EFI Flattened Device Tree table (when no FDT support is present)
static void console_reset(void)
Reset console.
EFI_IMAGE_START StartImage
void efi_wrap_image(EFI_HANDLE handle)
Wrap calls made by a newly loaded image.
#define EFI_SECURITY_VIOLATION
Enumeration of EFI_STATUS.
UINT32 LoadOptionsSize
The size in bytes of LoadOptions.
static wchar_t * efi_image_cmdline(struct image *image)
Create command line for image.
void unregister_image(struct image *image)
Unregister executable image.
static EFI_DEVICE_PATH_PROTOCOL * efi_image_path(struct image *image, EFI_DEVICE_PATH_PROTOCOL *parent)
Create device path for image.
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
void * rwdata
Writable data.
void efi_shim_uninstall(void)
Uninstall UEFI shim special handling.
int efi_download_install(EFI_HANDLE handle)
Install iPXE download protocol.
EFI_SYSTEM_TABLE * efi_systab
EFI_DEVICE_PATH_PROTOCOL * path
The device path.
void efi_unwrap(void)
Remove boot services table wrapper.
int shim(struct image *image, int require_loader, int allow_pxe, int allow_sbat)
Set shim image.
#define NULL
NULL pointer (VOID *)
EFI_HANDLE ParentHandle
Parent image's image handle.
__weak int efi_fdt_install(const char *cmdline __unused)
Install EFI Flattened Device Tree table (when no FDT support is present)
EFI_HANDLE DeviceHandle
The device handle that the EFI Image was loaded from.