iPXE
|
iPXE EFI SNP interface More...
#include <ipxe/list.h>
#include <ipxe/netdevice.h>
#include <ipxe/efi/efi.h>
#include <ipxe/efi/Protocol/SimpleNetwork.h>
#include <ipxe/efi/Protocol/NetworkInterfaceIdentifier.h>
#include <ipxe/efi/Protocol/ComponentName2.h>
#include <ipxe/efi/Protocol/DevicePath.h>
#include <ipxe/efi/Protocol/HiiConfigAccess.h>
#include <ipxe/efi/Protocol/HiiDatabase.h>
#include <ipxe/efi/Protocol/LoadFile.h>
#include <ipxe/efi/Protocol/VlanConfig.h>
Go to the source code of this file.
Data Structures | |
struct | efi_snp_device |
An SNP device. More... | |
Macros | |
#define | EFI_SNP_NUM_TX 32 |
SNP transmit completion ring size. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER) | |
int | efi_snp_hii_install (struct efi_snp_device *snpdev) |
Install HII protocol and packages for SNP device. More... | |
int | efi_snp_hii_uninstall (struct efi_snp_device *snpdev) |
Uninstall HII protocol and package for SNP device. More... | |
struct efi_snp_device * | find_snpdev (EFI_HANDLE handle) |
Find SNP device by EFI device handle. More... | |
struct efi_snp_device * | last_opened_snpdev (void) |
Get most recently opened SNP device. More... | |
void | efi_snp_add_claim (int delta) |
Add to SNP claimed/released count. More... | |
static void | efi_snp_claim (void) |
Claim network devices for use by iPXE. More... | |
static void | efi_snp_release (void) |
Release network devices for use via SNP. More... | |
iPXE EFI SNP interface
Definition in file efi_snp.h.
#define EFI_SNP_NUM_TX 32 |
FILE_LICENCE | ( | GPL2_OR_LATER | ) |
int efi_snp_hii_install | ( | struct efi_snp_device * | snpdev | ) |
Install HII protocol and packages for SNP device.
snpdev | SNP device |
rc | Return status code |
Definition at line 658 of file efi_snp_hii.c.
References EFI_SYSTEM_TABLE::BootServices, DBGC, EEFI, efi_child_add(), efi_child_del(), efi_device_path_protocol_guid, efi_hii_config_access_protocol_guid, efi_nullify_hii(), efi_path_len(), efi_path_terminate(), efi_snp_device_hii, efi_snp_hii_package_list(), efi_snp_hii_random_guid(), efi_systab, efihii, ENOMEM, ENOTSUP, free, VENDOR_DEVICE_PATH::Guid, efi_snp_device::handle, HARDWARE_DEVICE_PATH, VENDOR_DEVICE_PATH::Header, efi_snp_device::hii, efi_snp_device::hii_child_handle, efi_snp_device::hii_child_path, efi_snp_device::hii_handle, HW_VENDOR_DP, EFI_BOOT_SERVICES::InstallMultipleProtocolInterfaces, EFI_DEVICE_PATH_PROTOCOL::Length, memcpy(), _EFI_HII_DATABASE_PROTOCOL::NewPackageList, NULL, efi_snp_device::package_list, efi_snp_device::path, rc, _EFI_HII_DATABASE_PROTOCOL::RemovePackageList, strerror(), EFI_DEVICE_PATH_PROTOCOL::SubType, EFI_DEVICE_PATH_PROTOCOL::Type, EFI_BOOT_SERVICES::UninstallMultipleProtocolInterfaces, and zalloc().
Referenced by efi_snp_probe().
int efi_snp_hii_uninstall | ( | struct efi_snp_device * | snpdev | ) |
Uninstall HII protocol and package for SNP device.
snpdev | SNP device |
leak | Uninstallation failed: leak memory |
Definition at line 796 of file efi_snp_hii.c.
References EFI_SYSTEM_TABLE::BootServices, DBGC, EEFI, efi_child_del(), efi_device_path_protocol_guid, efi_hii_config_access_protocol_guid, efi_nullify_hii(), efi_shutdown_in_progress, efi_systab, efihii, free, efi_snp_device::handle, efi_snp_device::hii, efi_snp_device::hii_child_handle, efi_snp_device::hii_child_path, efi_snp_device::hii_handle, NULL, efi_snp_device::package_list, _EFI_HII_DATABASE_PROTOCOL::RemovePackageList, strerror(), and EFI_BOOT_SERVICES::UninstallMultipleProtocolInterfaces.
Referenced by efi_snp_probe(), and efi_snp_remove().
struct efi_snp_device* find_snpdev | ( | EFI_HANDLE | handle | ) |
Find SNP device by EFI device handle.
handle | EFI device handle |
snpdev | SNP device, or NULL |
Definition at line 2118 of file efi_snp.c.
References handle, efi_snp_device::handle, efi_snp_device::list, list_for_each_entry, and NULL.
Referenced by snp_nii_supported().
struct efi_snp_device* last_opened_snpdev | ( | void | ) |
Get most recently opened SNP device.
snpdev | Most recently opened SNP device, or NULL |
Definition at line 2133 of file efi_snp.c.
References efi_snp_demux(), last_opened_netdev(), netdev, and NULL.
Referenced by efi_image_exec().
void efi_snp_add_claim | ( | int | delta | ) |
Add to SNP claimed/released count.
delta | Claim count change |
Definition at line 2148 of file efi_snp.c.
References assert(), efi_raise_tpl(), efi_restore_tpl(), efi_snp_claimed, efi_snp_saved_tpl, efi_snp_set_state(), efi_snp_device::list, and list_for_each_entry.
Referenced by efi_snp_claim(), and efi_snp_release().
|
inlinestatic |
Claim network devices for use by iPXE.
Definition at line 91 of file efi_snp.h.
References efi_snp_add_claim().
Referenced by _efi_start(), efi_block_boot(), efi_block_io_read(), efi_block_io_reset(), efi_block_io_write(), efi_download_start(), efi_image_exec(), efi_pxe_dhcp(), efi_pxe_mtftp(), efi_pxe_udp_open(), and efi_snp_load_file().
|
inlinestatic |
Release network devices for use via SNP.
Definition at line 99 of file efi_snp.h.
References efi_snp_add_claim().
Referenced by _efi_start(), efi_block_boot(), efi_block_io_read(), efi_block_io_reset(), efi_block_io_write(), efi_download_close(), efi_download_start(), efi_image_exec(), efi_pxe_dhcp(), efi_pxe_mtftp(), efi_pxe_udp_close(), and efi_snp_load_file().