mirror of
https://github.com/ipxe/ipxe
synced 2025-12-21 04:20:17 +03:00
[aoe] Allow AoE device to be described using an EFI device path
There is no standard defined for AoE device paths in the UEFI specification, and it seems unlikely that any standard will be adopted in future. Choose to construct an AoE device path using a concatenation of the network device path and a SATA device path, treating the AoE major and minor numbers as the HBA port number and port multiplier port number respectively. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -15,6 +15,8 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||
#include <ipxe/retry.h>
|
||||
#include <ipxe/ata.h>
|
||||
#include <ipxe/acpi.h>
|
||||
#include <ipxe/netdevice.h>
|
||||
#include <ipxe/interface.h>
|
||||
|
||||
/** An AoE config command */
|
||||
struct aoecfg {
|
||||
@@ -109,6 +111,35 @@ struct aoehdr {
|
||||
/** Maximum number of sectors per packet */
|
||||
#define AOE_MAX_COUNT 2
|
||||
|
||||
/** An AoE device */
|
||||
struct aoe_device {
|
||||
/** Reference counter */
|
||||
struct refcnt refcnt;
|
||||
|
||||
/** Network device */
|
||||
struct net_device *netdev;
|
||||
/** ATA command issuing interface */
|
||||
struct interface ata;
|
||||
|
||||
/** Major number */
|
||||
uint16_t major;
|
||||
/** Minor number */
|
||||
uint8_t minor;
|
||||
/** Target MAC address */
|
||||
uint8_t target[MAX_LL_ADDR_LEN];
|
||||
|
||||
/** Saved timeout value */
|
||||
unsigned long timeout;
|
||||
|
||||
/** Configuration command interface */
|
||||
struct interface config;
|
||||
/** Device is configued */
|
||||
int configured;
|
||||
|
||||
/** ACPI descriptor */
|
||||
struct acpi_descriptor desc;
|
||||
};
|
||||
|
||||
/** AoE boot firmware table signature */
|
||||
#define ABFT_SIG ACPI_SIGNATURE ( 'a', 'B', 'F', 'T' )
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||
|
||||
struct net_device;
|
||||
struct uri;
|
||||
struct aoe_device;
|
||||
struct usb_function;
|
||||
|
||||
extern EFI_DEVICE_PATH_PROTOCOL *
|
||||
@@ -24,6 +25,7 @@ extern EFI_DEVICE_PATH_PROTOCOL * efi_paths ( EFI_DEVICE_PATH_PROTOCOL *first,
|
||||
... );
|
||||
extern EFI_DEVICE_PATH_PROTOCOL * efi_netdev_path ( struct net_device *netdev );
|
||||
extern EFI_DEVICE_PATH_PROTOCOL * efi_uri_path ( struct uri *uri );
|
||||
extern EFI_DEVICE_PATH_PROTOCOL * efi_aoe_path ( struct aoe_device *aoedev );
|
||||
extern EFI_DEVICE_PATH_PROTOCOL * efi_usb_path ( struct usb_function *func );
|
||||
|
||||
extern EFI_DEVICE_PATH_PROTOCOL * efi_describe ( struct interface *interface );
|
||||
|
||||
Reference in New Issue
Block a user