1 /*++ 2 3 Copyright (c) 2007, Intel Corporation. All rights reserved.<BR> 4 This program and the accompanying materials 5 are licensed and made available under the terms and conditions of the BSD License 6 which accompanies this distribution. The full text of the license may be found at 7 http://opensource.org/licenses/bsd-license.php 8 9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 11 12 Module Name: 13 14 IScsiBootFirmwareTable.h 15 16 Abstract: 17 18 The definition for iSCSI Boot Firmware Table, it's defined in 19 Microsoft iBFT document. 20 21 --*/ 22 23 #ifndef _ISCSI_BOOT_FIRMWARE_TABLE_H_ 24 #define _ISCSI_BOOT_FIRMWARE_TABLE_H_ 25 26 #include "Tiano.h" 27 #include "Acpi3_0.h" 28 29 #define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_REVISION 0x01 30 #define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_STRUCTURE_ALIGNMENT 8 31 32 enum { 33 EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_RESERVED_STRUCTURE_ID = 0, 34 EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_CONTROL_STRUCTURE_ID, 35 EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_INITIATOR_STRUCTURE_ID, 36 EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_NIC_STRUCTURE_ID, 37 EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_ID, 38 EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_EXTERNSIONS_STRUCTURE_ID, 39 }; 40 41 enum { 42 IpPrefixOriginOther = 0, 43 IpPrefixOriginManual, 44 IpPrefixOriginWellKnown, 45 IpPrefixOriginDhcp, 46 IpPrefixOriginRouterAdvertisement, 47 IpPrefixOriginUnchanged = 16 48 }; 49 50 #pragma pack(1) 51 52 typedef struct { 53 UINT32 Signature; 54 UINT32 Length; 55 UINT8 Revision; 56 UINT8 Checksum; 57 UINT8 OemId[6]; 58 UINT64 OemTableId; 59 UINT8 Reserved[24]; 60 } EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_HEADER; 61 62 typedef struct { 63 UINT8 StructureId; 64 UINT8 Version; 65 UINT16 Length; 66 UINT8 Index; 67 UINT8 Flags; 68 } EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_STRUCTURE_HEADER; 69 70 #define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_CONTROL_STRUCTURE_VERSION 0x1 71 #define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_CONTROL_STRUCTURE_FLAG_BOOT_FAILOVER 0x1 72 73 typedef struct { 74 EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_STRUCTURE_HEADER Header; 75 UINT16 Extensions; 76 UINT16 InitiatorOffset; 77 UINT16 NIC0Offset; 78 UINT16 Target0Offset; 79 UINT16 NIC1Offset; 80 UINT16 Target1Offset; 81 } EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_CONTROL_STRUCTURE; 82 83 #define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_INITIATOR_STRUCTURE_VERSION 0x1 84 #define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_INITIATOR_STRUCTURE_FLAG_BLOCK_VALID 0x1 85 #define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_INITIATOR_STRUCTURE_FLAG_BOOT_SELECTED 0x2 86 87 typedef struct { 88 EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_STRUCTURE_HEADER Header; 89 EFI_IPv6_ADDRESS ISnsServer; 90 EFI_IPv6_ADDRESS SlpServer; 91 EFI_IPv6_ADDRESS PrimaryRadiusServer; 92 EFI_IPv6_ADDRESS SecondaryRadiusServer; 93 UINT16 IScsiNameLength; 94 UINT16 IScsiNameOffset; 95 } EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_INITIATOR_STRUCTURE; 96 97 #define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_NIC_STRUCTURE_VERSION 0x1 98 #define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_NIC_STRUCTURE_FLAG_BLOCK_VALID 0x1 99 #define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_NIC_STRUCTURE_FLAG_BOOT_SELECTED 0x2 100 #define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_NIC_STRUCTURE_FLAG_GLOBAL 0x4 101 102 typedef struct { 103 EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_STRUCTURE_HEADER Header; 104 EFI_IPv6_ADDRESS Ip; 105 UINT8 SubnetMaskPrefixLength; 106 UINT8 Origin; 107 EFI_IPv6_ADDRESS Gateway; 108 EFI_IPv6_ADDRESS PrimaryDns; 109 EFI_IPv6_ADDRESS SecondaryDns; 110 EFI_IPv6_ADDRESS DhcpServer; 111 UINT16 VLanTag; 112 UINT8 Mac[6]; 113 UINT16 PciLocation; 114 UINT16 HostNameLength; 115 UINT16 HostNameOffset; 116 } EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_NIC_STRUCTURE; 117 118 #define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_VERSION 0x1 119 #define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_FLAG_BLOCK_VALID 0x1 120 #define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_FLAG_BOOT_SELECTED 0x2 121 #define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_FLAG_RADIUS_CHAP 0x4 122 #define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_FLAG_RADIUS_RCHAP 0x8 123 124 typedef struct { 125 EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_STRUCTURE_HEADER Header; 126 EFI_IPv6_ADDRESS Ip; 127 UINT16 Port; 128 UINT8 BootLun[8]; 129 UINT8 CHAPType; 130 UINT8 NicIndex; 131 UINT16 IScsiNameLength; 132 UINT16 IScsiNameOffset; 133 UINT16 CHAPNameLength; 134 UINT16 CHAPNameOffset; 135 UINT16 CHAPSecretLength; 136 UINT16 CHAPSecretOffset; 137 UINT16 ReverseCHAPNameLength; 138 UINT16 ReverseCHAPNameOffset; 139 UINT16 ReverseCHAPSecretLength; 140 UINT16 ReverseCHAPSecretOffset; 141 } EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE; 142 143 #pragma pack() 144 145 #endif 146 147