structure prototypes, global variables and constants that\r
are needed for porting PXE to EFI.\r
\r
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available under \r
-the terms and conditions of the BSD License that accompanies this distribution. \r
-The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php. \r
- \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
@par Revision Reference:\r
32/64-bit PXE specification:\r
///\r
/// UNDI ROM ID and devive ID signature.\r
///\r
-#define PXE_BUSTYPE_PXE PXE_BUSTYPE ('!', 'P', 'X', 'E')\r
+#define PXE_BUSTYPE_PXE PXE_BUSTYPE ('!', 'P', 'X', 'E')\r
\r
///\r
/// BUS ROM ID signatures.\r
///\r
-#define PXE_BUSTYPE_PCI PXE_BUSTYPE ('P', 'C', 'I', 'R')\r
-#define PXE_BUSTYPE_PC_CARD PXE_BUSTYPE ('P', 'C', 'C', 'R')\r
-#define PXE_BUSTYPE_USB PXE_BUSTYPE ('U', 'S', 'B', 'R')\r
-#define PXE_BUSTYPE_1394 PXE_BUSTYPE ('1', '3', '9', '4')\r
+#define PXE_BUSTYPE_PCI PXE_BUSTYPE ('P', 'C', 'I', 'R')\r
+#define PXE_BUSTYPE_PC_CARD PXE_BUSTYPE ('P', 'C', 'C', 'R')\r
+#define PXE_BUSTYPE_USB PXE_BUSTYPE ('U', 'S', 'B', 'R')\r
+#define PXE_BUSTYPE_1394 PXE_BUSTYPE ('1', '3', '9', '4')\r
\r
#define PXE_SWAP_UINT16(n) ((((PXE_UINT16) (n) & 0x00FF) << 8) | (((PXE_UINT16) (n) & 0xFF00) >> 8))\r
\r
(((PXE_UINT64)(n) & 0x00FF000000000000ULL) >> 40) | \\r
(((PXE_UINT64)(n) & 0xFF00000000000000ULL) >> 56))\r
\r
-\r
#define PXE_CPBSIZE_NOT_USED 0 ///< zero\r
#define PXE_DBSIZE_NOT_USED 0 ///< zero\r
#define PXE_CPBADDR_NOT_USED (PXE_UINT64) 0 ///< zero\r
#define PXE_DBADDR_NOT_USED (PXE_UINT64) 0 ///< zero\r
#define PXE_CONST CONST\r
\r
-#define PXE_VOLATILE volatile\r
+#define PXE_VOLATILE volatile\r
\r
-typedef VOID PXE_VOID;\r
-typedef UINT8 PXE_UINT8;\r
-typedef UINT16 PXE_UINT16;\r
-typedef UINT32 PXE_UINT32;\r
-typedef UINTN PXE_UINTN;\r
+typedef VOID PXE_VOID;\r
+typedef UINT8 PXE_UINT8;\r
+typedef UINT16 PXE_UINT16;\r
+typedef UINT32 PXE_UINT32;\r
+typedef UINTN PXE_UINTN;\r
\r
///\r
/// Typedef unsigned long PXE_UINT64.\r
///\r
-typedef UINT64 PXE_UINT64;\r
+typedef UINT64 PXE_UINT64;\r
\r
typedef PXE_UINT8 PXE_BOOL;\r
-#define PXE_FALSE 0 ///< zero\r
-#define PXE_TRUE (!PXE_FALSE)\r
+#define PXE_FALSE 0 ///< zero\r
+#define PXE_TRUE (!PXE_FALSE)\r
\r
-typedef PXE_UINT16 PXE_OPCODE;\r
+typedef PXE_UINT16 PXE_OPCODE;\r
\r
///\r
/// Return UNDI operational state.\r
///\r
/// Change UNDI operational state from Started to Stopped.\r
///\r
-#define PXE_OPCODE_STOP 0x0002\r
+#define PXE_OPCODE_STOP 0x0002\r
\r
///\r
/// Get UNDI initialization information.\r
///\r
/// Changed UNDI operational state from Started to Initialized.\r
///\r
-#define PXE_OPCODE_INITIALIZE 0x0005\r
+#define PXE_OPCODE_INITIALIZE 0x0005\r
\r
///\r
/// Re-initialize the NIC H/W.\r
///\r
/// Change the UNDI operational state from Initialized to Started.\r
///\r
-#define PXE_OPCODE_SHUTDOWN 0x0007\r
+#define PXE_OPCODE_SHUTDOWN 0x0007\r
\r
///\r
/// Read & change state of external interrupt enables.\r
///\r
/// Read traffic statistics.\r
///\r
-#define PXE_OPCODE_STATISTICS 0x000B\r
+#define PXE_OPCODE_STATISTICS 0x000B\r
\r
///\r
/// Convert multicast IP address to multicast MAC address.\r
///\r
/// Read or change non-volatile storage on the NIC.\r
///\r
-#define PXE_OPCODE_NVDATA 0x000D\r
+#define PXE_OPCODE_NVDATA 0x000D\r
\r
///\r
/// Get & clear interrupt status.\r
///\r
-#define PXE_OPCODE_GET_STATUS 0x000E\r
+#define PXE_OPCODE_GET_STATUS 0x000E\r
\r
///\r
/// Fill media header in packet for transmit.\r
///\r
/// Transmit packet(s).\r
///\r
-#define PXE_OPCODE_TRANSMIT 0x0010\r
+#define PXE_OPCODE_TRANSMIT 0x0010\r
\r
///\r
/// Receive packet.\r
///\r
/// Last valid PXE UNDI OpCode number.\r
///\r
-#define PXE_OPCODE_LAST_VALID 0x0011\r
+#define PXE_OPCODE_LAST_VALID 0x0011\r
\r
-typedef PXE_UINT16 PXE_OPFLAGS;\r
+typedef PXE_UINT16 PXE_OPFLAGS;\r
\r
#define PXE_OPFLAGS_NOT_USED 0x0000\r
\r
/// Select whether to enable or disable external interrupt signals.\r
/// Setting both enable and disable will return PXE_STATCODE_INVALID_OPFLAGS.\r
///\r
-#define PXE_OPFLAGS_INTERRUPT_OPMASK 0xC000\r
-#define PXE_OPFLAGS_INTERRUPT_ENABLE 0x8000\r
-#define PXE_OPFLAGS_INTERRUPT_DISABLE 0x4000\r
-#define PXE_OPFLAGS_INTERRUPT_READ 0x0000\r
+#define PXE_OPFLAGS_INTERRUPT_OPMASK 0xC000\r
+#define PXE_OPFLAGS_INTERRUPT_ENABLE 0x8000\r
+#define PXE_OPFLAGS_INTERRUPT_DISABLE 0x4000\r
+#define PXE_OPFLAGS_INTERRUPT_READ 0x0000\r
\r
///\r
/// Enable receive interrupts. An external interrupt will be generated\r
/// after a complete non-error packet has been received.\r
///\r
-#define PXE_OPFLAGS_INTERRUPT_RECEIVE 0x0001\r
+#define PXE_OPFLAGS_INTERRUPT_RECEIVE 0x0001\r
\r
///\r
/// Enable transmit interrupts. An external interrupt will be generated\r
/// Enable command interrupts. An external interrupt will be generated\r
/// when command execution stops.\r
///\r
-#define PXE_OPFLAGS_INTERRUPT_COMMAND 0x0004\r
+#define PXE_OPFLAGS_INTERRUPT_COMMAND 0x0004\r
\r
///\r
/// Generate software interrupt. Setting this bit generates an external\r
/// To reset the contents of the multicast MAC address filter list,\r
/// set this OpFlag:\r
///\r
-#define PXE_OPFLAGS_RECEIVE_FILTER_RESET_MCAST_LIST 0x2000\r
+#define PXE_OPFLAGS_RECEIVE_FILTER_RESET_MCAST_LIST 0x2000\r
\r
///\r
/// Enable unicast packet receiving. Packets sent to the current station\r
/// of the multicast MAC addresses in the multicast MAC address filter\r
/// list will be received. If the filter list is empty, no multicast\r
///\r
-#define PXE_OPFLAGS_RECEIVE_FILTER_FILTERED_MULTICAST 0x0004\r
+#define PXE_OPFLAGS_RECEIVE_FILTER_FILTERED_MULTICAST 0x0004\r
\r
///\r
/// Enable promiscuous packet receiving. All packets will be received.\r
///\r
/// Select the type of non-volatile data operation.\r
///\r
-#define PXE_OPFLAGS_NVDATA_OPMASK 0x0001\r
-#define PXE_OPFLAGS_NVDATA_READ 0x0000\r
-#define PXE_OPFLAGS_NVDATA_WRITE 0x0001\r
+#define PXE_OPFLAGS_NVDATA_OPMASK 0x0001\r
+#define PXE_OPFLAGS_NVDATA_READ 0x0000\r
+#define PXE_OPFLAGS_NVDATA_WRITE 0x0001\r
\r
///\r
/// UNDI Get Status.\r
/// buffers. Do not plan on getting one buffer per interrupt. Some\r
/// NICs and UNDIs may transmit multiple buffers per interrupt.\r
///\r
-#define PXE_OPFLAGS_GET_TRANSMITTED_BUFFERS 0x0002\r
+#define PXE_OPFLAGS_GET_TRANSMITTED_BUFFERS 0x0002\r
\r
///\r
/// Return current media status.\r
///\r
-#define PXE_OPFLAGS_GET_MEDIA_STATUS 0x0004\r
+#define PXE_OPFLAGS_GET_MEDIA_STATUS 0x0004\r
\r
///\r
/// UNDI Fill Header.\r
#define PXE_OPFLAGS_TRANSMIT_BLOCK 0x0001\r
#define PXE_OPFLAGS_TRANSMIT_DONT_BLOCK 0x0000\r
\r
-#define PXE_OPFLAGS_TRANSMIT_OPMASK 0x0002\r
-#define PXE_OPFLAGS_TRANSMIT_FRAGMENTED 0x0002\r
-#define PXE_OPFLAGS_TRANSMIT_WHOLE 0x0000\r
+#define PXE_OPFLAGS_TRANSMIT_OPMASK 0x0002\r
+#define PXE_OPFLAGS_TRANSMIT_FRAGMENTED 0x0002\r
+#define PXE_OPFLAGS_TRANSMIT_WHOLE 0x0000\r
\r
///\r
/// UNDI Receive.\r
///\r
/// PXE STATFLAGS.\r
///\r
-typedef PXE_UINT16 PXE_STATFLAGS;\r
+typedef PXE_UINT16 PXE_STATFLAGS;\r
\r
#define PXE_STATFLAGS_INITIALIZE 0x0000\r
\r
///\r
/// UNDI Get State.\r
///\r
-#define PXE_STATFLAGS_GET_STATE_MASK 0x0003\r
-#define PXE_STATFLAGS_GET_STATE_INITIALIZED 0x0002\r
-#define PXE_STATFLAGS_GET_STATE_STARTED 0x0001\r
-#define PXE_STATFLAGS_GET_STATE_STOPPED 0x0000\r
+#define PXE_STATFLAGS_GET_STATE_MASK 0x0003\r
+#define PXE_STATFLAGS_GET_STATE_INITIALIZED 0x0002\r
+#define PXE_STATFLAGS_GET_STATE_STARTED 0x0001\r
+#define PXE_STATFLAGS_GET_STATE_STOPPED 0x0000\r
\r
///\r
/// UNDI Start.\r
///\r
/// If set, receive interrupts are enabled.\r
///\r
-#define PXE_STATFLAGS_INTERRUPT_RECEIVE 0x0001\r
+#define PXE_STATFLAGS_INTERRUPT_RECEIVE 0x0001\r
\r
///\r
/// If set, transmit interrupts are enabled.\r
///\r
/// If set, command interrupts are enabled.\r
///\r
-#define PXE_STATFLAGS_INTERRUPT_COMMAND 0x0004\r
+#define PXE_STATFLAGS_INTERRUPT_COMMAND 0x0004\r
\r
///\r
/// UNDI Receive Filters.\r
/// If set, multicast packets that match up with the multicast address\r
/// filter list will be received.\r
///\r
-#define PXE_STATFLAGS_RECEIVE_FILTER_FILTERED_MULTICAST 0x0004\r
+#define PXE_STATFLAGS_RECEIVE_FILTER_FILTERED_MULTICAST 0x0004\r
\r
///\r
/// If set, all packets will be received.\r
///\r
/// Use to determine if an interrupt has occurred.\r
///\r
-#define PXE_STATFLAGS_GET_STATUS_INTERRUPT_MASK 0x000F\r
-#define PXE_STATFLAGS_GET_STATUS_NO_INTERRUPTS 0x0000\r
+#define PXE_STATFLAGS_GET_STATUS_INTERRUPT_MASK 0x000F\r
+#define PXE_STATFLAGS_GET_STATUS_NO_INTERRUPTS 0x0000\r
\r
///\r
/// If set, at least one receive interrupt occurred.\r
///\r
/// If set, at least one transmit interrupt occurred.\r
///\r
-#define PXE_STATFLAGS_GET_STATUS_TRANSMIT 0x0002\r
+#define PXE_STATFLAGS_GET_STATUS_TRANSMIT 0x0002\r
\r
///\r
/// If set, at least one command interrupt occurred.\r
///\r
/// If set, at least one software interrupt occurred.\r
///\r
-#define PXE_STATFLAGS_GET_STATUS_SOFTWARE 0x0008\r
+#define PXE_STATFLAGS_GET_STATUS_SOFTWARE 0x0008\r
\r
///\r
/// This flag is set if the transmitted buffer queue is empty. This flag\r
\r
///\r
/// UNDI Receive\r
-///.\r
+/// .\r
\r
///\r
/// No additional StatFlags.\r
///\r
-typedef PXE_UINT16 PXE_STATCODE;\r
+typedef PXE_UINT16 PXE_STATCODE;\r
\r
-#define PXE_STATCODE_INITIALIZE 0x0000\r
+#define PXE_STATCODE_INITIALIZE 0x0000\r
\r
///\r
/// Common StatCodes returned by all UNDI commands, UNDI protocol functions\r
/// and BC protocol functions.\r
///\r
-#define PXE_STATCODE_SUCCESS 0x0000\r
+#define PXE_STATCODE_SUCCESS 0x0000\r
\r
#define PXE_STATCODE_INVALID_CDB 0x0001\r
#define PXE_STATCODE_INVALID_CPB 0x0002\r
#define PXE_STATCODE_NOT_ENOUGH_MEMORY 0x0012\r
#define PXE_STATCODE_NO_DATA 0x0013\r
\r
-typedef PXE_UINT16 PXE_IFNUM;\r
+typedef PXE_UINT16 PXE_IFNUM;\r
\r
///\r
/// This interface number must be passed to the S/W UNDI Start command.\r
///\r
-#define PXE_IFNUM_START 0x0000\r
+#define PXE_IFNUM_START 0x0000\r
\r
///\r
/// This interface number is returned by the S/W UNDI Get State and\r
/// Start commands if information in the CDB, CPB or DB is invalid.\r
///\r
-#define PXE_IFNUM_INVALID 0x0000\r
+#define PXE_IFNUM_INVALID 0x0000\r
\r
-typedef PXE_UINT16 PXE_CONTROL;\r
+typedef PXE_UINT16 PXE_CONTROL;\r
\r
///\r
/// Setting this flag directs the UNDI to queue this command for later\r
/// is returned. If the queue is full, a PXE_STATCODE_CDB_QUEUE_FULL\r
/// error is returned.\r
///\r
-#define PXE_CONTROL_QUEUE_IF_BUSY 0x0002\r
+#define PXE_CONTROL_QUEUE_IF_BUSY 0x0002\r
\r
///\r
/// These two bit values are used to determine if there are more UNDI\r
#define PXE_CONTROL_LINK 0x0001\r
#define PXE_CONTROL_LAST_CDB_IN_LIST 0x0000\r
\r
-typedef PXE_UINT8 PXE_FRAME_TYPE;\r
+typedef PXE_UINT8 PXE_FRAME_TYPE;\r
\r
-#define PXE_FRAME_TYPE_NONE 0x00\r
-#define PXE_FRAME_TYPE_UNICAST 0x01\r
-#define PXE_FRAME_TYPE_BROADCAST 0x02\r
-#define PXE_FRAME_TYPE_FILTERED_MULTICAST 0x03\r
-#define PXE_FRAME_TYPE_PROMISCUOUS 0x04\r
-#define PXE_FRAME_TYPE_PROMISCUOUS_MULTICAST 0x05\r
+#define PXE_FRAME_TYPE_NONE 0x00\r
+#define PXE_FRAME_TYPE_UNICAST 0x01\r
+#define PXE_FRAME_TYPE_BROADCAST 0x02\r
+#define PXE_FRAME_TYPE_FILTERED_MULTICAST 0x03\r
+#define PXE_FRAME_TYPE_PROMISCUOUS 0x04\r
+#define PXE_FRAME_TYPE_PROMISCUOUS_MULTICAST 0x05\r
\r
-#define PXE_FRAME_TYPE_MULTICAST PXE_FRAME_TYPE_FILTERED_MULTICAST\r
+#define PXE_FRAME_TYPE_MULTICAST PXE_FRAME_TYPE_FILTERED_MULTICAST\r
\r
-typedef PXE_UINT32 PXE_IPV4;\r
+typedef PXE_UINT32 PXE_IPV4;\r
\r
-typedef PXE_UINT32 PXE_IPV6[4];\r
+typedef PXE_UINT32 PXE_IPV6[4];\r
#define PXE_MAC_LENGTH 32\r
\r
-typedef PXE_UINT8 PXE_MAC_ADDR[PXE_MAC_LENGTH];\r
+typedef PXE_UINT8 PXE_MAC_ADDR[PXE_MAC_LENGTH];\r
\r
-typedef PXE_UINT8 PXE_IFTYPE;\r
-typedef UINT16 PXE_MEDIA_PROTOCOL;\r
+typedef PXE_UINT8 PXE_IFTYPE;\r
+typedef UINT16 PXE_MEDIA_PROTOCOL;\r
\r
///\r
/// This information is from the ARP section of RFC 1700.\r
#define PXE_IFTYPE_FIBRE_CHANNEL 0x12\r
\r
typedef struct s_pxe_hw_undi {\r
- PXE_UINT32 Signature; ///< PXE_ROMID_SIGNATURE.\r
- PXE_UINT8 Len; ///< sizeof(PXE_HW_UNDI).\r
- PXE_UINT8 Fudge; ///< makes 8-bit cksum equal zero.\r
- PXE_UINT8 Rev; ///< PXE_ROMID_REV.\r
- PXE_UINT8 IFcnt; ///< physical connector count lower byte.\r
- PXE_UINT8 MajorVer; ///< PXE_ROMID_MAJORVER.\r
- PXE_UINT8 MinorVer; ///< PXE_ROMID_MINORVER.\r
- PXE_UINT8 IFcntExt; ///< physical connector count upper byte.\r
- PXE_UINT8 reserved; ///< zero, not used.\r
- PXE_UINT32 Implementation; ///< implementation flags.\r
+ PXE_UINT32 Signature; ///< PXE_ROMID_SIGNATURE.\r
+ PXE_UINT8 Len; ///< sizeof(PXE_HW_UNDI).\r
+ PXE_UINT8 Fudge; ///< makes 8-bit cksum equal zero.\r
+ PXE_UINT8 Rev; ///< PXE_ROMID_REV.\r
+ PXE_UINT8 IFcnt; ///< physical connector count lower byte.\r
+ PXE_UINT8 MajorVer; ///< PXE_ROMID_MAJORVER.\r
+ PXE_UINT8 MinorVer; ///< PXE_ROMID_MINORVER.\r
+ PXE_UINT8 IFcntExt; ///< physical connector count upper byte.\r
+ PXE_UINT8 reserved; ///< zero, not used.\r
+ PXE_UINT32 Implementation; ///< implementation flags.\r
///< reserved ///< vendor use.\r
///< UINT32 Status; ///< status port.\r
///< UINT32 Command; ///< command port.\r
///\r
/// If set, last command failed.\r
///\r
-#define PXE_HWSTAT_COMMAND_FAILED 0x20000000\r
+#define PXE_HWSTAT_COMMAND_FAILED 0x20000000\r
\r
///\r
/// If set, identifies enabled receive filters.\r
///\r
-#define PXE_HWSTAT_PROMISCUOUS_MULTICAST_RX_ENABLED 0x00001000\r
-#define PXE_HWSTAT_PROMISCUOUS_RX_ENABLED 0x00000800\r
-#define PXE_HWSTAT_BROADCAST_RX_ENABLED 0x00000400\r
-#define PXE_HWSTAT_MULTICAST_RX_ENABLED 0x00000200\r
-#define PXE_HWSTAT_UNICAST_RX_ENABLED 0x00000100\r
+#define PXE_HWSTAT_PROMISCUOUS_MULTICAST_RX_ENABLED 0x00001000\r
+#define PXE_HWSTAT_PROMISCUOUS_RX_ENABLED 0x00000800\r
+#define PXE_HWSTAT_BROADCAST_RX_ENABLED 0x00000400\r
+#define PXE_HWSTAT_MULTICAST_RX_ENABLED 0x00000200\r
+#define PXE_HWSTAT_UNICAST_RX_ENABLED 0x00000100\r
\r
///\r
/// If set, identifies enabled external interrupts.\r
///\r
-#define PXE_HWSTAT_SOFTWARE_INT_ENABLED 0x00000080\r
-#define PXE_HWSTAT_TX_COMPLETE_INT_ENABLED 0x00000040\r
-#define PXE_HWSTAT_PACKET_RX_INT_ENABLED 0x00000020\r
-#define PXE_HWSTAT_CMD_COMPLETE_INT_ENABLED 0x00000010\r
+#define PXE_HWSTAT_SOFTWARE_INT_ENABLED 0x00000080\r
+#define PXE_HWSTAT_TX_COMPLETE_INT_ENABLED 0x00000040\r
+#define PXE_HWSTAT_PACKET_RX_INT_ENABLED 0x00000020\r
+#define PXE_HWSTAT_CMD_COMPLETE_INT_ENABLED 0x00000010\r
\r
///\r
/// If set, identifies pending interrupts.\r
///\r
-#define PXE_HWSTAT_SOFTWARE_INT_PENDING 0x00000008\r
-#define PXE_HWSTAT_TX_COMPLETE_INT_PENDING 0x00000004\r
-#define PXE_HWSTAT_PACKET_RX_INT_PENDING 0x00000002\r
-#define PXE_HWSTAT_CMD_COMPLETE_INT_PENDING 0x00000001\r
+#define PXE_HWSTAT_SOFTWARE_INT_PENDING 0x00000008\r
+#define PXE_HWSTAT_TX_COMPLETE_INT_PENDING 0x00000004\r
+#define PXE_HWSTAT_PACKET_RX_INT_PENDING 0x00000002\r
+#define PXE_HWSTAT_CMD_COMPLETE_INT_PENDING 0x00000001\r
\r
///\r
/// Command port definitions.\r
///\r
/// Use these to enable/disable receive filters.\r
///\r
-#define PXE_HWCMD_PROMISCUOUS_MULTICAST_RX_ENABLE 0x00001000\r
-#define PXE_HWCMD_PROMISCUOUS_RX_ENABLE 0x00000800\r
-#define PXE_HWCMD_BROADCAST_RX_ENABLE 0x00000400\r
-#define PXE_HWCMD_MULTICAST_RX_ENABLE 0x00000200\r
-#define PXE_HWCMD_UNICAST_RX_ENABLE 0x00000100\r
+#define PXE_HWCMD_PROMISCUOUS_MULTICAST_RX_ENABLE 0x00001000\r
+#define PXE_HWCMD_PROMISCUOUS_RX_ENABLE 0x00000800\r
+#define PXE_HWCMD_BROADCAST_RX_ENABLE 0x00000400\r
+#define PXE_HWCMD_MULTICAST_RX_ENABLE 0x00000200\r
+#define PXE_HWCMD_UNICAST_RX_ENABLE 0x00000100\r
\r
///\r
/// Use these to enable/disable external interrupts.\r
///\r
-#define PXE_HWCMD_SOFTWARE_INT_ENABLE 0x00000080\r
-#define PXE_HWCMD_TX_COMPLETE_INT_ENABLE 0x00000040\r
-#define PXE_HWCMD_PACKET_RX_INT_ENABLE 0x00000020\r
-#define PXE_HWCMD_CMD_COMPLETE_INT_ENABLE 0x00000010\r
+#define PXE_HWCMD_SOFTWARE_INT_ENABLE 0x00000080\r
+#define PXE_HWCMD_TX_COMPLETE_INT_ENABLE 0x00000040\r
+#define PXE_HWCMD_PACKET_RX_INT_ENABLE 0x00000020\r
+#define PXE_HWCMD_CMD_COMPLETE_INT_ENABLE 0x00000010\r
\r
///\r
/// Use these to clear pending external interrupts.\r
#define PXE_HWCMD_CLEAR_CMD_COMPLETE_INT 0x00000001\r
\r
typedef struct s_pxe_sw_undi {\r
- PXE_UINT32 Signature; ///< PXE_ROMID_SIGNATURE.\r
- PXE_UINT8 Len; ///< sizeof(PXE_SW_UNDI).\r
- PXE_UINT8 Fudge; ///< makes 8-bit cksum zero.\r
- PXE_UINT8 Rev; ///< PXE_ROMID_REV.\r
- PXE_UINT8 IFcnt; ///< physical connector count lower byte.\r
- PXE_UINT8 MajorVer; ///< PXE_ROMID_MAJORVER.\r
- PXE_UINT8 MinorVer; ///< PXE_ROMID_MINORVER.\r
- PXE_UINT8 IFcntExt; ///< physical connector count upper byte.\r
- PXE_UINT8 reserved1; ///< zero, not used.\r
- PXE_UINT32 Implementation; ///< Implementation flags.\r
- PXE_UINT64 EntryPoint; ///< API entry point.\r
- PXE_UINT8 reserved2[3]; ///< zero, not used.\r
- PXE_UINT8 BusCnt; ///< number of bustypes supported.\r
- PXE_UINT32 BusType[1]; ///< list of supported bustypes.\r
+ PXE_UINT32 Signature; ///< PXE_ROMID_SIGNATURE.\r
+ PXE_UINT8 Len; ///< sizeof(PXE_SW_UNDI).\r
+ PXE_UINT8 Fudge; ///< makes 8-bit cksum zero.\r
+ PXE_UINT8 Rev; ///< PXE_ROMID_REV.\r
+ PXE_UINT8 IFcnt; ///< physical connector count lower byte.\r
+ PXE_UINT8 MajorVer; ///< PXE_ROMID_MAJORVER.\r
+ PXE_UINT8 MinorVer; ///< PXE_ROMID_MINORVER.\r
+ PXE_UINT8 IFcntExt; ///< physical connector count upper byte.\r
+ PXE_UINT8 reserved1; ///< zero, not used.\r
+ PXE_UINT32 Implementation; ///< Implementation flags.\r
+ PXE_UINT64 EntryPoint; ///< API entry point.\r
+ PXE_UINT8 reserved2[3]; ///< zero, not used.\r
+ PXE_UINT8 BusCnt; ///< number of bustypes supported.\r
+ PXE_UINT32 BusType[1]; ///< list of supported bustypes.\r
} PXE_SW_UNDI;\r
\r
typedef union u_pxe_undi {\r
- PXE_HW_UNDI hw;\r
- PXE_SW_UNDI sw;\r
+ PXE_HW_UNDI hw;\r
+ PXE_SW_UNDI sw;\r
} PXE_UNDI;\r
\r
///\r
/// Signature of !PXE structure.\r
///\r
-#define PXE_ROMID_SIGNATURE PXE_BUSTYPE ('!', 'P', 'X', 'E')\r
+#define PXE_ROMID_SIGNATURE PXE_BUSTYPE ('!', 'P', 'X', 'E')\r
\r
///\r
/// !PXE structure format revision\r
-///.\r
-#define PXE_ROMID_REV 0x02\r
+/// .\r
+#define PXE_ROMID_REV 0x02\r
\r
///\r
/// UNDI command interface revision. These are the values that get sent\r
/// in option 94 (Client Network Interface Identifier) in the DHCP Discover\r
/// and PXE Boot Server Request packets.\r
///\r
-#define PXE_ROMID_MAJORVER 0x03\r
-#define PXE_ROMID_MINORVER 0x01\r
+#define PXE_ROMID_MAJORVER 0x03\r
+#define PXE_ROMID_MINORVER 0x01\r
\r
///\r
/// Implementation flags.\r
#define PXE_ROMID_IMP_CMD_COMPLETE_INT_SUPPORTED 0x00000001\r
\r
typedef struct s_pxe_cdb {\r
- PXE_OPCODE OpCode;\r
- PXE_OPFLAGS OpFlags;\r
- PXE_UINT16 CPBsize;\r
- PXE_UINT16 DBsize;\r
- PXE_UINT64 CPBaddr;\r
- PXE_UINT64 DBaddr;\r
- PXE_STATCODE StatCode;\r
- PXE_STATFLAGS StatFlags;\r
- PXE_UINT16 IFnum;\r
- PXE_CONTROL Control;\r
+ PXE_OPCODE OpCode;\r
+ PXE_OPFLAGS OpFlags;\r
+ PXE_UINT16 CPBsize;\r
+ PXE_UINT16 DBsize;\r
+ PXE_UINT64 CPBaddr;\r
+ PXE_UINT64 DBaddr;\r
+ PXE_STATCODE StatCode;\r
+ PXE_STATFLAGS StatFlags;\r
+ PXE_UINT16 IFnum;\r
+ PXE_CONTROL Control;\r
} PXE_CDB;\r
\r
typedef union u_pxe_ip_addr {\r
- PXE_IPV6 IPv6;\r
- PXE_IPV4 IPv4;\r
+ PXE_IPV6 IPv6;\r
+ PXE_IPV4 IPv4;\r
} PXE_IP_ADDR;\r
\r
typedef union pxe_device {\r
/// See S/W UNDI ROMID structure definition for PCI and\r
/// PCC BusType definitions.\r
///\r
- PXE_UINT32 BusType;\r
+ PXE_UINT32 BusType;\r
\r
///\r
/// Bus, device & function numbers that locate this device.\r
///\r
- PXE_UINT16 Bus;\r
- PXE_UINT8 Device;\r
- PXE_UINT8 Function;\r
- }\r
- PCI, PCC;\r
-\r
+ PXE_UINT16 Bus;\r
+ PXE_UINT8 Device;\r
+ PXE_UINT8 Function;\r
+ } PCI, PCC;\r
} PXE_DEVICE;\r
\r
///\r
/// cpb and db definitions\r
///\r
-#define MAX_PCI_CONFIG_LEN 64 ///< # of dwords.\r
-#define MAX_EEPROM_LEN 128 ///< # of dwords.\r
-#define MAX_XMIT_BUFFERS 32 ///< recycling Q length for xmit_done.\r
-#define MAX_MCAST_ADDRESS_CNT 8\r
+#define MAX_PCI_CONFIG_LEN 64 ///< # of dwords.\r
+#define MAX_EEPROM_LEN 128 ///< # of dwords.\r
+#define MAX_XMIT_BUFFERS 32 ///< recycling Q length for xmit_done.\r
+#define MAX_MCAST_ADDRESS_CNT 8\r
\r
typedef struct s_pxe_cpb_start_30 {\r
///\r
///\r
/// This field cannot be set to zero.\r
///\r
- UINT64 Delay;\r
+ UINT64 Delay;\r
\r
///\r
/// PXE_VOID Block(UINT32 enable);\r
///\r
/// This field cannot be set to zero.\r
///\r
- UINT64 Block;\r
+ UINT64 Block;\r
\r
///\r
/// PXE_VOID Virt2Phys(UINT64 virtual, UINT64 physical_ptr);\r
/// This field can be set to zero if virtual and physical addresses\r
/// are equal.\r
///\r
- UINT64 Virt2Phys;\r
+ UINT64 Virt2Phys;\r
///\r
/// PXE_VOID Mem_IO(UINT8 read_write, UINT8 len, UINT64 port,\r
/// UINT64 buf_addr);\r
///\r
/// This field can not be set to zero.\r
///\r
- UINT64 Mem_IO;\r
+ UINT64 Mem_IO;\r
} PXE_CPB_START_30;\r
\r
typedef struct s_pxe_cpb_start_31 {\r
///\r
/// This field cannot be set to zero.\r
///\r
- UINT64 Delay;\r
+ UINT64 Delay;\r
\r
///\r
/// PXE_VOID Block(UINT64 unq_id, UINT32 enable);\r
///\r
/// This field cannot be set to zero.\r
///\r
- UINT64 Block;\r
+ UINT64 Block;\r
\r
///\r
/// PXE_VOID Virt2Phys(UINT64 UnqId, UINT64 virtual, UINT64 physical_ptr);\r
/// This field can be set to zero if virtual and physical addresses\r
/// are equal.\r
///\r
- UINT64 Virt2Phys;\r
+ UINT64 Virt2Phys;\r
///\r
/// PXE_VOID Mem_IO(UINT64 UnqId, UINT8 read_write, UINT8 len, UINT64 port,\r
/// UINT64 buf_addr);\r
///\r
/// This field can not be set to zero.\r
///\r
- UINT64 Mem_IO;\r
+ UINT64 Mem_IO;\r
///\r
/// PXE_VOID Map_Mem(UINT64 unq_id, UINT64 virtual_addr, UINT32 size,\r
/// UINT32 Direction, UINT64 mapped_addr);\r
///\r
/// This field can be set to zero if there is no mapping service available.\r
///\r
- UINT64 Map_Mem;\r
+ UINT64 Map_Mem;\r
\r
///\r
/// PXE_VOID UnMap_Mem(UINT64 unq_id, UINT64 virtual_addr, UINT32 size,\r
///\r
/// This field can be set to zero if there is no unmapping service available.\r
///\r
- UINT64 UnMap_Mem;\r
+ UINT64 UnMap_Mem;\r
\r
///\r
/// PXE_VOID Sync_Mem(UINT64 unq_id, UINT64 virtual,\r
///\r
/// This field can be set to zero if there is no service available.\r
///\r
- UINT64 Sync_Mem;\r
+ UINT64 Sync_Mem;\r
\r
///\r
/// protocol driver can provide anything for this Unique_ID, UNDI remembers\r
- /// that as just a 64bit value assocaited to the interface specified by\r
+ /// that as just a 64bit value associated to the interface specified by\r
/// the ifnum and gives it back as a parameter to all the call-back routines\r
/// when calling for that interface!\r
///\r
- UINT64 Unique_ID;\r
+ UINT64 Unique_ID;\r
} PXE_CPB_START_31;\r
\r
-#define TO_AND_FROM_DEVICE 0\r
-#define FROM_DEVICE 1\r
-#define TO_DEVICE 2\r
+#define TO_AND_FROM_DEVICE 0\r
+#define FROM_DEVICE 1\r
+#define TO_DEVICE 2\r
\r
-#define PXE_DELAY_MILLISECOND 1000\r
-#define PXE_DELAY_SECOND 1000000\r
-#define PXE_IO_READ 0\r
-#define PXE_IO_WRITE 1\r
-#define PXE_MEM_READ 2\r
-#define PXE_MEM_WRITE 4\r
+#define PXE_DELAY_MILLISECOND 1000\r
+#define PXE_DELAY_SECOND 1000000\r
+#define PXE_IO_READ 0\r
+#define PXE_IO_WRITE 1\r
+#define PXE_MEM_READ 2\r
+#define PXE_MEM_WRITE 4\r
\r
typedef struct s_pxe_db_get_init_info {\r
///\r
/// If MemoryRequired is zero, the UNDI does not need and will not\r
/// use system memory to receive and transmit packets.\r
///\r
- PXE_UINT32 MemoryRequired;\r
+ PXE_UINT32 MemoryRequired;\r
\r
///\r
/// Maximum frame data length for Tx/Rx excluding the media header.\r
///\r
- PXE_UINT32 FrameDataLen;\r
+ PXE_UINT32 FrameDataLen;\r
\r
///\r
/// Supported link speeds are in units of mega bits. Common ethernet\r
/// values are 10, 100 and 1000. Unused LinkSpeeds[] entries are zero\r
/// filled.\r
///\r
- PXE_UINT32 LinkSpeeds[4];\r
+ PXE_UINT32 LinkSpeeds[4];\r
\r
///\r
/// Number of non-volatile storage items.\r
///\r
- PXE_UINT32 NvCount;\r
+ PXE_UINT32 NvCount;\r
\r
///\r
/// Width of non-volatile storage item in bytes. 0, 1, 2 or 4\r
///\r
- PXE_UINT16 NvWidth;\r
+ PXE_UINT16 NvWidth;\r
\r
///\r
/// Media header length. This is the typical media header length for\r
/// this UNDI. This information is needed when allocating receive\r
/// and transmit buffers.\r
///\r
- PXE_UINT16 MediaHeaderLen;\r
+ PXE_UINT16 MediaHeaderLen;\r
\r
///\r
/// Number of bytes in the NIC hardware (MAC) address.\r
///\r
- PXE_UINT16 HWaddrLen;\r
+ PXE_UINT16 HWaddrLen;\r
\r
///\r
/// Maximum number of multicast MAC addresses in the multicast\r
/// MAC address filter list.\r
///\r
- PXE_UINT16 MCastFilterCnt;\r
+ PXE_UINT16 MCastFilterCnt;\r
\r
///\r
/// Default number and size of transmit and receive buffers that will\r
/// command. If MemoryRequired is zero, this allocation will come out of\r
/// memory on the NIC.\r
///\r
- PXE_UINT16 TxBufCnt;\r
- PXE_UINT16 TxBufSize;\r
- PXE_UINT16 RxBufCnt;\r
- PXE_UINT16 RxBufSize;\r
+ PXE_UINT16 TxBufCnt;\r
+ PXE_UINT16 TxBufSize;\r
+ PXE_UINT16 RxBufCnt;\r
+ PXE_UINT16 RxBufSize;\r
\r
///\r
/// Hardware interface types defined in the Assigned Numbers RFC\r
/// and used in DHCP and ARP packets.\r
/// See the PXE_IFTYPE typedef and PXE_IFTYPE_xxx macros.\r
///\r
- PXE_UINT8 IFtype;\r
+ PXE_UINT8 IFtype;\r
\r
///\r
/// Supported duplex. See PXE_DUPLEX_xxxxx #defines below.\r
///\r
- PXE_UINT8 SupportedDuplexModes;\r
+ PXE_UINT8 SupportedDuplexModes;\r
\r
///\r
/// Supported loopback options. See PXE_LOOPBACK_xxxxx #defines below.\r
///\r
- PXE_UINT8 SupportedLoopBackModes;\r
+ PXE_UINT8 SupportedLoopBackModes;\r
} PXE_DB_GET_INIT_INFO;\r
\r
-#define PXE_MAX_TXRX_UNIT_ETHER 1500\r
+#define PXE_MAX_TXRX_UNIT_ETHER 1500\r
\r
-#define PXE_HWADDR_LEN_ETHER 0x0006\r
-#define PXE_MAC_HEADER_LEN_ETHER 0x000E\r
+#define PXE_HWADDR_LEN_ETHER 0x0006\r
+#define PXE_MAC_HEADER_LEN_ETHER 0x000E\r
\r
#define PXE_DUPLEX_ENABLE_FULL_SUPPORTED 1\r
#define PXE_DUPLEX_FORCE_FULL_SUPPORTED 2\r
\r
-#define PXE_LOOPBACK_INTERNAL_SUPPORTED 1\r
-#define PXE_LOOPBACK_EXTERNAL_SUPPORTED 2\r
+#define PXE_LOOPBACK_INTERNAL_SUPPORTED 1\r
+#define PXE_LOOPBACK_EXTERNAL_SUPPORTED 2\r
\r
typedef struct s_pxe_pci_config_info {\r
///\r
/// This is the flag field for the PXE_DB_GET_CONFIG_INFO union.\r
/// For PCI bus devices, this field is set to PXE_BUSTYPE_PCI.\r
///\r
- UINT32 BusType;\r
+ UINT32 BusType;\r
\r
///\r
/// This identifies the PCI network device that this UNDI interface.\r
/// is bound to.\r
///\r
- UINT16 Bus;\r
- UINT8 Device;\r
- UINT8 Function;\r
+ UINT16 Bus;\r
+ UINT8 Device;\r
+ UINT8 Function;\r
\r
///\r
/// This is a copy of the PCI configuration space for this\r
/// network device.\r
///\r
union {\r
- UINT8 Byte[256];\r
- UINT16 Word[128];\r
- UINT32 Dword[64];\r
+ UINT8 Byte[256];\r
+ UINT16 Word[128];\r
+ UINT32 Dword[64];\r
} Config;\r
} PXE_PCI_CONFIG_INFO;\r
\r
/// This is the flag field for the PXE_DB_GET_CONFIG_INFO union.\r
/// For PCC bus devices, this field is set to PXE_BUSTYPE_PCC.\r
///\r
- PXE_UINT32 BusType;\r
+ PXE_UINT32 BusType;\r
\r
///\r
/// This identifies the PCC network device that this UNDI interface\r
/// is bound to.\r
///\r
- PXE_UINT16 Bus;\r
- PXE_UINT8 Device;\r
- PXE_UINT8 Function;\r
+ PXE_UINT16 Bus;\r
+ PXE_UINT8 Device;\r
+ PXE_UINT8 Function;\r
\r
///\r
/// This is a copy of the PCC configuration space for this\r
/// network device.\r
///\r
union {\r
- PXE_UINT8 Byte[256];\r
- PXE_UINT16 Word[128];\r
- PXE_UINT32 Dword[64];\r
+ PXE_UINT8 Byte[256];\r
+ PXE_UINT16 Word[128];\r
+ PXE_UINT32 Dword[64];\r
} Config;\r
} PXE_PCC_CONFIG_INFO;\r
\r
typedef union u_pxe_db_get_config_info {\r
- PXE_PCI_CONFIG_INFO pci;\r
- PXE_PCC_CONFIG_INFO pcc;\r
+ PXE_PCI_CONFIG_INFO pci;\r
+ PXE_PCC_CONFIG_INFO pcc;\r
} PXE_DB_GET_CONFIG_INFO;\r
\r
typedef struct s_pxe_cpb_initialize {\r
/// be in contiguous physical memory and cannot be swapped out. The UNDI\r
/// will be using this for transmit and receive buffering.\r
///\r
- PXE_UINT64 MemoryAddr;\r
+ PXE_UINT64 MemoryAddr;\r
\r
///\r
/// MemoryLength must be greater than or equal to MemoryRequired\r
/// returned by the Get Init Info command.\r
///\r
- PXE_UINT32 MemoryLength;\r
+ PXE_UINT32 MemoryLength;\r
\r
///\r
/// Desired link speed in Mbit/sec. Common ethernet values are 10, 100\r
/// and 1000. Setting a value of zero will auto-detect and/or use the\r
/// default link speed (operation depends on UNDI/NIC functionality).\r
///\r
- PXE_UINT32 LinkSpeed;\r
+ PXE_UINT32 LinkSpeed;\r
\r
///\r
/// Suggested number and size of receive and transmit buffers to\r
/// If these fields are set to zero, the UNDI will allocate buffer\r
/// counts and sizes as it sees fit.\r
///\r
- PXE_UINT16 TxBufCnt;\r
- PXE_UINT16 TxBufSize;\r
- PXE_UINT16 RxBufCnt;\r
- PXE_UINT16 RxBufSize;\r
+ PXE_UINT16 TxBufCnt;\r
+ PXE_UINT16 TxBufSize;\r
+ PXE_UINT16 RxBufCnt;\r
+ PXE_UINT16 RxBufSize;\r
\r
///\r
/// The following configuration parameters are optional and must be zero\r
/// to use the default values.\r
///\r
- PXE_UINT8 DuplexMode;\r
+ PXE_UINT8 DuplexMode;\r
\r
- PXE_UINT8 LoopBackMode;\r
+ PXE_UINT8 LoopBackMode;\r
} PXE_CPB_INITIALIZE;\r
\r
-#define PXE_DUPLEX_DEFAULT 0x00\r
-#define PXE_FORCE_FULL_DUPLEX 0x01\r
-#define PXE_ENABLE_FULL_DUPLEX 0x02\r
-#define PXE_FORCE_HALF_DUPLEX 0x04\r
-#define PXE_DISABLE_FULL_DUPLEX 0x08\r
+#define PXE_DUPLEX_DEFAULT 0x00\r
+#define PXE_FORCE_FULL_DUPLEX 0x01\r
+#define PXE_ENABLE_FULL_DUPLEX 0x02\r
+#define PXE_FORCE_HALF_DUPLEX 0x04\r
+#define PXE_DISABLE_FULL_DUPLEX 0x08\r
\r
-#define LOOPBACK_NORMAL 0\r
-#define LOOPBACK_INTERNAL 1\r
-#define LOOPBACK_EXTERNAL 2\r
+#define LOOPBACK_NORMAL 0\r
+#define LOOPBACK_INTERNAL 1\r
+#define LOOPBACK_EXTERNAL 2\r
\r
typedef struct s_pxe_db_initialize {\r
///\r
/// Memory used by the UNDI and network device is allocated from the\r
/// lowest memory buffer address.\r
///\r
- PXE_UINT32 MemoryUsed;\r
+ PXE_UINT32 MemoryUsed;\r
\r
///\r
/// Actual number and size of receive and transmit buffers that were\r
/// allocated.\r
///\r
- PXE_UINT16 TxBufCnt;\r
- PXE_UINT16 TxBufSize;\r
- PXE_UINT16 RxBufCnt;\r
- PXE_UINT16 RxBufSize;\r
+ PXE_UINT16 TxBufCnt;\r
+ PXE_UINT16 TxBufSize;\r
+ PXE_UINT16 RxBufCnt;\r
+ PXE_UINT16 RxBufSize;\r
} PXE_DB_INITIALIZE;\r
\r
typedef struct s_pxe_cpb_receive_filters {\r
/// List of multicast MAC addresses. This list, if present, will\r
/// replace the existing multicast MAC address filter list.\r
///\r
- PXE_MAC_ADDR MCastList[MAX_MCAST_ADDRESS_CNT];\r
+ PXE_MAC_ADDR MCastList[MAX_MCAST_ADDRESS_CNT];\r
} PXE_CPB_RECEIVE_FILTERS;\r
\r
typedef struct s_pxe_db_receive_filters {\r
///\r
/// Filtered multicast MAC address list.\r
///\r
- PXE_MAC_ADDR MCastList[MAX_MCAST_ADDRESS_CNT];\r
+ PXE_MAC_ADDR MCastList[MAX_MCAST_ADDRESS_CNT];\r
} PXE_DB_RECEIVE_FILTERS;\r
\r
typedef struct s_pxe_cpb_station_address {\r
/// If supplied and supported, the current station MAC address\r
/// will be changed.\r
///\r
- PXE_MAC_ADDR StationAddr;\r
+ PXE_MAC_ADDR StationAddr;\r
} PXE_CPB_STATION_ADDRESS;\r
\r
typedef struct s_pxe_dpb_station_address {\r
///\r
/// Current station MAC address.\r
///\r
- PXE_MAC_ADDR StationAddr;\r
+ PXE_MAC_ADDR StationAddr;\r
\r
///\r
/// Station broadcast MAC address.\r
///\r
- PXE_MAC_ADDR BroadcastAddr;\r
+ PXE_MAC_ADDR BroadcastAddr;\r
\r
///\r
/// Permanent station MAC address.\r
///\r
- PXE_MAC_ADDR PermanentAddr;\r
+ PXE_MAC_ADDR PermanentAddr;\r
} PXE_DB_STATION_ADDRESS;\r
\r
typedef struct s_pxe_db_statistics {\r
/// If bit 0x21 is set, Data[0x21] is collected.\r
/// Etc.\r
///\r
- PXE_UINT64 Supported;\r
+ PXE_UINT64 Supported;\r
\r
///\r
/// Statistic data.\r
///\r
- PXE_UINT64 Data[64];\r
+ PXE_UINT64 Data[64];\r
} PXE_DB_STATISTICS;\r
\r
///\r
///\r
/// Number of valid frames received and copied into receive buffers.\r
///\r
-#define PXE_STATISTICS_RX_GOOD_FRAMES 0x01\r
+#define PXE_STATISTICS_RX_GOOD_FRAMES 0x01\r
\r
///\r
/// Number of frames below the minimum length for the media.\r
/// Number of frames longer than the maxminum length for the\r
/// media. This would be >1500 for ethernet.\r
///\r
-#define PXE_STATISTICS_RX_OVERSIZE_FRAMES 0x03\r
+#define PXE_STATISTICS_RX_OVERSIZE_FRAMES 0x03\r
\r
///\r
/// Valid frames that were dropped because receive buffers were full.\r
/// Total number of bytes received. Includes frames with errors\r
/// and dropped frames.\r
///\r
-#define PXE_STATISTICS_RX_TOTAL_BYTES 0x09\r
+#define PXE_STATISTICS_RX_TOTAL_BYTES 0x09\r
\r
///\r
/// Transmit statistics.\r
///\r
/// Number of collisions detection on this subnet.\r
///\r
-#define PXE_STATISTICS_COLLISIONS 0x14\r
+#define PXE_STATISTICS_COLLISIONS 0x14\r
\r
///\r
/// Number of frames destined for unsupported protocol.\r
///\r
-#define PXE_STATISTICS_UNSUPPORTED_PROTOCOL 0x15\r
+#define PXE_STATISTICS_UNSUPPORTED_PROTOCOL 0x15\r
\r
///\r
/// Number of valid frames received that were duplicated.\r
///\r
-#define PXE_STATISTICS_RX_DUPLICATED_FRAMES 0x16\r
+#define PXE_STATISTICS_RX_DUPLICATED_FRAMES 0x16\r
\r
///\r
/// Number of encrypted frames received that failed to decrypt.\r
///\r
-#define PXE_STATISTICS_RX_DECRYPT_ERROR_FRAMES 0x17\r
+#define PXE_STATISTICS_RX_DECRYPT_ERROR_FRAMES 0x17\r
\r
///\r
/// Number of frames that failed to transmit after exceeding the retry limit.\r
///\r
-#define PXE_STATISTICS_TX_ERROR_FRAMES 0x18\r
+#define PXE_STATISTICS_TX_ERROR_FRAMES 0x18\r
\r
///\r
/// Number of frames transmitted successfully after more than one attempt.\r
///\r
-#define PXE_STATISTICS_TX_RETRY_FRAMES 0x19\r
+#define PXE_STATISTICS_TX_RETRY_FRAMES 0x19\r
\r
typedef struct s_pxe_cpb_mcast_ip_to_mac {\r
///\r
/// Multicast IP address to be converted to multicast MAC address.\r
///\r
- PXE_IP_ADDR IP;\r
+ PXE_IP_ADDR IP;\r
} PXE_CPB_MCAST_IP_TO_MAC;\r
\r
typedef struct s_pxe_db_mcast_ip_to_mac {\r
///\r
/// Multicast MAC address.\r
///\r
- PXE_MAC_ADDR MAC;\r
+ PXE_MAC_ADDR MAC;\r
} PXE_DB_MCAST_IP_TO_MAC;\r
\r
typedef struct s_pxe_cpb_nvdata_sparse {\r
///\r
/// Non-volatile storage address to be changed.\r
///\r
- PXE_UINT32 Addr;\r
+ PXE_UINT32 Addr;\r
\r
///\r
/// Data item to write into above storage address.\r
///\r
union {\r
- PXE_UINT8 Byte;\r
- PXE_UINT16 Word;\r
- PXE_UINT32 Dword;\r
+ PXE_UINT8 Byte;\r
+ PXE_UINT16 Word;\r
+ PXE_UINT32 Dword;\r
} Data;\r
} Item[MAX_EEPROM_LEN];\r
} PXE_CPB_NVDATA_SPARSE;\r
///\r
/// Array of byte-wide data items.\r
///\r
- PXE_UINT8 Byte[MAX_EEPROM_LEN << 2];\r
+ PXE_UINT8 Byte[MAX_EEPROM_LEN << 2];\r
\r
///\r
/// Array of word-wide data items.\r
///\r
- PXE_UINT16 Word[MAX_EEPROM_LEN << 1];\r
+ PXE_UINT16 Word[MAX_EEPROM_LEN << 1];\r
\r
///\r
/// Array of dword-wide data items.\r
///\r
- PXE_UINT32 Dword[MAX_EEPROM_LEN];\r
+ PXE_UINT32 Dword[MAX_EEPROM_LEN];\r
} PXE_CPB_NVDATA_BULK;\r
\r
typedef struct s_pxe_db_nvdata {\r
///\r
/// Array of byte-wide data items.\r
///\r
- PXE_UINT8 Byte[MAX_EEPROM_LEN << 2];\r
+ PXE_UINT8 Byte[MAX_EEPROM_LEN << 2];\r
\r
///\r
/// Array of word-wide data items.\r
///\r
- PXE_UINT16 Word[MAX_EEPROM_LEN << 1];\r
+ PXE_UINT16 Word[MAX_EEPROM_LEN << 1];\r
\r
///\r
/// Array of dword-wide data items.\r
///\r
- PXE_UINT32 Dword[MAX_EEPROM_LEN];\r
+ PXE_UINT32 Dword[MAX_EEPROM_LEN];\r
} Data;\r
} PXE_DB_NVDATA;\r
\r
/// Length of next receive frame (header + data). If this is zero,\r
/// there is no next receive frame available.\r
///\r
- PXE_UINT32 RxFrameLen;\r
+ PXE_UINT32 RxFrameLen;\r
\r
///\r
/// Reserved, set to zero.\r
///\r
- PXE_UINT32 reserved;\r
+ PXE_UINT32 reserved;\r
\r
///\r
/// Addresses of transmitted buffers that need to be recycled.\r
///\r
- PXE_UINT64 TxBuffer[MAX_XMIT_BUFFERS];\r
+ PXE_UINT64 TxBuffer[MAX_XMIT_BUFFERS];\r
} PXE_DB_GET_STATUS;\r
\r
typedef struct s_pxe_cpb_fill_header {\r
/// Source and destination MAC addresses. These will be copied into\r
/// the media header without doing byte swapping.\r
///\r
- PXE_MAC_ADDR SrcAddr;\r
- PXE_MAC_ADDR DestAddr;\r
+ PXE_MAC_ADDR SrcAddr;\r
+ PXE_MAC_ADDR DestAddr;\r
\r
///\r
/// Address of first byte of media header. The first byte of packet data\r
/// follows the last byte of the media header.\r
///\r
- PXE_UINT64 MediaHeader;\r
+ PXE_UINT64 MediaHeader;\r
\r
///\r
/// Length of packet data in bytes (not including the media header).\r
///\r
- PXE_UINT32 PacketLen;\r
+ PXE_UINT32 PacketLen;\r
\r
///\r
/// Protocol type. This will be copied into the media header without\r
/// doing byte swapping. Protocol type numbers can be obtained from\r
/// the Assigned Numbers RFC 1700.\r
///\r
- PXE_UINT16 Protocol;\r
+ PXE_UINT16 Protocol;\r
\r
///\r
/// Length of the media header in bytes.\r
///\r
- PXE_UINT16 MediaHeaderLen;\r
+ PXE_UINT16 MediaHeaderLen;\r
} PXE_CPB_FILL_HEADER;\r
\r
-#define PXE_PROTOCOL_ETHERNET_IP 0x0800\r
-#define PXE_PROTOCOL_ETHERNET_ARP 0x0806\r
-#define MAX_XMIT_FRAGMENTS 16\r
+#define PXE_PROTOCOL_ETHERNET_IP 0x0800\r
+#define PXE_PROTOCOL_ETHERNET_ARP 0x0806\r
+#define MAX_XMIT_FRAGMENTS 16\r
\r
typedef struct s_pxe_cpb_fill_header_fragmented {\r
///\r
/// Source and destination MAC addresses. These will be copied into\r
/// the media header without doing byte swapping.\r
///\r
- PXE_MAC_ADDR SrcAddr;\r
- PXE_MAC_ADDR DestAddr;\r
+ PXE_MAC_ADDR SrcAddr;\r
+ PXE_MAC_ADDR DestAddr;\r
\r
///\r
/// Length of packet data in bytes (not including the media header).\r
///\r
- PXE_UINT32 PacketLen;\r
+ PXE_UINT32 PacketLen;\r
\r
///\r
/// Protocol type. This will be copied into the media header without\r
/// doing byte swapping. Protocol type numbers can be obtained from\r
/// the Assigned Numbers RFC 1700.\r
///\r
- PXE_MEDIA_PROTOCOL Protocol;\r
+ PXE_MEDIA_PROTOCOL Protocol;\r
\r
///\r
/// Length of the media header in bytes.\r
///\r
- PXE_UINT16 MediaHeaderLen;\r
+ PXE_UINT16 MediaHeaderLen;\r
\r
///\r
/// Number of packet fragment descriptors.\r
///\r
- PXE_UINT16 FragCnt;\r
+ PXE_UINT16 FragCnt;\r
\r
///\r
/// Reserved, must be set to zero.\r
///\r
- PXE_UINT16 reserved;\r
+ PXE_UINT16 reserved;\r
\r
///\r
/// Array of packet fragment descriptors. The first byte of the media\r
///\r
/// Address of this packet fragment.\r
///\r
- PXE_UINT64 FragAddr;\r
+ PXE_UINT64 FragAddr;\r
\r
///\r
/// Length of this packet fragment.\r
///\r
- PXE_UINT32 FragLen;\r
+ PXE_UINT32 FragLen;\r
\r
///\r
/// Reserved, must be set to zero.\r
///\r
- PXE_UINT32 reserved;\r
+ PXE_UINT32 reserved;\r
} FragDesc[MAX_XMIT_FRAGMENTS];\r
-}\r
-PXE_CPB_FILL_HEADER_FRAGMENTED;\r
+} PXE_CPB_FILL_HEADER_FRAGMENTED;\r
\r
typedef struct s_pxe_cpb_transmit {\r
///\r
/// Address of first byte of frame buffer. This is also the first byte\r
/// of the media header.\r
///\r
- PXE_UINT64 FrameAddr;\r
+ PXE_UINT64 FrameAddr;\r
\r
///\r
/// Length of the data portion of the frame buffer in bytes. Do not\r
/// include the length of the media header.\r
///\r
- PXE_UINT32 DataLen;\r
+ PXE_UINT32 DataLen;\r
\r
///\r
/// Length of the media header in bytes.\r
///\r
- PXE_UINT16 MediaheaderLen;\r
+ PXE_UINT16 MediaheaderLen;\r
\r
///\r
/// Reserved, must be zero.\r
///\r
- PXE_UINT16 reserved;\r
+ PXE_UINT16 reserved;\r
} PXE_CPB_TRANSMIT;\r
\r
typedef struct s_pxe_cpb_transmit_fragments {\r
///\r
/// Length of packet data in bytes (not including the media header).\r
///\r
- PXE_UINT32 FrameLen;\r
+ PXE_UINT32 FrameLen;\r
\r
///\r
/// Length of the media header in bytes.\r
///\r
- PXE_UINT16 MediaheaderLen;\r
+ PXE_UINT16 MediaheaderLen;\r
\r
///\r
/// Number of packet fragment descriptors.\r
///\r
- PXE_UINT16 FragCnt;\r
+ PXE_UINT16 FragCnt;\r
\r
///\r
/// Array of frame fragment descriptors. The first byte of the first\r
///\r
/// Address of this frame fragment.\r
///\r
- PXE_UINT64 FragAddr;\r
+ PXE_UINT64 FragAddr;\r
\r
///\r
/// Length of this frame fragment.\r
///\r
- PXE_UINT32 FragLen;\r
+ PXE_UINT32 FragLen;\r
\r
///\r
/// Reserved, must be set to zero.\r
///\r
- PXE_UINT32 reserved;\r
+ PXE_UINT32 reserved;\r
} FragDesc[MAX_XMIT_FRAGMENTS];\r
-}\r
-PXE_CPB_TRANSMIT_FRAGMENTS;\r
+} PXE_CPB_TRANSMIT_FRAGMENTS;\r
\r
typedef struct s_pxe_cpb_receive {\r
///\r
/// Address of first byte of receive buffer. This is also the first byte\r
/// of the frame header.\r
///\r
- PXE_UINT64 BufferAddr;\r
+ PXE_UINT64 BufferAddr;\r
\r
///\r
/// Length of receive buffer. This must be large enough to hold the\r
/// received frame (media header + data). If the length of smaller than\r
/// the received frame, data will be lost.\r
///\r
- PXE_UINT32 BufferLen;\r
+ PXE_UINT32 BufferLen;\r
\r
///\r
/// Reserved, must be set to zero.\r
///\r
- PXE_UINT32 reserved;\r
+ PXE_UINT32 reserved;\r
} PXE_CPB_RECEIVE;\r
\r
typedef struct s_pxe_db_receive {\r
///\r
/// Source and destination MAC addresses from media header.\r
///\r
- PXE_MAC_ADDR SrcAddr;\r
- PXE_MAC_ADDR DestAddr;\r
+ PXE_MAC_ADDR SrcAddr;\r
+ PXE_MAC_ADDR DestAddr;\r
\r
///\r
/// Length of received frame. May be larger than receive buffer size.\r
/// The receive buffer will not be overwritten. This is how to tell\r
/// if data was lost because the receive buffer was too small.\r
///\r
- PXE_UINT32 FrameLen;\r
+ PXE_UINT32 FrameLen;\r
\r
///\r
/// Protocol type from media header.\r
///\r
- PXE_MEDIA_PROTOCOL Protocol;\r
+ PXE_MEDIA_PROTOCOL Protocol;\r
\r
///\r
/// Length of media header in received frame.\r
///\r
- PXE_UINT16 MediaHeaderLen;\r
+ PXE_UINT16 MediaHeaderLen;\r
\r
///\r
/// Type of receive frame.\r
///\r
- PXE_FRAME_TYPE Type;\r
+ PXE_FRAME_TYPE Type;\r
\r
///\r
/// Reserved, must be zero.\r
///\r
- PXE_UINT8 reserved[7];\r
-\r
+ PXE_UINT8 reserved[7];\r
} PXE_DB_RECEIVE;\r
\r
#pragma pack()\r