iPXE
Functions
efi_null.h File Reference

EFI null interfaces. More...

#include <ipxe/efi/efi.h>
#include <ipxe/efi/Protocol/AppleNetBoot.h>
#include <ipxe/efi/Protocol/BlockIo.h>
#include <ipxe/efi/Protocol/ComponentName2.h>
#include <ipxe/efi/Protocol/HiiConfigAccess.h>
#include <ipxe/efi/Protocol/LoadFile.h>
#include <ipxe/efi/Protocol/NetworkInterfaceIdentifier.h>
#include <ipxe/efi/Protocol/PxeBaseCode.h>
#include <ipxe/efi/Protocol/SimpleNetwork.h>
#include <ipxe/efi/Protocol/UsbIo.h>

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
void efi_nullify_snp (EFI_SIMPLE_NETWORK_PROTOCOL *snp)
 Nullify SNP interface. More...
 
void efi_nullify_nii (EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL *nii)
 Nullify NII interface. More...
 
void efi_nullify_name2 (EFI_COMPONENT_NAME2_PROTOCOL *name2)
 Nullify Component Name Protocol interface. More...
 
void efi_nullify_load_file (EFI_LOAD_FILE_PROTOCOL *load_file)
 Nullify Load File Protocol interface. More...
 
void efi_nullify_hii (EFI_HII_CONFIG_ACCESS_PROTOCOL *hii)
 Nullify HII configuration access protocol. More...
 
void efi_nullify_block (EFI_BLOCK_IO_PROTOCOL *block)
 Nullify block I/O protocol. More...
 
void efi_nullify_pxe (EFI_PXE_BASE_CODE_PROTOCOL *pxe)
 Nullify PXE base code protocol. More...
 
void efi_nullify_apple (EFI_APPLE_NET_BOOT_PROTOCOL *apple)
 Nullify Apple Net Boot protocol. More...
 
void efi_nullify_usbio (EFI_USB_IO_PROTOCOL *usbio)
 Nullify USB I/O protocol. More...
 

Detailed Description

EFI null interfaces.

Definition in file efi_null.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ efi_nullify_snp()

void efi_nullify_snp ( EFI_SIMPLE_NETWORK_PROTOCOL snp)

Nullify SNP interface.

Parameters
snpSNP interface

Definition at line 156 of file efi_null.c.

156  {
157 
158  memcpy ( snp, &efi_null_snp,
159  offsetof ( typeof ( *snp ), WaitForPacket ) );
161 }
UINT32 State
Reports the current state of the network interface.
#define offsetof(type, field)
Get offset of a field within a structure.
Definition: stddef.h:24
static EFI_SIMPLE_NETWORK_PROTOCOL efi_null_snp
Definition: efi_null.c:134
EFI_SIMPLE_NETWORK_MODE * Mode
Pointer to the EFI_SIMPLE_NETWORK_MODE data for the device.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
typeof(acpi_finder=acpi_find)
ACPI table finder.
Definition: acpi.c:45

References efi_null_snp, EfiSimpleNetworkStopped, memcpy(), _EFI_SIMPLE_NETWORK_PROTOCOL::Mode, offsetof, EFI_SIMPLE_NETWORK_MODE::State, and typeof().

Referenced by efi_snp_probe(), and efi_snp_remove().

◆ efi_nullify_nii()

void efi_nullify_nii ( EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL nii)

Nullify NII interface.

Parameters
niiNII interface

Definition at line 191 of file efi_null.c.

191  {
193  nii->Id = ( ( intptr_t ) &efi_null_undi );
194 }
static EFIAPI VOID efi_null_undi_issue(UINT64 cdb_phys)
Definition: efi_null.c:170
unsigned long intptr_t
Definition: stdint.h:21
UINT64 Id
The address of the first byte of the identifying structure for this network interface.
static PXE_SW_UNDI efi_null_undi
Definition: efi_null.c:177
PXE_UINT64 EntryPoint
API entry point.
Definition: UefiPxe.h:827

References efi_null_undi, efi_null_undi_issue(), s_pxe_sw_undi::EntryPoint, and _EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL::Id.

Referenced by efi_snp_probe(), and efi_snp_remove().

◆ efi_nullify_name2()

void efi_nullify_name2 ( EFI_COMPONENT_NAME2_PROTOCOL name2)

Nullify Component Name Protocol interface.

Parameters
name2Component name protocol

Definition at line 230 of file efi_null.c.

230  {
231 
232  memcpy ( name2, &efi_null_name2, sizeof ( *name2 ) );
233 }
void * memcpy(void *dest, const void *src, size_t len) __nonnull
static EFI_COMPONENT_NAME2_PROTOCOL efi_null_name2
Definition: efi_null.c:219

References efi_null_name2, and memcpy().

Referenced by efi_snp_probe(), and efi_snp_remove().

◆ efi_nullify_load_file()

