iPXE
|
EFI device paths. More...
Go to the source code of this file.
Macros | |
#define | efi_describe_TYPE(object_type) typeof ( EFI_DEVICE_PATH_PROTOCOL * ( object_type ) ) |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
EFI_DEVICE_PATH_PROTOCOL * | efi_path_end (EFI_DEVICE_PATH_PROTOCOL *path) |
Find end of device path. More... | |
size_t | efi_path_len (EFI_DEVICE_PATH_PROTOCOL *path) |
Find length of device path (excluding terminator) More... | |
EFI_DEVICE_PATH_PROTOCOL * | efi_paths (EFI_DEVICE_PATH_PROTOCOL *first,...) |
Concatenate EFI device paths. More... | |
EFI_DEVICE_PATH_PROTOCOL * | efi_netdev_path (struct net_device *netdev) |
Construct EFI device path for network device. More... | |
EFI_DEVICE_PATH_PROTOCOL * | efi_uri_path (struct uri *uri) |
Construct EFI device path for URI. More... | |
EFI_DEVICE_PATH_PROTOCOL * | efi_iscsi_path (struct iscsi_session *iscsi) |
Construct EFI device path for iSCSI device. More... | |
EFI_DEVICE_PATH_PROTOCOL * | efi_aoe_path (struct aoe_device *aoedev) |
Construct EFI device path for AoE device. More... | |
EFI_DEVICE_PATH_PROTOCOL * | efi_fcp_path (struct fcp_description *desc) |
Construct EFI device path for Fibre Channel device. More... | |
EFI_DEVICE_PATH_PROTOCOL * | efi_ib_srp_path (struct ib_srp_device *ib_srp) |
Construct EFI device path for Infiniband SRP device. More... | |
EFI_DEVICE_PATH_PROTOCOL * | efi_usb_path (struct usb_function *func) |
Construct EFI device path for USB function. More... | |
EFI_DEVICE_PATH_PROTOCOL * | efi_describe (struct interface *interface) |
Describe object as an EFI device path. More... | |
EFI device paths.
Definition in file efi_path.h.
#define efi_describe_TYPE | ( | object_type | ) | typeof ( EFI_DEVICE_PATH_PROTOCOL * ( object_type ) ) |
Definition at line 40 of file efi_path.h.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
EFI_DEVICE_PATH_PROTOCOL* efi_path_end | ( | EFI_DEVICE_PATH_PROTOCOL * | path | ) |
Find end of device path.
path | Path to device |
path_end | End of device path |
Definition at line 49 of file efi_path.c.
References END_DEVICE_PATH_TYPE, EFI_DEVICE_PATH_PROTOCOL::Length, and EFI_DEVICE_PATH_PROTOCOL::Type.
Referenced by efi_block_boot_image(), efi_path_len(), and usbio_open().
size_t efi_path_len | ( | EFI_DEVICE_PATH_PROTOCOL * | path | ) |
Find length of device path (excluding terminator)
path | Path to device |
path_len | Length of device path |
Definition at line 67 of file efi_path.c.
References efi_path_end(), and end.
Referenced by efi_block_boot_image(), efi_devpath_text(), efi_driver_start(), efi_ib_srp_path(), efi_image_path(), efi_init(), efi_iscsi_path(), efi_local_open_path(), efi_netdev_path(), efi_paths(), efi_snp_hii_install(), efi_usb_path(), and usbio_path().
EFI_DEVICE_PATH_PROTOCOL* efi_paths | ( | EFI_DEVICE_PATH_PROTOCOL * | first, |
... | |||
) |
Concatenate EFI device paths.
... | List of device paths (NULL terminated) |
path | Concatenated device path, or NULL on error |
The caller is responsible for eventually calling free() on the allocated device path.
Definition at line 82 of file efi_path.c.
References efi_path_len(), end, END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE, first, len, memcpy(), NULL, src, va_arg, va_end, va_start, and zalloc().
Referenced by efi_aoe_path().
EFI_DEVICE_PATH_PROTOCOL* efi_netdev_path | ( | struct net_device * | netdev | ) |
Construct EFI device path for network device.
netdev | Network device |
path | EFI device path, or NULL on error |
The caller is responsible for eventually calling free() on the allocated device path.
Definition at line 133 of file efi_path.c.
References assert(), net_device::dev, efi_path_len(), efidev_parent(), end, END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE, MAC_ADDR_DEVICE_PATH::Header, VLAN_DEVICE_PATH::Header, MAC_ADDR_DEVICE_PATH::IfType, len, EFI_DEVICE_PATH_PROTOCOL::Length, net_device::ll_addr, ll_protocol::ll_addr_len, ll_protocol::ll_proto, net_device::ll_protocol, MAC_ADDR_DEVICE_PATH::MacAddress, memcpy(), MESSAGING_DEVICE_PATH, MSG_MAC_ADDR_DP, MSG_VLAN_DP, netdev, ntohs, NULL, efi_device::path, EFI_DEVICE_PATH_PROTOCOL::SubType, tag, EFI_DEVICE_PATH_PROTOCOL::Type, vlan_tag(), VLAN_DEVICE_PATH::VlanId, and zalloc().
Referenced by efi_aoe_path(), efi_iscsi_path(), and efi_snp_probe().
EFI_DEVICE_PATH_PROTOCOL* efi_uri_path | ( | struct uri * | uri | ) |
Construct EFI device path for URI.
uri | URI |
path | EFI device path, or NULL on error |
The caller is responsible for eventually calling free() on the allocated device path.
Definition at line 195 of file efi_path.c.
References end, END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE, format_uri(), URI_DEVICE_PATH::Header, len, EFI_DEVICE_PATH_PROTOCOL::Length, MESSAGING_DEVICE_PATH, MSG_URI_DP, NULL, efi_device::path, EFI_DEVICE_PATH_PROTOCOL::SubType, EFI_DEVICE_PATH_PROTOCOL::Type, URI_DEVICE_PATH::Uri, and zalloc().
Referenced by http_efi_describe().
EFI_DEVICE_PATH_PROTOCOL* efi_iscsi_path | ( | struct iscsi_session * | iscsi | ) |
Construct EFI device path for iSCSI device.
iscsi | iSCSI session |
path | EFI device path, or NULL on error |
Definition at line 234 of file efi_path.c.
References efi_netdev_path(), efi_path_len(), end, END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE, free, ISCSI_DEVICE_PATH::Header, ISCSI_LOGIN_OPTION_AUTHMETHOD_NON, len, EFI_DEVICE_PATH_PROTOCOL::Length, ISCSI_DEVICE_PATH::LoginOption, iscsi_session::lun, ISCSI_DEVICE_PATH::Lun, memcpy(), MESSAGING_DEVICE_PATH, MSG_ISCSI_DP, name, netdev, NULL, strlen(), EFI_DEVICE_PATH_PROTOCOL::SubType, iscsi_session::target_iqn, iscsi_session::target_sockaddr, tcpip_netdev(), EFI_DEVICE_PATH_PROTOCOL::Type, and zalloc().
EFI_DEVICE_PATH_PROTOCOL* efi_aoe_path | ( | struct aoe_device * | aoedev | ) |
Construct EFI device path for AoE device.
aoedev | AoE device |
path | EFI device path, or NULL on error |
Definition at line 302 of file efi_path.c.
References efi_netdev_path(), efi_paths(), end, END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE, free, aoe_device::major, memset(), MESSAGING_DEVICE_PATH, aoe_device::minor, MSG_SATA_DP, aoe_device::netdev, and NULL.
EFI_DEVICE_PATH_PROTOCOL* efi_fcp_path | ( | struct fcp_description * | desc | ) |
Construct EFI device path for Fibre Channel device.
desc | FCP device description |
path | EFI device path, or NULL on error |
Definition at line 348 of file efi_path.c.
References __attribute__, end, END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE, fc, fcp_description::lun, memcpy(), MESSAGING_DEVICE_PATH, MSG_FIBRECHANNELEX_DP, NULL, fcp_description::wwn, and zalloc().
Referenced by fcpdev_efi_describe().
EFI_DEVICE_PATH_PROTOCOL* efi_ib_srp_path | ( | struct ib_srp_device * | ib_srp | ) |
Construct EFI device path for Infiniband SRP device.
ib_srp | Infiniband SRP device |
path | EFI device path, or NULL on error |
Definition at line 378 of file efi_path.c.
References container_of, ib_device::dev, INFINIBAND_DEVICE_PATH::DeviceId, sbft_ib_subtable::dgid, efi_path_len(), efidev_parent(), end, END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE, INFINIBAND_DEVICE_PATH::Header, ipxe_ib_sbft::ib, ib_srp_device::ibdev, id, INFINIBAND_RESOURCE_FLAG_STORAGE_PROTOCOL, len, EFI_DEVICE_PATH_PROTOCOL::Length, memcpy(), MESSAGING_DEVICE_PATH, MSG_INFINIBAND_DP, NULL, efi_device::path, INFINIBAND_DEVICE_PATH::PortGid, INFINIBAND_DEVICE_PATH::ResourceFlags, ib_srp_device::sbft, sbft_ib_subtable::service_id, INFINIBAND_DEVICE_PATH::ServiceId, ib_srp_target_port_id::srp, ipxe_ib_sbft::srp, EFI_DEVICE_PATH_PROTOCOL::SubType, sbft_srp_subtable::target, INFINIBAND_DEVICE_PATH::TargetPortId, EFI_DEVICE_PATH_PROTOCOL::Type, and zalloc().
EFI_DEVICE_PATH_PROTOCOL* efi_usb_path | ( | struct usb_function * | func | ) |
Construct EFI device path for USB function.
func | USB function |
path | EFI device path, or NULL on error |
The caller is responsible for eventually calling free() on the allocated device path.
Definition at line 435 of file efi_path.c.
References assert(), count, usb_function_descriptor::count, usb_function::desc, usb_function::dev, efi_path_len(), efidev_parent(), end, END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE, USB_DEVICE_PATH::Header, usb_port::hub, usb_function::interface, USB_DEVICE_PATH::InterfaceNumber, len, EFI_DEVICE_PATH_PROTOCOL::Length, memcpy(), MESSAGING_DEVICE_PATH, MSG_USB_DP, NULL, USB_DEVICE_PATH::ParentPortNumber, efi_device::path, usb_device::port, EFI_DEVICE_PATH_PROTOCOL::SubType, EFI_DEVICE_PATH_PROTOCOL::Type, usb_function::usb, usb_hub::usb, usb_depth(), and zalloc().
Referenced by efi_usb_install(), and usbblk_efi_describe().
EFI_DEVICE_PATH_PROTOCOL* efi_describe | ( | struct interface * | intf | ) |
Describe object as an EFI device path.
intf | Interface |
path | EFI device path, or NULL |
The caller is responsible for eventually calling free() on the allocated device path.
Definition at line 491 of file efi_path.c.
References dest, efi_describe(), efi_describe_TYPE, intf_get_dest_op, intf_object(), intf_put(), NULL, and op.
Referenced by efi_block_hook(), and efi_describe().