summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/ibft.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/ipxe/ibft.h')
-rw-r--r--src/include/ipxe/ibft.h36
1 files changed, 21 insertions, 15 deletions
diff --git a/src/include/ipxe/ibft.h b/src/include/ipxe/ibft.h
index 35f15105c..51ce781a6 100644
--- a/src/include/ipxe/ibft.h
+++ b/src/include/ipxe/ibft.h
@@ -49,6 +49,9 @@ FILE_LICENCE ( BSD2 );
/** iSCSI Boot Firmware Table signature */
#define IBFT_SIG ACPI_SIGNATURE ( 'i', 'B', 'F', 'T' )
+/** Alignment of structures within iBFT */
+#define IBFT_ALIGN 16
+
/** An offset from the start of the iBFT */
typedef uint16_t ibft_off_t;
@@ -98,6 +101,20 @@ struct ibft_header {
} __attribute__ (( packed ));
/**
+ * iBFT NIC and Target offset pair
+ *
+ * There is no implicit relation between the NIC and the Target, but
+ * using this structure simplifies the table construction code while
+ * matching the expected table layout.
+ */
+struct ibft_offset_pair {
+ /** Offset to NIC structure */
+ ibft_off_t nic;
+ /** Offset to Target structure */
+ ibft_off_t target;
+} __attribute__ (( packed ));
+
+/**
* iBFT Control structure
*
*/
@@ -108,14 +125,8 @@ struct ibft_control {
uint16_t extensions;
/** Offset to Initiator structure */
ibft_off_t initiator;
- /** Offset to NIC structure for NIC 0 */
- ibft_off_t nic_0;
- /** Offset to Target structure for target 0 */
- ibft_off_t target_0;
- /** Offset to NIC structure for NIC 1 */
- ibft_off_t nic_1;
- /** Offset to Target structure for target 1 */
- ibft_off_t target_1;
+ /** Offsets to NIC and Target structures */
+ struct ibft_offset_pair pair[2];
} __attribute__ (( packed ));
/** Structure ID for Control section */
@@ -262,18 +273,13 @@ struct ibft_target {
*/
struct ibft_table {
/** ACPI header */
- struct acpi_description_header acpi;
+ struct acpi_header acpi;
/** Reserved */
uint8_t reserved[12];
/** Control structure */
struct ibft_control control;
} __attribute__ (( packed ));
-struct iscsi_session;
-struct net_device;
-
-extern int ibft_describe ( struct iscsi_session *iscsi,
- struct acpi_description_header *acpi,
- size_t len );
+extern struct acpi_model ibft_model __acpi_model;
#endif /* _IPXE_IBFT_H */