void efi_nullify_load_file ( EFI_LOAD_FILE_PROTOCOL load_file)

Nullify Load File Protocol interface.

Parameters
load_fileLoad file protocol

Definition at line 255 of file efi_null.c.

255  {
256  load_file->LoadFile = efi_null_load_file;
257 }
static EFI_STATUS EFIAPI efi_null_load_file(EFI_LOAD_FILE_PROTOCOL *load_file __unused, EFI_DEVICE_PATH_PROTOCOL *path __unused, BOOLEAN booting __unused, UINTN *len __unused, VOID *data __unused)
Definition: efi_null.c:243
EFI_LOAD_FILE LoadFile
Definition: LoadFile.h:85

References efi_null_load_file(), and _EFI_LOAD_FILE_PROTOCOL::LoadFile.

Referenced by efi_snp_probe(), and efi_snp_remove().

◆ efi_nullify_hii()

void efi_nullify_hii ( EFI_HII_CONFIG_ACCESS_PROTOCOL hii)

Nullify HII configuration access protocol.

Parameters
hiiHII configuration access protocol

Definition at line 301 of file efi_null.c.

301  {
302 
303  memcpy ( hii, &efi_null_hii, sizeof ( *hii ) );
304 }
void * memcpy(void *dest, const void *src, size_t len) __nonnull
static EFI_HII_CONFIG_ACCESS_PROTOCOL efi_null_hii
Definition: efi_null.c:290

References efi_null_hii, and memcpy().

Referenced by efi_snp_hii_install(), and efi_snp_hii_uninstall().

◆ efi_nullify_block()

void efi_nullify_block ( EFI_BLOCK_IO_PROTOCOL block)

Nullify block I/O protocol.

Parameters
blockBlock I/O protocol

Definition at line 354 of file efi_null.c.

354  {
355 
356  memcpy ( block, &efi_null_block, sizeof ( *block ) );
357 }
uint16_t block
Definition: tftp.h:12
void * memcpy(void *dest, const void *src, size_t len) __nonnull
static EFI_BLOCK_IO_PROTOCOL efi_null_block
Definition: efi_null.c:340

References block, efi_null_block, and memcpy().

Referenced by efi_block_hook(), and efi_block_unhook().

◆ efi_nullify_pxe()

void efi_nullify_pxe ( EFI_PXE_BASE_CODE_PROTOCOL pxe)

Nullify PXE base code protocol.

Parameters
pxePXE base code protocol

Definition at line 494 of file efi_null.c.

494  {
495 
496  memcpy ( pxe, &efi_null_pxe, offsetof ( typeof ( *pxe ), Mode ) );
497  pxe->Mode->Started = FALSE;
498 }
#define offsetof(type, field)
Get offset of a field within a structure.
Definition: stddef.h:24
static EFI_PXE_BASE_CODE_PROTOCOL efi_null_pxe
Definition: efi_null.c:473
void * memcpy(void *dest, const void *src, size_t len) __nonnull
#define FALSE
Definition: tlan.h:45
typeof(acpi_finder=acpi_find)
ACPI table finder.
Definition: acpi.c:45
EFI_PXE_BASE_CODE_MODE * Mode
The pointer to the EFI_PXE_BASE_CODE_MODE data for this device.
Definition: PxeBaseCode.h:931

References efi_null_pxe, FALSE, memcpy(), _EFI_PXE_BASE_CODE_PROTOCOL::Mode, offsetof, EFI_PXE_BASE_CODE_MODE::Started, and typeof().

Referenced by efi_pxe_install(), and efi_pxe_uninstall().

◆ efi_nullify_apple()

void efi_nullify_apple ( EFI_APPLE_NET_BOOT_PROTOCOL apple)

Nullify Apple Net Boot protocol.

Parameters
appleApple Net Boot protocol

Definition at line 529 of file efi_null.c.

529  {
530 
531  memcpy ( apple, &efi_null_apple, sizeof ( *apple ) );
532 }
static EFI_APPLE_NET_BOOT_PROTOCOL efi_null_apple
Definition: efi_null.c:519
void * memcpy(void *dest, const void *src, size_t len) __nonnull

References efi_null_apple, and memcpy().

Referenced by efi_pxe_install(), and efi_pxe_uninstall().

◆ efi_nullify_usbio()

void efi_nullify_usbio ( EFI_USB_IO_PROTOCOL usbio)

Nullify USB I/O protocol.

Parameters
usbioUSB I/O protocol

Definition at line 669 of file efi_null.c.

669  {
670 
671  memcpy ( usbio, &efi_null_usbio, sizeof ( *usbio ) );
672 }
void * memcpy(void *dest, const void *src, size_t len) __nonnull
static EFI_USB_IO_PROTOCOL efi_null_usbio
Definition: efi_null.c:648

References efi_null_usbio, and memcpy().

Referenced by efi_usb_install(), and efi_usb_uninstall().