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