87 DBGC (
device,
"EFI %s has no filesystem instance: %s\n",
93 if ( ( efirc =
u.fs->OpenVolume (
u.fs, &
root ) ) != 0 ) {
95 DBGC (
device,
"EFI %s could not open volume: %s\n",
115 DBGC (
device,
"EFI %s could not get %ls info: %s\n",
125 DBGC (
device,
"EFI %s has zero-length %ls\n",
134 DBGC (
device,
"EFI %s could not allocate %ls: %s\n",
141 if ( ( efirc = file->
Read ( file, &
size,
data ) ) != 0 ) {
143 DBGC (
device,
"EFI %s could not read %ls: %s\n",
165 file->
Close ( file );
208 DBGC (
device,
"EFI %s has no PXE base code instance: %s\n",
217 DBGC (
device,
"EFI %s has IPv6 PXE base code\n",
226 DBGC (
device,
"EFI %s using PXE reply filename\n",
232 DBGC (
device,
"EFI %s using DHCPACK filename\n",
238 DBGC (
device,
"EFI %s using ProxyDHCPOFFER filename\n",
244 DBGC (
device,
"EFI %s has no PXE boot filename\n",
253 filename =
zalloc ( filename_max );
260 memset ( &server, 0,
sizeof ( server ) );
262 sizeof ( server.in ) );
267 sep =
strrchr ( filename,
'/' );
269 sep =
strrchr ( filename,
'\\' );
271 sep = ( filename - 1 );
275 if ( ( efirc =
u.pxe->Mtftp (
u.pxe,
281 DBGC (
device,
"EFI %s could not get size of %s:%s: %s\n",
290 DBGC (
device,
"EFI %s has zero-length %s:%s\n",
300 DBGC (
device,
"EFI %s could not allocate %s:%s: %s\n",
312 DBGC (
device,
"EFI %s could not download %s:%s: %s\n",
386 DBGC (
device,
"EFI %s could not create %s\n",
400 .
name =
"efi_autoexec",
static size_t efi_autoexec_len
Autoexec script length.
EFI_BOOT_SERVICES * BootServices
A pointer to the EFI Boot Services Table.
#define EINVAL
Invalid argument.
#define STARTUP_NORMAL
Normal startup.
EFI_LOADED_IMAGE_PROTOCOL * efi_loaded_image
Loaded image protocol for this image.
struct arbelprm_rc_send_wqe rc
#define EEFI(efirc)
Convert an EFI status code to an iPXE status code.
char * strrchr(const char *src, int character)
Find rightmost character within a string.
struct stp_switch root
Root switch.
EFI_FILE_GET_INFO GetInfo
#define ENOENT
No such file or directory.
struct image * image_memory(const char *name, userptr_t data, size_t len)
Create registered image from block of memory.
static char efi_autoexec_name[]
Autoexec script image name.
EFI_PXE_BASE_CODE_DHCPV4_PACKET Dhcpv4
static int efi_autoexec_tftp(EFI_HANDLE device)
Load autoexec script from TFTP server.
EFI_GUID efi_pxe_base_code_protocol_guid
PXE base code protocol GUID.
struct startup_fn efi_autoexec_startup_fn __startup_fn(STARTUP_NORMAL)
Autoexec script startup function.
EFI PXE Base Code Protocol definitions, which is used to access PXE-compatible devices for network ac...
EFI_PXE_BASE_CODE_PACKET PxeReply
EFI_CLOSE_PROTOCOL CloseProtocol
#define ENOTSUP
Operation not supported.
A startup/shutdown function.
#define ENOMEM
Not enough space.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
SimpleFileSystem protocol as defined in the UEFI 2.0 specification.
16-byte buffer aligned on a 4-byte boundary.
EFI_GUID efi_simple_file_system_protocol_guid
Simple file system protocol GUID.
char * strcpy(char *dest, const char *src)
Copy string.
#define EFI_OPEN_PROTOCOL_GET_PROTOCOL
const char * efi_handle_name(EFI_HANDLE handle)
Get name of an EFI handle.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
char * strerror(int errno)
Retrieve string representation of error number.
static void(* free)(struct refcnt *refcnt))
void * zalloc(size_t size)
Allocate cleared memory.
EFI_HANDLE efi_image_handle
Image handle passed to entry point.
char * inet_ntoa(struct in_addr in)
Convert IPv4 address to dotted-quad notation.
IP4_t ip
Destination IP address.
UINT64 UINTN
Unsigned value of native width.
#define VOID
Undeclared type.
unsigned long long UINT64
Provides a GUID and a data structure that can be used with EFI_FILE_PROTOCOL.SetInfo() and EFI_FILE_P...
static void efi_autoexec_startup(void)
Register autoexec script.
BOOLEAN ProxyOfferReceived
EFI_PXE_BASE_CODE_PACKET DhcpAck
EFI_GUID efi_file_info_id
File information GUID.
#define EFI_FILE_MODE_READ
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
static int efi_autoexec_filesystem(EFI_HANDLE device)
Load autoexec script from filesystem.
static void * efi_autoexec
Autoexec script (if any)
userptr_t virt_to_user(volatile const void *addr)
Convert virtual address to user pointer.
uint8_t size
Entry size (in 32-bit words)
EFI_SYSTEM_TABLE * efi_systab
EFI_OPEN_PROTOCOL OpenProtocol
struct arbelprm_port_state_change_st data
Message.
The data portions of a loaded Boot Serves Driver, and the default data allocation type used by a Boot...
The EFI_PXE_BASE_CODE_PROTOCOL is used to control PXE-compatible devices.
#define NULL
NULL pointer (VOID *)
EFI_PXE_BASE_CODE_PACKET ProxyOffer
static wchar_t efi_autoexec_wname[]
Autoexec script filename.
The EFI_FILE_PROTOCOL provides file IO access to supported file systems.
EFI_HANDLE DeviceHandle
The device handle that the EFI Image was loaded from.
EFI_ALLOCATE_POOL AllocatePool
void * memset(void *dest, int character, size_t len) __nonnull
int efi_autoexec_load(EFI_HANDLE device)
Load autoexec script.