1 /** @file 2 These are PXE Specification 2.1-compliant data structures and defines. 3 4 This file relies upon the existence of a PXE-compliant ROM 5 in memory, as defined by the Preboot Execution Environment 6 Specification (PXE), Version 2.1, located at 7 8 http://developer.intel.com/ial/wfm/wfmspecs.htm 9 10 Copyright (c) 1999 - 2010, Intel Corporation. All rights reserved.<BR> 11 12 This program and the accompanying materials 13 are licensed and made available under the terms and conditions 14 of the BSD License which accompanies this distribution. The 15 full text of the license may be found at 16 http://opensource.org/licenses/bsd-license.php 17 18 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 19 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 20 21 **/ 22 23 #ifndef _PXEDEF_H_ 24 #define _PXEDEF_H_ 25 26 #pragma pack(1) 27 28 // 29 // PXE structure signatures 30 // 31 #define BC_ROMID_SIG "$BC$" 32 #define UNDI_ROMID_SIG "UNDI" 33 #define BUSD_ROMID_SIG "BUSD" 34 35 #define PXE_SIG "!PXE" 36 #define PXENV_SIG "PXENV+" 37 38 #define BC_ROMID_REV 0x00 39 #define UNDI_ROMID_REV 0x00 40 #define BUSD_ROMID_REV 0x00 41 42 #define PXE_REV 0x00 43 #define PXENV_REV 0x0201 44 45 #define PXENV_PTR SIGNATURE_32 ('P', 'X', 'E', 'N') 46 #define PXE_PTR SIGNATURE_32 ('!', 'P', 'X', 'E') 47 #define UNDI_ROMID_SIG_PTR SIGNATURE_32 ('U', 'N', 'D', 'I') 48 49 typedef UINT16 SEGSEL; // Real mode segment or protected mode selector. 50 typedef UINT16 OFF16; // Unsigned 16bit offset. 51 typedef UINT32 ADDR32; 52 53 // 54 // Bus types 55 // 56 #define PXENV_BUS_ISA 0 57 #define PXENV_BUS_EISA 1 58 #define PXENV_BUS_MCA 2 59 #define PXENV_BUS_PCI 3 60 #define PXENV_BUS_VESA 4 61 #define PXENV_BUS_PCMCIA 5 62 63 // 64 // 65 // Result codes returned in AX by a PXENV API service. 66 // 67 #define PXENV_EXIT_SUCCESS 0x0000 68 #define PXENV_EXIT_FAILURE 0x0001 69 70 // 71 // Status codes returned in the status word of PXENV API parameter structures. 72 // 73 // Generic API errors - these do not match up with the M0x or E0x messages 74 // that are reported by the loader. 75 // 76 #define PXENV_STATUS_SUCCESS 0x00 77 #define PXENV_STATUS_FAILURE 0x01 78 #define PXENV_STATUS_BAD_FUNC 0x02 79 #define PXENV_STATUS_UNSUPPORTED 0x03 80 #define PXENV_STATUS_KEEP_UNDI 0x04 81 #define PXENV_STATUS_KEEP_ALL 0x05 82 #define PXENV_STATUS_OUT_OF_RESOURCES 0x06 83 84 typedef enum { 85 PxeEnvStatus_Success, 86 PxeEnvStatus_Failure, 87 PxeEnvStatus_BadFunc, 88 PxeEnvStatus_Unsupported, 89 PxeEnvStatus_KeepUndi, 90 PxeEnvStatus_KeepAll 91 } EFI_PXE_STATUS; 92 93 /* Driver errors (0x60 to 0x6F) */ 94 95 // These errors are for UNDI compatible NIC drivers. 96 #define PXENV_STATUS_UNDI_INVALID_FUNCTION 0x60 97 #define PXENV_STATUS_UNDI_MEDIATEST_FAILED 0x61 98 #define PXENV_STATUS_UNDI_CANNOT_INIT_NIC_FOR_MCAST 0x62 99 #define PXENV_STATUS_UNDI_CANNOT_INITIALIZE_NIC 0x63 100 #define PXENV_STATUS_UNDI_CANNOT_INITIALIZE_PHY 0x64 101 #define PXENV_STATUS_UNDI_CANNOT_READ_CONFIG_DATA 0x65 102 #define PXENV_STATUS_UNDI_CANNOT_READ_INIT_DATA 0x66 103 #define PXENV_STATUS_UNDI_BAD_MAC_ADDR 0x67 104 #define PXENV_STATUS_UNDI_BAD_EEPROM_CKSUM 0x68 105 #define PXENV_STATUS_UNDI_ERROR_SETTING_ISR 0x69 106 #define PXENV_STATUS_UNDI_INVALID_STATE 0x6A 107 #define PXENV_STATUS_UNDI_TRANSMIT_ERROR 0x6B 108 #define PXENV_STATUS_UNDI_INVALID_PARAMETER 0x6C 109 110 typedef struct { 111 UINT16 Seg_Addr; 112 UINT32 Phy_Addr; 113 UINT16 Seg_Size; 114 } NEWSEGDESC_T; 115 116 typedef struct { 117 OFF16 Offset; 118 SEGSEL Segment; 119 } SEGOFF16; 120 121 typedef struct { 122 UINT8 Signature[4]; ///< Structure signature is not NULL terminated. 123 UINT8 StructLength; ///< Length of this structure in bytes. 124 UINT8 StructCksum; ///< Use to make byte checksum of this structure == zero. 125 UINT8 StructRev; ///< Structure format revision number. 126 UINT8 UNDI_Rev[3]; ///< API revision number stored in Intel order. 127 // 128 // Revision 2.1.0 == 0x00, 0x01, 0x02 129 // 130 UINT16 UNDI_Loader; ///< Offset of UNDI loader routine in the option ROM image. 131 UINT16 StackSize; ///< Minimum stack segment size, in bytes, needed to load and run the UNDI. 132 UINT16 DataSize; ///< UNDI runtime code and data 133 UINT16 CodeSize; ///< segment sizes. 134 UINT8 BusType[4]; ///< 'ISAR', 'EISA', 'PCIR', 'PCCR' 135 } UNDI_ROMID_T; 136 137 typedef struct { 138 UINT8 Signature[4]; ///< Structure signature is not NULL terminated. 139 UINT8 StructLength; ///< Length of this structure in bytes. 140 UINT8 StructCksum; ///< Use to make byte checksum of this structure == zero. 141 UINT8 StructRev; ///< Structure format revision number. 142 UINT8 BC_Rev[3]; ///< API revision number stored in Intel order. 143 // 144 // Revision 2.1.0 == 0x00, 0x01, 0x02 145 // 146 UINT16 BC_Loader; ///< Offset of base-code loader routine in the option ROM image. 147 UINT16 StackSize; ///< Minimum stack segment size (bytes) needed to load/run base-code. 148 UINT16 DataSize; ///< Base-code runtime code and data 149 UINT16 CodeSize; ///< segment sizes. 150 } BC_ROMID_T; 151 152 typedef struct { 153 UINT8 Signature[4]; ///< Structure signature is not NULL terminated. 154 UINT8 StructLength; ///< Length of this structure in bytes. 155 UINT8 StructCksum; ///< Use to make byte checksum of this structure == zero. 156 UINT8 StructRev; ///< Structure format revision number. 157 UINT8 Reserved1; ///< must be zero 158 /// 159 /// UNDI_ROMID_T __FAR *UNDI;// Far pointer to UNDI ROMID 160 /// 161 SEGOFF16 Undi; 162 163 /// 164 /// BC_ROMID_T __FAR *Base; // Far pointer to base-code ROMID 165 /// 166 SEGOFF16 Base; 167 168 /// 169 /// UINT16 (__FAR __CDECL *EntryPointSP)(UINT16 func, VOID __FAR *param); 170 /// 16bit stack segment API entry point. This will be seg:off in 171 /// real mode and sel:off in 16:16 protected mode. 172 /// 173 SEGOFF16 EntryPointSP; 174 175 /// 176 /// UINT16 (__FAR __CDECL *EntryPointESP)(UINT16 func, VOID __FAR *param); 177 /// 32bit stack segment API entry point. This will be sel:off. 178 /// In real mode, sel == 0 179 /// 180 SEGOFF16 EntryPointESP; 181 /// 182 /// UINT16 (__FAR __CDECL *StatusCallout)(UINT16 param); 183 /// Address of DHCP/TFTP status callout routine. 184 /// 185 SEGOFF16 StatusCallout; 186 UINT8 Reserved2; ///< must be zero 187 UINT8 SegDescCnt; ///< Number of segment descriptors in this structure. 188 UINT16 FirstSelector; ///< First segment descriptor in GDT assigned to PXE. 189 NEWSEGDESC_T Stack; 190 NEWSEGDESC_T UNDIData; 191 NEWSEGDESC_T UNDICode; 192 NEWSEGDESC_T UNDICodeWrite; 193 NEWSEGDESC_T BC_Data; 194 NEWSEGDESC_T BC_Code; 195 NEWSEGDESC_T BC_CodeWrite; 196 } PXE_T; 197 198 typedef struct { 199 CHAR8 Signature[6]; ///< "PXENV+" 200 UINT16 Version; ///< PXE version number. LSB is minor version. MSB is major version. 201 UINT8 StructLength; ///< Length of PXE-2.0 Entry Point structure in bytes. 202 UINT8 StructCksum; ///< Used to make structure checksum equal zero. 203 UINT32 RMEntry; ///< Real mode API entry point segment:offset. 204 UINT32 PMEntryOff; ///< Protected mode API entry point 205 UINT16 PMEntrySeg; ///< segment:offset. This will always be zero. Protected mode API calls 206 ///< must be made through the API entry points in the PXE Runtime ID structure. 207 208 UINT16 StackSeg; ///< Real mode stack segment. 209 UINT16 StackSize; ///< Stack segment size in bytes. 210 UINT16 BaseCodeSeg; ///< Real mode base-code code segment. 211 UINT16 BaseCodeSize; ///< Base-code code segment size 212 UINT16 BaseDataSeg; ///< Real mode base-code data segment. 213 UINT16 BaseDataSize; ///< Base-code data segment size 214 UINT16 UNDIDataSeg; ///< Real mode UNDI data segment. 215 UINT16 UNDIDataSize; ///< UNDI data segment size in bytes. 216 UINT16 UNDICodeSeg; ///< Real mode UNDI code segment. 217 UINT16 UNDICodeSize; ///< UNDI code segment size in bytes. 218 PXE_T *RuntimePtr; ///< Real mode segment:offset pointer to PXE Runtime ID structure. 219 } PXENV_T; 220 221 typedef struct { 222 OUT UINT16 Status; 223 IN OUT UINT16 Ax; 224 IN OUT UINT16 Bx; 225 IN OUT UINT16 Dx; 226 IN OUT UINT16 Di; 227 IN OUT UINT16 Es; 228 IN OUT UINT16 Undi_Ds; 229 IN OUT UINT16 Undi_Cs; 230 OUT SEGOFF16 PXEptr; 231 OUT SEGOFF16 PXENVptr; 232 } UNDI_LOADER_T; 233 234 // 235 // Put in some UNDI-specific arguments 236 // 237 #define PXENV_START_UNDI 0x0000 238 #define PXENV_UNDI_STARTUP 0x0001 239 #define PXENV_UNDI_CLEANUP 0x0002 240 #define PXENV_UNDI_INITIALIZE 0x0003 241 #define PXENV_UNDI_RESET_NIC 0x0004 242 #define PXENV_UNDI_SHUTDOWN 0x0005 243 #define PXENV_UNDI_OPEN 0x0006 244 #define PXENV_UNDI_CLOSE 0x0007 245 #define PXENV_UNDI_TRANSMIT 0x0008 246 #define PXENV_UNDI_SET_MCAST_ADDR 0x0009 247 #define PXENV_UNDI_SET_STATION_ADDR 0x000A 248 #define PXENV_UNDI_SET_PACKET_FILTER 0x000B 249 #define PXENV_UNDI_GET_INFORMATION 0x000C 250 #define PXENV_UNDI_GET_STATISTICS 0x000D 251 #define PXENV_UNDI_CLEAR_STATISTICS 0x000E 252 #define PXENV_UNDI_INITIATE_DIAGS 0x000F 253 #define PXENV_UNDI_FORCE_INTERRUPT 0x0010 254 #define PXENV_UNDI_GET_MCAST_ADDR 0x0011 255 #define PXENV_UNDI_GET_NIC_TYPE 0x0012 256 #define PXENV_UNDI_GET_NDIS_INFO 0x0013 257 #define PXENV_UNDI_ISR 0x0014 258 #define PXENV_STOP_UNDI 0x0015 259 #define PXENV_UNDI_GET_STATE 0x0016 260 261 #define ADDR_LEN 16 262 #define MAXNUM_MCADDR 8 263 #define IPLEN 4 ///< length of an IP address 264 #define XMT_DESTADDR 0x0000 ///< destination address given 265 #define XMT_BROADCAST 0x0001 ///< use broadcast address 266 267 typedef struct { 268 UINT16 MCastAddrCount; ///< In: Number of multi-cast 269 270 /* addresses. */ 271 UINT8 MCastAddr[MAXNUM_MCADDR][ADDR_LEN]; /* In: */ 272 273 /* list of multi-cast addresses. */ 274 275 /* Each address can take up to */ 276 277 /* ADDR_LEN bytes and a maximum */ 278 279 /* of MAXNUM_MCADDR address can */ 280 281 /* be provided*/ 282 } PXENV_UNDI_MCAST_ADDR_T; 283 284 /* Definitions of TFTP API parameter structures. 285 */ 286 typedef struct { 287 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 288 IN UINT16 Ax; ///< In: These register fields must be 289 IN UINT16 Bx; ///< filled in with the same data 290 IN UINT16 Dx; ///< that was passed to the MLID 291 IN UINT16 Di; ///< option ROM boot code by the 292 IN UINT16 Es; ///< system BIOS. 293 } PXENV_START_UNDI_T; 294 295 typedef struct { 296 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 297 } PXENV_UNDI_STARTUP_T; 298 299 typedef struct { 300 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 301 } PXENV_UNDI_CLEANUP_T; 302 303 typedef struct { 304 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 305 306 /// 307 /// This is an input parameter and is a 32-bit physical address of 308 /// a memory copy of the driver module in the protocol.ini file 309 /// obtained from the Protocol Manager driver(refer to NDIS 2.0 310 /// specifications). This parameter is basically supported for 311 /// the universal NDIS driver to pass the information contained in 312 /// protocol.ini file to the NIC driver for any specific 313 /// configuration of the NIC. (Note that the module 314 /// identification in the protocol.ini file was done by NDIS 315 /// itself.) This value can be NULL for for any other application 316 /// interfacing to the Universal NIC Driver. 317 /// 318 IN UINT32 ProtocolIni; 319 UINT8 Reserved[8]; 320 } PXENV_UNDI_INITIALIZE_T; 321 322 typedef struct { 323 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 324 IN PXENV_UNDI_MCAST_ADDR_T R_Mcast_Buf; ///< multicast address list 325 /* see note below */ 326 } PXENV_UNDI_RESET_T; 327 328 /*++ 329 Note: The NIC driver does not remember the multicast 330 addresses provided in any call. So the application must 331 provide the multicast address list with all the calls that 332 reset the receive unit of the adapter. 333 --*/ 334 typedef struct { 335 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 336 } PXENV_UNDI_SHUTDOWN_T; 337 338 typedef struct { 339 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 340 341 /// 342 /// This is an input parameter and is adapter specific. This is 343 /// supported for Universal NDIS 2.0 driver to pass down the Open 344 /// flags provided by the protocol driver (See NDIS 2.0 345 /// specifications). This can be zero. 346 /// 347 IN UINT16 OpenFlag; ///< In: See description below 348 IN UINT16 PktFilter; ///< In: Filter for receiving 349 350 /* packet. It takes the following */ 351 352 /* values, multiple values can be */ 353 354 /* ORed together. */ 355 #define FLTR_DIRECTED 0x0001 ///< directed/multicast 356 #define FLTR_BRDCST 0x0002 ///< broadcast packets 357 #define FLTR_PRMSCS 0x0004 ///< any packet on LAN 358 #define FLTR_SRC_RTG 0x0008 ///< source routing packet 359 IN PXENV_UNDI_MCAST_ADDR_T McastBuffer; /* In: */ 360 /* See t_PXENV_UNDI_MCAST_ADDR. */ 361 } PXENV_UNDI_OPEN_T; 362 363 typedef struct { 364 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 365 } PXENV_UNDI_CLOSE_T; 366 367 #define MAX_DATA_BLKS 8 368 369 typedef struct { 370 IN UINT16 ImmedLength; ///< In: Data buffer length in 371 372 /* bytes. */ 373 UINT16 XmitOffset; ///< 16-bit segment & offset of the 374 UINT16 XmitSegment; ///< immediate data buffer. 375 UINT16 DataBlkCount; ///< In: Number of data blocks. 376 struct DataBlk { 377 UINT8 TDPtrType; ///< 0 => 32 bit Phys pointer in TDDataPtr, not supported in this version of LSA 378 ///< 1 => seg:offser in TDDataPtr which can be a real mode or 16-bit protected mode pointer 379 UINT8 TDRsvdByte; ///< Reserved, must be zero. 380 UINT16 TDDataLen; ///< Data block length in bytes. 381 UINT16 TDDataPtrOffset; ///< Far pointer to data buffer. 382 UINT16 TDDataPtrSegment; ///< Far pointer to data buffer. 383 } DataBlock[MAX_DATA_BLKS]; 384 } 385 PXENV_UNDI_TBD_T; 386 387 typedef struct { 388 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 389 390 /// 391 /// This is the protocol of the upper layer that is calling 392 /// NICTransmit call. If the upper layer has filled the media 393 /// header this field must be 0. 394 /// 395 IN UINT8 Protocol; 396 #define P_UNKNOWN 0 397 #define P_IP 1 398 #define P_ARP 2 399 #define P_RARP 3 400 401 /// 402 /// If this flag is 0, the NIC driver expects a pointer to the 403 /// destination media address in the field DestMediaAddr. If 1, 404 /// the NIC driver fills the broadcast address for the 405 /// destination. 406 /// 407 IN UINT8 XmitFlag; 408 #define XMT_DESTADDR 0x0000 ///< destination address given 409 #define XMT_BROADCAST 0x0001 ///< use broadcast address 410 411 /// 412 /// This is a pointer to the hardware address of the destination 413 /// media. It can be null if the destination is not known in 414 /// which case the XmitFlag contains 1 for broadcast. Destination 415 /// media address must be obtained by the upper level protocol 416 /// (with Address Resolution Protocol) and NIC driver does not do 417 /// any address resolution. 418 /// 419 IN UINT16 DestAddrOffset; ///< 16-bit segment & offset of the 420 IN UINT16 DestAddrSegment; ///< destination media address 421 422 423 IN UINT16 TBDOffset; ///< 16-bit segment & offset of the 424 IN UINT16 TBDSegment; ///< transmit buffer descriptor of type 425 426 /// XmitBufferDesc 427 IN UINT32 Reserved[2]; 428 } PXENV_UNDI_TRANSMIT_T; 429 430 431 typedef struct { 432 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 433 IN PXENV_UNDI_MCAST_ADDR_T McastBuffer; ///< In: 434 } PXENV_UNDI_SET_MCAST_ADDR_T; 435 436 typedef struct { 437 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 438 IN UINT8 StationAddress[ADDR_LEN]; ///< new address to be set 439 } PXENV_UNDI_SET_STATION_ADDR_T; 440 441 typedef struct s_PXENV_UNDI_SET_PACKET_FILTER { 442 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 443 IN UINT8 Filter; ///< In: Receive filter value. 444 } PXENV_UNDI_SET_PACKET_FILTER_T; 445 446 typedef struct { 447 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 448 OUT UINT16 BaseIo; ///< Out: Adapter's Base IO 449 OUT UINT16 IntNumber; ///< Out: IRQ number 450 OUT UINT16 MaxTranUnit; ///< Out: MTU 451 OUT UINT16 HwType; ///< Out: type of protocol at hardware level 452 453 #define ETHER_TYPE 1 454 #define EXP_ETHER_TYPE 2 455 #define IEEE_TYPE 6 456 #define ARCNET_TYPE 7 457 /*++ 458 other numbers can be obtained from rfc1010 for "Assigned 459 Numbers". This number may not be validated by the application 460 and hence adding new numbers to the list should be fine at any 461 time. 462 --*/ 463 OUT UINT16 HwAddrLen; ///< Out: actual length of hardware address 464 OUT UINT8 CurrentNodeAddress[ADDR_LEN]; ///< Out: Current hardware address 465 OUT UINT8 PermNodeAddress[ADDR_LEN]; ///< Out: Permanent hardware address 466 OUT UINT16 ROMAddress; ///< Out: ROM address 467 OUT UINT16 RxBufCt; ///< Out: receive Queue length 468 OUT UINT16 TxBufCt; ///< Out: Transmit Queue length 469 } PXENV_UNDI_GET_INFORMATION_T; 470 471 typedef struct { 472 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 473 OUT UINT32 XmtGoodFrames; ///< Out: No. of good transmissions 474 OUT UINT32 RcvGoodFrames; ///< Out: No. of good frames received 475 OUT UINT32 RcvCRCErrors; ///< Out: No. of frames with CRC error 476 OUT UINT32 RcvResourceErrors; ///< Out: no. of frames discarded 477 /* Out: receive Queue full */ 478 } PXENV_UNDI_GET_STATISTICS_T; 479 480 typedef struct { 481 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 482 } PXENV_UNDI_CLEAR_STATISTICS_T; 483 484 typedef struct { 485 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 486 } PXENV_UNDI_INITIATE_DIAGS_T; 487 488 typedef struct { 489 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 490 } PXENV_UNDI_FORCE_INTERRUPT_T; 491 492 typedef struct { 493 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 494 IN UINT32 InetAddr; ///< In: IP Multicast Address 495 OUT UINT8 MediaAddr[ADDR_LEN]; ///< Out: corresponding hardware 496 /* multicast address */ 497 } PXENV_UNDI_GET_MCAST_ADDR_T; 498 499 typedef struct { 500 OUT UINT16 Vendor_ID; ///< OUT: 501 OUT UINT16 Dev_ID; ///< OUT: 502 OUT UINT8 Base_Class; ///< OUT: 503 OUT UINT8 Sub_Class; ///< OUT: 504 OUT UINT8 Prog_Intf; ///< OUT: program interface 505 OUT UINT8 Rev; ///< OUT: Revision number 506 OUT UINT16 BusDevFunc; ///< OUT: Bus, Device & Function numbers 507 OUT UINT16 SubVendor_ID; ///< OUT: 508 OUT UINT16 SubDevice_ID; ///< OUT: 509 } PCI_INFO_T; 510 511 typedef struct { 512 OUT UINT32 EISA_Dev_ID; ///< Out: 513 OUT UINT8 Base_Class; ///< OUT: 514 OUT UINT8 Sub_Class; ///< OUT: 515 OUT UINT8 Prog_Intf; ///< OUT: program interface 516 OUT UINT16 CardSelNum; ///< OUT: Card Selector Number 517 OUT UINT8 Reserved; ///< to make it 10 bytes 518 } PNP_INFO_T; 519 520 521 typedef union { 522 PCI_INFO_T Pci; 523 PNP_INFO_T Pnp; 524 } PCI_PNP_INFO_T; 525 526 typedef struct { 527 OUT UINT16 Status; ///< OUT: PXENV_STATUS_xxx 528 OUT UINT8 NicType; ///< OUT: 2=PCI, 3=PnP 529 PCI_PNP_INFO_T PciPnpInfo; 530 } PXENV_UNDI_GET_NIC_TYPE_T; 531 532 typedef struct { 533 OUT UINT16 Status; ///< OUT: PXENV_STATUS_xxx 534 OUT UINT8 IfaceType[16]; ///< OUT: Type name of MAC, AsciiZ 535 536 /* format. This is used by the */ 537 538 /* Universal NDIS Driver to fill */ 539 540 /* the driver type in it's MAC */ 541 542 /* Service specific */ 543 544 /* characteristic table */ 545 OUT UINT32 LinkSpeed; ///< OUT: 546 OUT UINT32 ServiceFlags; ///< OUT: as defined in NDIS Spec 2.0X 547 OUT UINT32 Reserved[4]; ///< OUT: will be filled with 0s till defined 548 } PXENV_UNDI_GET_NDIS_INFO_T; 549 550 typedef struct { 551 OUT UINT16 Status; ///< OUT: PXENV_STATUS_xxx 552 IN OUT UINT16 FuncFlag; ///< In: PXENV_UNDI_ISR_IN_xxx 553 554 /* Out: PXENV_UNDI_ISR_OUT_xxx */ 555 OUT UINT16 BufferLength; 556 OUT UINT16 FrameLength; 557 OUT UINT16 FrameHeaderLength; 558 OUT UINT16 FrameOffset; 559 OUT UINT16 FrameSegSel; 560 OUT UINT8 ProtType; 561 OUT UINT8 PktType; 562 } PXENV_UNDI_ISR_T; 563 564 #define PXENV_UNDI_ISR_IN_START 1 /* This function must be first */ 565 566 /* when an interrupt is received. */ 567 568 /* It will tell us if the intr */ 569 570 /* was generated by our device. */ 571 #define PXENV_UNDI_ISR_IN_PROCESS 2 /* Call to start processing one of */ 572 573 /* our interrupts. */ 574 #define PXENV_UNDI_ISR_IN_GET_NEXT 3 /* Call to start/continue receiving */ 575 576 /* data from receive buffer(s). */ 577 578 /*++ 579 580 Possible responses from PXENV_UNDI_ISR_IN_START 581 582 --*/ 583 #define PXENV_UNDI_ISR_OUT_OURS 0 ///< This is our interrupt. Deal with it. 584 #define PXENV_UNDI_ISR_OUT_NOT_OURS 1 ///< This is not our interrupt. 585 586 /*++ 587 588 Possible responses from PXENV_UNDI_ISR_IN_PROCESS and 589 PXENV_UNDI_ISR_IN_PROCESS 590 591 --*/ 592 #define PXENV_UNDI_ISR_OUT_DONE 0 ///< We are done processing this interrupt. 593 #define PXENV_UNDI_ISR_OUT_TRANSMIT 2 ///< We completed a transmit interrupt. 594 #define PXENV_UNDI_ISR_OUT_RECEIVE 3 ///< Get data from receive buffer. 595 596 #define PXENV_UNDI_ISR_OUT_BUSY 4 /* ? */ 597 598 typedef struct { 599 UINT16 Status; ///< Out: PXENV_STATUS_xxx 600 } PXENV_STOP_UNDI_T; 601 602 #define PXENV_UNDI_STARTED 1 ///< not even initialized 603 #define PXENV_UNDI_INITIALIZED 2 ///< initialized and closed (not opened) 604 #define PXENV_UNDI_OPENED 3 ///< initialized & opened 605 606 typedef struct { 607 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 608 UINT16 UNDI_State; 609 } PXENV_UNDI_GET_STATE_T; 610 611 #pragma pack() 612 613 #endif 614