10
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
13
#include <ipxe/list.h>
14
#include <ipxe/if_ether.h>
15
#include <ipxe/retry.h>
17
#include <ipxe/acpi.h>
19
/** An AoE config command */
21
/** AoE queue depth */
23
/** ATA target firmware version */
25
/** ATA target sector count */
27
/** AoE config string subcommand */
29
/** AoE config string length */
31
/** AoE config string */
33
} __attribute__ (( packed ));
35
/** An AoE ATA command */
37
/** AoE command flags */
39
/** ATA error/feature register */
41
/** ATA sector count register */
43
/** ATA command/status register */
45
/** Logical block address, in little-endian order */
52
} __attribute__ (( packed ));
54
#define AOE_FL_EXTENDED 0x40 /**< LBA48 extended addressing */
55
#define AOE_FL_DEV_HEAD 0x10 /**< Device/head flag */
56
#define AOE_FL_ASYNC 0x02 /**< Asynchronous write */
57
#define AOE_FL_WRITE 0x01 /**< Write command */
69
/** Protocol version number and flags */
73
/** Major device number, in network byte order */
75
/** Minor device number */
79
/** Tag, in network byte order */
82
union aoecmd payload[0];
83
} __attribute__ (( packed ));
85
#define AOE_VERSION 0x10 /**< Version 1 */
86
#define AOE_VERSION_MASK 0xf0 /**< Version part of ver_flags field */
88
#define AOE_FL_RESPONSE 0x08 /**< Message is a response */
89
#define AOE_FL_ERROR 0x04 /**< Command generated an error */
91
#define AOE_MAJOR_BROADCAST 0xffff
92
#define AOE_MINOR_BROADCAST 0xff
94
#define AOE_CMD_ATA 0x00 /**< Issue ATA command */
95
#define AOE_CMD_CONFIG 0x01 /**< Query Config Information */
97
#define AOE_ERR_BAD_COMMAND 1 /**< Unrecognised command code */
98
#define AOE_ERR_BAD_PARAMETER 2 /**< Bad argument parameter */
99
#define AOE_ERR_UNAVAILABLE 3 /**< Device unavailable */
100
#define AOE_ERR_CONFIG_EXISTS 4 /**< Config string present */
101
#define AOE_ERR_BAD_VERSION 5 /**< Unsupported version */
103
#define AOE_STATUS_ERR_MASK 0x0f /**< Error portion of status code */
104
#define AOE_STATUS_PENDING 0x80 /**< Command pending */
106
/** AoE tag magic marker */
107
#define AOE_TAG_MAGIC 0x18ae0000
109
/** Maximum number of sectors per packet */
110
#define AOE_MAX_COUNT 2
112
/** AoE boot firmware table signature */
113
#define ABFT_SIG ACPI_SIGNATURE ( 'a', 'B', 'F', 'T' )
116
* AoE Boot Firmware Table (aBFT)
120
struct acpi_description_header acpi;
128
uint8_t mac[ETH_ALEN];
129
} __attribute__ (( packed ));
131
#endif /* _IPXE_AOE_H */