Based on Uefi/UefiPxe.h, original notice:
This header file contains all of the PXE type definitions, structure prototypes, global variables and constants that are needed for porting PXE to EFI.
Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@par Revision Reference: 32/64-bit PXE specification: alpha-4, 99-Dec-17.
UNDI Fill Header. No additional StatFlags. UNDI Transmit. No additional StatFlags. UNDI Receive . No additional StatFlags.
UNDI Receive. No OpFlags. PXE STATFLAGS.
Typedef unsigned long PXE_UINT64.
cpb and db definitions
BUS ROM ID signatures.
UNDI ROM ID and devive ID signature.
These two bit values are used to determine if there are more UNDI CDB structures following this one. If the link bit is set, there must be a CDB structure following this one. Execution will start on the next CDB structure as soon as this one completes successfully. If an error is generated by this command, execution will stop.
Setting this flag directs the UNDI to queue this command for later execution if the UNDI is busy and it supports command queuing. If queuing is not supported, a PXE_STATCODE_INVALID_CONTROL error is returned. If the queue is full, a PXE_STATCODE_CDB_QUEUE_FULL error is returned.
Use these to clear pending external interrupts.
Command port definitions. If set, CDB identified in CDBaddr port is given to UNDI. If not set, other bits in this word will be processed.
Use these to enable/disable receive filters.
Use these to enable/disable external interrupts.
If set, last command failed.
If set, identifies enabled receive filters.
If set, identifies enabled external interrupts.
If set, identifies pending interrupts.
Status port bit definitions. UNDI operation state.
This interface number is returned by the S/W UNDI Get State and Start commands if information in the CDB, CPB or DB is invalid.
This interface number must be passed to the S/W UNDI Start command.
This information is from the ARP section of RFC 1700. 1 Ethernet (10Mb) JBP 2 Experimental Ethernet (3Mb) JBP 3 Amateur Radio AX.25 PXK 4 Proteon ProNET Token Ring JBP 5 Chaos GXP 6 IEEE 802 Networks JBP 7 ARCNET JBP 8 Hyperchannel JBP 9 Lanstar TU 10 Autonet Short Address MXB1 11 LocalTalk JKR1 12 LocalNet (IBM* PCNet or SYTEK* LocalNET) JXM 13 Ultra link RXD2 14 SMDS GXC1 15 Frame Relay AGM 16 Asynchronous Transmission Mode (ATM) JXB2 17 HDLC JBP 18 Fibre Channel [Yakov Rekhter] 19 Asynchronous Transmission Mode (ATM) [Mark Laubach] 20 Serial Line JBP 21 Asynchronous Transmission Mode (ATM) MXB1 * Other names and brands may be claimed as the property of others.
Fill media header in packet for transmit.
Get NIC configuration information.
Get UNDI initialization information.
Return UNDI operational state.
Get & clear interrupt status.
Changed UNDI operational state from Started to Initialized.
Read & change state of external interrupt enables.
Last valid PXE UNDI OpCode number.
Convert multicast IP address to multicast MAC address.
Read or change non-volatile storage on the NIC.
Read & change state of packet receive filters.
Re-initialize the NIC H/W.
Change the UNDI operational state from Initialized to Started.
Change UNDI operational state from Stopped to Started.
Read & change station MAC address.
Read traffic statistics.
Change UNDI operational state from Started to Stopped.
UNDI Fill Header.
UNDI Get Status. Return current interrupt status. This will also clear any interrupts that are currently set. This can be used in a polling routine. The interrupt flags are still set and cleared even when the interrupts are disabled.
Return current media status.
Return list of transmitted buffers for recycling. Transmit buffers must not be changed or unallocated until they have recycled. After issuing a transmit command, wait for a transmit complete interrupt. When a transmit complete interrupt is received, read the transmitted buffers. Do not plan on getting one buffer per interrupt. Some NICs and UNDIs may transmit multiple buffers per interrupt.
///////////////////////////////////// ///////////////////////////////////// ///////////////////////////////////// UNDI Initialize
Enable command interrupts. An external interrupt will be generated when command execution stops.
UNDI Shutdown. No OpFlags. UNDI Interrupt Enables. Select whether to enable or disable external interrupt signals. Setting both enable and disable will return PXE_STATCODE_INVALID_OPFLAGS.
Enable receive interrupts. An external interrupt will be generated after a complete non-error packet has been received.
Generate software interrupt. Setting this bit generates an external interrupt, if it is supported by the hardware.
Enable transmit interrupts. An external interrupt will be generated after a complete non-error packet has been transmitted.
UNDI MCast IP to MAC. Identify the type of IP address in the CPB.
UNDI NvData. Select the type of non-volatile data operation.
Enable promiscuous multicast packet receiving. All multicast packets will be received.
Enable broadcast packet receiving. Packets sent to the broadcast MAC address will be received.
Enable filtered multicast packet receiving. Packets sent to any of the multicast MAC addresses in the multicast MAC address filter list will be received. If the filter list is empty, no multicast
UNDI Receive Filters. Select whether to enable or disable receive filters. Setting both enable and disable will return PXE_STATCODE_INVALID_OPCODE.
Enable promiscuous packet receiving. All packets will be received.
To reset the contents of the multicast MAC address filter list, set this OpFlag:
Enable unicast packet receiving. Packets sent to the current station MAC address will be received.
UNDI Station Address.
UNDI Transmit. S/W UNDI only. Return after the packet has been transmitted. A transmit complete interrupt will still be generated and the transmit buffer will have to be recycled.
UNDI command interface revision. These are the values that get sent in option 94 (Client Network Interface Identifier) in the DHCP Discover and PXE Boot Server Request packets.
!PXE structure format revision .
Signature of !PXE structure.
Common StatCodes returned by all UNDI commands, UNDI protocol functions and BC protocol functions.
UNDI Start. No additional StatFlags. UNDI Get Init Info.
UNDI Get State.
If set, at least one command interrupt occurred.
UNDI Station Address. No additional StatFlags. UNDI Statistics. No additional StatFlags. / UNDI MCast IP to MAC. / / No additional StatFlags. UNDI NvData. No additional StatFlags. UNDI Get Status. Use to determine if an interrupt has occurred.
This flag is set if there is no media detected.
This flag is set if no transmitted buffer addresses were written into the DB. (This could be because DBsize was too small.)
If set, at least one receive interrupt occurred.
If set, at least one software interrupt occurred.
If set, at least one transmit interrupt occurred.
This flag is set if the transmitted buffer queue is empty. This flag will be set if all transmitted buffer addresses get written into the DB.
If set, command interrupts are enabled.
UNDI Shutdown. No additional StatFlags. UNDI Interrupt Enables. If set, receive interrupts are enabled.
If set, transmit interrupts are enabled.
If set, all multicast packets will be received.
If set, broadcast packets will be received.
If set, multicast packets that match up with the multicast address filter list will be received.
If set, all packets will be received.
UNDI Receive Filters. If set, unicast packets will be received.
Common StatFlags that can be returned by all commands. The COMMAND_COMPLETE and COMMAND_FAILED status flags must be implemented by all UNDIs. COMMAND_QUEUED is only needed by UNDIs that support command queuing.
Number of collisions detection on this subnet.
Number of valid broadcast frames received and not dropped.
Number of frames w/ CRC or alignment errors.
Valid frames that were dropped because receive buffers were full.
Number of valid frames received and copied into receive buffers.
Number of valid mutlicast frames received and not dropped.
Number of frames longer than the maxminum length for the media. This would be >1500 for ethernet.
Total number of bytes received. Includes frames with errors and dropped frames.
Total number of frames received. Includes frames with errors and dropped frames.
Number of frames below the minimum length for the media. This would be <64 for ethernet.
Number of valid unicast frames received and not dropped.
Number of frames destined for unsupported protocol.