Extensible Firmware Interface Specification
384 12/12/00 Version 1.02

G.2.2 UNDI Command Format

The format of the CDB is the same for all UNDI commands. Some of the commands do not use or
always require the use of all of the fields in the CDB. When fields are not used they must be
initialized to zero or the UNDI will return an error. The StatCode and StatFlags fields must always
be initialized to zero or the UNDI will return an error. All reserved fields (and bit fields) must be
initialized to zero or the UNDI will return an error.
Basically, the rule is: Do it right, or don’t do it at all.
Offset
0x00 0x01 0x02 0x03
0x00
0x04
0x08
0x0C
0x10
0x14
0x18
CDB
Command Descriptor Block
0x1C
OpCode
CPBsize DBsize
CPBaddr
DBaddr
StatCode
IFnum
OpFlags
StatFlags
Control
Figure G-4. UNDI Command Descriptor Block (CDB)
Descriptions of the CDB fields are given in the table below.
Table G-5. UNDI CDB Field Definitions
Identifier Description
OpCode Operation Code (Function Number, Command Code, etc.)
This field is used to identify the command being sent to the UNDI. The meanings of
some of the bits in the OpFlags and StatFlags fields, and the format of the CPB and DB
structures depends on the value in the OpCode field. Commands sent with an OpCode
value that is not defined in this specification will not be executed and will return a
StatCode of PXE_STATCODE_INVALID_CDB.
OpFlags Operation Flags
This bit field is used to enable/disable different features in a specific command operation.
It is also used to change the format/contents of the CPB and DB structures. Commands
sent with reserved bits set in the OpFlags field will not be executed and will return a
StatCode of PXE_STATCODE_INVALID_CDB.
continued