Fix doxygen issue:
[mirror_edk2.git] / MdePkg / Include / Uefi / UefiPxe.h
CommitLineData
959ccb23 1/** @file\r
2 This header file contains all of the PXE type definitions,\r
3 structure prototypes, global variables and constants that\r
4 are needed for porting PXE to EFI.\r
5 \r
6 Copyright (c) 2006, Intel Corporation \r
7 All rights reserved. This program and the accompanying materials \r
8 are licensed and made available under the terms and conditions of the BSD License \r
9 which accompanies this distribution. The full text of the license may be found at \r
10 http://opensource.org/licenses/bsd-license.php \r
11 \r
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
14 \r
959ccb23 15 @par Revision Reference:\r
16 32/64-bit PXE specification:\r
17 alpha-4, 99-Dec-17\r
18 \r
19**/\r
20\r
21#ifndef __EFI_PXE_H__\r
22#define __EFI_PXE_H__\r
23\r
24#pragma pack(1)\r
25\r
26\r
27\r
28#define PXE_BUSTYPE(a, b, c, d) \\r
29 ( \\r
30 (((PXE_UINT32) (d) & 0xFF) << 24) | (((PXE_UINT32) (c) & 0xFF) << 16) | (((PXE_UINT32) (b) & 0xFF) << 8) | \\r
31 ((PXE_UINT32) (a) & 0xFF) \\r
32 )\r
33\r
34//\r
35// UNDI ROM ID and devive ID signature\r
36//\r
37#define PXE_BUSTYPE_PXE PXE_BUSTYPE ('!', 'P', 'X', 'E')\r
38\r
39//\r
40// BUS ROM ID signatures\r
41//\r
42#define PXE_BUSTYPE_PCI PXE_BUSTYPE ('P', 'C', 'I', 'R')\r
43#define PXE_BUSTYPE_PC_CARD PXE_BUSTYPE ('P', 'C', 'C', 'R')\r
44#define PXE_BUSTYPE_USB PXE_BUSTYPE ('U', 'S', 'B', 'R')\r
45#define PXE_BUSTYPE_1394 PXE_BUSTYPE ('1', '3', '9', '4')\r
46\r
47#define PXE_SWAP_UINT16(n) ((((PXE_UINT16) (n) & 0x00FF) << 8) | (((PXE_UINT16) (n) & 0xFF00) >> 8))\r
48\r
49#define PXE_SWAP_UINT32(n) \\r
50 ((((PXE_UINT32)(n) & 0x000000FF) << 24) | \\r
51 (((PXE_UINT32)(n) & 0x0000FF00) << 8) | \\r
52 (((PXE_UINT32)(n) & 0x00FF0000) >> 8) | \\r
53 (((PXE_UINT32)(n) & 0xFF000000) >> 24))\r
54\r
55#define PXE_SWAP_UINT64(n) \\r
56 ((((PXE_UINT64)(n) & 0x00000000000000FFULL) << 56) | \\r
57 (((PXE_UINT64)(n) & 0x000000000000FF00ULL) << 40) | \\r
58 (((PXE_UINT64)(n) & 0x0000000000FF0000ULL) << 24) | \\r
59 (((PXE_UINT64)(n) & 0x00000000FF000000ULL) << 8) | \\r
60 (((PXE_UINT64)(n) & 0x000000FF00000000ULL) >> 8) | \\r
61 (((PXE_UINT64)(n) & 0x0000FF0000000000ULL) >> 24) | \\r
62 (((PXE_UINT64)(n) & 0x00FF000000000000ULL) >> 40) | \\r
63 (((PXE_UINT64)(n) & 0xFF00000000000000ULL) >> 56))\r
64\r
65\r
66#define PXE_CPBSIZE_NOT_USED 0 // zero\r
67#define PXE_DBSIZE_NOT_USED 0 // zero\r
68#define PXE_CPBADDR_NOT_USED (PXE_UINT64) 0 // zero\r
69#define PXE_DBADDR_NOT_USED (PXE_UINT64) 0 // zero\r
70#define PXE_CONST const\r
71\r
72#define PXE_VOLATILE volatile\r
73\r
74typedef VOID PXE_VOID;\r
75typedef UINT8 PXE_UINT8;\r
76typedef UINT16 PXE_UINT16;\r
77typedef UINT32 PXE_UINT32;\r
78typedef UINTN PXE_UINTN;\r
79 \r
80//\r
81// typedef unsigned long PXE_UINT64;\r
82//\r
83typedef UINT64 PXE_UINT64;\r
84\r
85typedef PXE_UINT8 PXE_BOOL;\r
86#define PXE_FALSE 0 // zero\r
87#define PXE_TRUE (!PXE_FALSE)\r
88\r
89typedef PXE_UINT16 PXE_OPCODE;\r
90\r
91//\r
92// Return UNDI operational state.\r
93//\r
94#define PXE_OPCODE_GET_STATE 0x0000\r
95\r
96//\r
97// Change UNDI operational state from Stopped to Started.\r
98//\r
99#define PXE_OPCODE_START 0x0001\r
100\r
101//\r
102// Change UNDI operational state from Started to Stopped.\r
103//\r
104#define PXE_OPCODE_STOP 0x0002\r
105\r
106//\r
107// Get UNDI initialization information.\r
108//\r
109#define PXE_OPCODE_GET_INIT_INFO 0x0003\r
110\r
111//\r
112// Get NIC configuration information.\r
113//\r
114#define PXE_OPCODE_GET_CONFIG_INFO 0x0004\r
115\r
116//\r
117// Changed UNDI operational state from Started to Initialized.\r
118//\r
119#define PXE_OPCODE_INITIALIZE 0x0005\r
120\r
121//\r
122// Re-initialize the NIC H/W.\r
123//\r
124#define PXE_OPCODE_RESET 0x0006\r
125\r
126//\r
127// Change the UNDI operational state from Initialized to Started.\r
128//\r
129#define PXE_OPCODE_SHUTDOWN 0x0007\r
130\r
131//\r
132// Read & change state of external interrupt enables.\r
133//\r
134#define PXE_OPCODE_INTERRUPT_ENABLES 0x0008\r
135\r
136//\r
137// Read & change state of packet receive filters.\r
138//\r
139#define PXE_OPCODE_RECEIVE_FILTERS 0x0009\r
140\r
141//\r
142// Read & change station MAC address.\r
143//\r
144#define PXE_OPCODE_STATION_ADDRESS 0x000A\r
145\r
146//\r
147// Read traffic statistics.\r
148//\r
149#define PXE_OPCODE_STATISTICS 0x000B\r
150\r
151//\r
152// Convert multicast IP address to multicast MAC address.\r
153//\r
154#define PXE_OPCODE_MCAST_IP_TO_MAC 0x000C\r
155\r
156//\r
157// Read or change non-volatile storage on the NIC.\r
158//\r
159#define PXE_OPCODE_NVDATA 0x000D\r
160\r
161//\r
162// Get & clear interrupt status.\r
163//\r
164#define PXE_OPCODE_GET_STATUS 0x000E\r
165\r
166//\r
167// Fill media header in packet for transmit.\r
168//\r
169#define PXE_OPCODE_FILL_HEADER 0x000F\r
170\r
171//\r
172// Transmit packet(s).\r
173//\r
174#define PXE_OPCODE_TRANSMIT 0x0010\r
175\r
176//\r
177// Receive packet.\r
178//\r
179#define PXE_OPCODE_RECEIVE 0x0011\r
180\r
181//\r
182// Last valid PXE UNDI OpCode number.\r
183//\r
184#define PXE_OPCODE_LAST_VALID 0x0011\r
185\r
186typedef PXE_UINT16 PXE_OPFLAGS;\r
187\r
188#define PXE_OPFLAGS_NOT_USED 0x0000\r
189\r
190//\r
191// //////////////////////////////////////\r
192// UNDI Get State\r
193//\r
194// No OpFlags\r
195\r
196////////////////////////////////////////\r
197// UNDI Start\r
198//\r
199// No OpFlags\r
200\r
201////////////////////////////////////////\r
202// UNDI Stop\r
203//\r
204// No OpFlags\r
205\r
206////////////////////////////////////////\r
207// UNDI Get Init Info\r
208//\r
209// No Opflags\r
210\r
211////////////////////////////////////////\r
212// UNDI Get Config Info\r
213//\r
214// No Opflags\r
215\r
216////////////////////////////////////////\r
217// UNDI Initialize\r
218//\r
219#define PXE_OPFLAGS_INITIALIZE_CABLE_DETECT_MASK 0x0001\r
220#define PXE_OPFLAGS_INITIALIZE_DETECT_CABLE 0x0000\r
221#define PXE_OPFLAGS_INITIALIZE_DO_NOT_DETECT_CABLE 0x0001\r
222\r
223//\r
224// //////////////////////////////////////\r
225// UNDI Reset\r
226//\r
227#define PXE_OPFLAGS_RESET_DISABLE_INTERRUPTS 0x0001\r
228#define PXE_OPFLAGS_RESET_DISABLE_FILTERS 0x0002\r
229\r
230//\r
231// //////////////////////////////////////\r
232// UNDI Shutdown\r
233//\r
234// No OpFlags\r
235\r
236////////////////////////////////////////\r
237// UNDI Interrupt Enables\r
238//\r
239//\r
240// Select whether to enable or disable external interrupt signals.\r
241// Setting both enable and disable will return PXE_STATCODE_INVALID_OPFLAGS.\r
242//\r
243#define PXE_OPFLAGS_INTERRUPT_OPMASK 0xC000\r
244#define PXE_OPFLAGS_INTERRUPT_ENABLE 0x8000\r
245#define PXE_OPFLAGS_INTERRUPT_DISABLE 0x4000\r
246#define PXE_OPFLAGS_INTERRUPT_READ 0x0000\r
247\r
248//\r
249// Enable receive interrupts. An external interrupt will be generated\r
250// after a complete non-error packet has been received.\r
251//\r
252#define PXE_OPFLAGS_INTERRUPT_RECEIVE 0x0001\r
253\r
254//\r
255// Enable transmit interrupts. An external interrupt will be generated\r
256// after a complete non-error packet has been transmitted.\r
257//\r
258#define PXE_OPFLAGS_INTERRUPT_TRANSMIT 0x0002\r
259\r
260//\r
261// Enable command interrupts. An external interrupt will be generated\r
262// when command execution stops.\r
263//\r
264#define PXE_OPFLAGS_INTERRUPT_COMMAND 0x0004\r
265\r
266//\r
267// Generate software interrupt. Setting this bit generates an external\r
268// interrupt, if it is supported by the hardware.\r
269//\r
270#define PXE_OPFLAGS_INTERRUPT_SOFTWARE 0x0008\r
271\r
272//\r
273// //////////////////////////////////////\r
274// UNDI Receive Filters\r
275//\r
276//\r
277// Select whether to enable or disable receive filters.\r
278// Setting both enable and disable will return PXE_STATCODE_INVALID_OPCODE.\r
279//\r
280#define PXE_OPFLAGS_RECEIVE_FILTER_OPMASK 0xC000\r
281#define PXE_OPFLAGS_RECEIVE_FILTER_ENABLE 0x8000\r
282#define PXE_OPFLAGS_RECEIVE_FILTER_DISABLE 0x4000\r
283#define PXE_OPFLAGS_RECEIVE_FILTER_READ 0x0000\r
284\r
285//\r
286// To reset the contents of the multicast MAC address filter list,\r
287// set this OpFlag:\r
288//\r
289#define PXE_OPFLAGS_RECEIVE_FILTER_RESET_MCAST_LIST 0x2000\r
290\r
291//\r
292// Enable unicast packet receiving. Packets sent to the current station\r
293// MAC address will be received.\r
294//\r
295#define PXE_OPFLAGS_RECEIVE_FILTER_UNICAST 0x0001\r
296\r
297//\r
298// Enable broadcast packet receiving. Packets sent to the broadcast\r
299// MAC address will be received.\r
300//\r
301#define PXE_OPFLAGS_RECEIVE_FILTER_BROADCAST 0x0002\r
302\r
303//\r
304// Enable filtered multicast packet receiving. Packets sent to any\r
305// of the multicast MAC addresses in the multicast MAC address filter\r
306// list will be received. If the filter list is empty, no multicast\r
307//\r
308#define PXE_OPFLAGS_RECEIVE_FILTER_FILTERED_MULTICAST 0x0004\r
309\r
310//\r
311// Enable promiscuous packet receiving. All packets will be received.\r
312//\r
313#define PXE_OPFLAGS_RECEIVE_FILTER_PROMISCUOUS 0x0008\r
314\r
315//\r
316// Enable promiscuous multicast packet receiving. All multicast\r
317// packets will be received.\r
318//\r
319#define PXE_OPFLAGS_RECEIVE_FILTER_ALL_MULTICAST 0x0010\r
320\r
321//\r
322// //////////////////////////////////////\r
323// UNDI Station Address\r
324//\r
325#define PXE_OPFLAGS_STATION_ADDRESS_READ 0x0000\r
326#define PXE_OPFLAGS_STATION_ADDRESS_WRITE 0x0000\r
327#define PXE_OPFLAGS_STATION_ADDRESS_RESET 0x0001\r
328\r
329//\r
330// //////////////////////////////////////\r
331// UNDI Statistics\r
332//\r
333#define PXE_OPFLAGS_STATISTICS_READ 0x0000\r
334#define PXE_OPFLAGS_STATISTICS_RESET 0x0001\r
335\r
336//\r
337// //////////////////////////////////////\r
338// UNDI MCast IP to MAC\r
339//\r
340//\r
341// Identify the type of IP address in the CPB.\r
342//\r
343#define PXE_OPFLAGS_MCAST_IP_TO_MAC_OPMASK 0x0003\r
344#define PXE_OPFLAGS_MCAST_IPV4_TO_MAC 0x0000\r
345#define PXE_OPFLAGS_MCAST_IPV6_TO_MAC 0x0001\r
346\r
347//\r
348// //////////////////////////////////////\r
349// UNDI NvData\r
350//\r
351//\r
352// Select the type of non-volatile data operation.\r
353//\r
354#define PXE_OPFLAGS_NVDATA_OPMASK 0x0001\r
355#define PXE_OPFLAGS_NVDATA_READ 0x0000\r
356#define PXE_OPFLAGS_NVDATA_WRITE 0x0001\r
357\r
358//\r
359// //////////////////////////////////////\r
360// UNDI Get Status\r
361//\r
362//\r
363// Return current interrupt status. This will also clear any interrupts\r
364// that are currently set. This can be used in a polling routine. The\r
365// interrupt flags are still set and cleared even when the interrupts\r
366// are disabled.\r
367//\r
368#define PXE_OPFLAGS_GET_INTERRUPT_STATUS 0x0001\r
369\r
370//\r
371// Return list of transmitted buffers for recycling. Transmit buffers\r
372// must not be changed or unallocated until they have recycled. After\r
373// issuing a transmit command, wait for a transmit complete interrupt.\r
374// When a transmit complete interrupt is received, read the transmitted\r
375// buffers. Do not plan on getting one buffer per interrupt. Some\r
376// NICs and UNDIs may transmit multiple buffers per interrupt.\r
377//\r
378#define PXE_OPFLAGS_GET_TRANSMITTED_BUFFERS 0x0002\r
379\r
380//\r
381// //////////////////////////////////////\r
382// UNDI Fill Header\r
383//\r
384#define PXE_OPFLAGS_FILL_HEADER_OPMASK 0x0001\r
385#define PXE_OPFLAGS_FILL_HEADER_FRAGMENTED 0x0001\r
386#define PXE_OPFLAGS_FILL_HEADER_WHOLE 0x0000\r
387\r
388//\r
389// //////////////////////////////////////\r
390// UNDI Transmit\r
391//\r
392//\r
393// S/W UNDI only. Return after the packet has been transmitted. A\r
394// transmit complete interrupt will still be generated and the transmit\r
395// buffer will have to be recycled.\r
396//\r
397#define PXE_OPFLAGS_SWUNDI_TRANSMIT_OPMASK 0x0001\r
398#define PXE_OPFLAGS_TRANSMIT_BLOCK 0x0001\r
399#define PXE_OPFLAGS_TRANSMIT_DONT_BLOCK 0x0000\r
400\r
401//\r
402//\r
403//\r
404#define PXE_OPFLAGS_TRANSMIT_OPMASK 0x0002\r
405#define PXE_OPFLAGS_TRANSMIT_FRAGMENTED 0x0002\r
406#define PXE_OPFLAGS_TRANSMIT_WHOLE 0x0000\r
407\r
408//\r
409// //////////////////////////////////////\r
410// UNDI Receive\r
411//\r
412// No OpFlags\r
413//\r
414typedef PXE_UINT16 PXE_STATFLAGS;\r
415\r
416#define PXE_STATFLAGS_INITIALIZE 0x0000\r
417\r
418//\r
419// //////////////////////////////////////\r
420// Common StatFlags that can be returned by all commands.\r
421//\r
422//\r
423// The COMMAND_COMPLETE and COMMAND_FAILED status flags must be\r
424// implemented by all UNDIs. COMMAND_QUEUED is only needed by UNDIs\r
425// that support command queuing.\r
426//\r
427#define PXE_STATFLAGS_STATUS_MASK 0xC000\r
428#define PXE_STATFLAGS_COMMAND_COMPLETE 0xC000\r
429#define PXE_STATFLAGS_COMMAND_FAILED 0x8000\r
430#define PXE_STATFLAGS_COMMAND_QUEUED 0x4000\r
431\r
432//\r
433// //////////////////////////////////////\r
434// UNDI Get State\r
435//\r
436#define PXE_STATFLAGS_GET_STATE_MASK 0x0003\r
437#define PXE_STATFLAGS_GET_STATE_INITIALIZED 0x0002\r
438#define PXE_STATFLAGS_GET_STATE_STARTED 0x0001\r
439#define PXE_STATFLAGS_GET_STATE_STOPPED 0x0000\r
440\r
441//\r
442// //////////////////////////////////////\r
443// UNDI Start\r
444//\r
445// No additional StatFlags\r
446\r
447////////////////////////////////////////\r
448// UNDI Get Init Info\r
449//\r
450#define PXE_STATFLAGS_CABLE_DETECT_MASK 0x0001\r
451#define PXE_STATFLAGS_CABLE_DETECT_NOT_SUPPORTED 0x0000\r
452#define PXE_STATFLAGS_CABLE_DETECT_SUPPORTED 0x0001\r
453\r
454//\r
455// //////////////////////////////////////\r
456// UNDI Initialize\r
457//\r
458#define PXE_STATFLAGS_INITIALIZED_NO_MEDIA 0x0001\r
459\r
460//\r
461// //////////////////////////////////////\r
462// UNDI Reset\r
463//\r
464#define PXE_STATFLAGS_RESET_NO_MEDIA 0x0001\r
465\r
466//\r
467// //////////////////////////////////////\r
468// UNDI Shutdown\r
469//\r
470// No additional StatFlags\r
471\r
472////////////////////////////////////////\r
473// UNDI Interrupt Enables\r
474//\r
475//\r
476// If set, receive interrupts are enabled.\r
477//\r
478#define PXE_STATFLAGS_INTERRUPT_RECEIVE 0x0001\r
479\r
480//\r
481// If set, transmit interrupts are enabled.\r
482//\r
483#define PXE_STATFLAGS_INTERRUPT_TRANSMIT 0x0002\r
484\r
485//\r
486// If set, command interrupts are enabled.\r
487//\r
488#define PXE_STATFLAGS_INTERRUPT_COMMAND 0x0004\r
489\r
490//\r
491// //////////////////////////////////////\r
492// UNDI Receive Filters\r
493//\r
494//\r
495// If set, unicast packets will be received.\r
496//\r
497#define PXE_STATFLAGS_RECEIVE_FILTER_UNICAST 0x0001\r
498\r
499//\r
500// If set, broadcast packets will be received.\r
501//\r
502#define PXE_STATFLAGS_RECEIVE_FILTER_BROADCAST 0x0002\r
503\r
504//\r
505// If set, multicast packets that match up with the multicast address\r
506// filter list will be received.\r
507//\r
508#define PXE_STATFLAGS_RECEIVE_FILTER_FILTERED_MULTICAST 0x0004\r
509\r
510//\r
511// If set, all packets will be received.\r
512//\r
513#define PXE_STATFLAGS_RECEIVE_FILTER_PROMISCUOUS 0x0008\r
514\r
515//\r
516// If set, all multicast packets will be received.\r
517//\r
518#define PXE_STATFLAGS_RECEIVE_FILTER_ALL_MULTICAST 0x0010\r
519\r
520//\r
521// //////////////////////////////////////\r
522// UNDI Station Address\r
523//\r
524// No additional StatFlags\r
525\r
526////////////////////////////////////////\r
527// UNDI Statistics\r
528//\r
529// No additional StatFlags\r
530\r
531////////////////////////////////////////\r
532// UNDI MCast IP to MAC\r
533//\r
534// No additional StatFlags\r
535\r
536////////////////////////////////////////\r
537// UNDI NvData\r
538//\r
539// No additional StatFlags\r
540\r
541\r
542////////////////////////////////////////\r
543// UNDI Get Status\r
544//\r
545//\r
546// Use to determine if an interrupt has occurred.\r
547//\r
548#define PXE_STATFLAGS_GET_STATUS_INTERRUPT_MASK 0x000F\r
549#define PXE_STATFLAGS_GET_STATUS_NO_INTERRUPTS 0x0000\r
550\r
551//\r
552// If set, at least one receive interrupt occurred.\r
553//\r
554#define PXE_STATFLAGS_GET_STATUS_RECEIVE 0x0001\r
555\r
556//\r
557// If set, at least one transmit interrupt occurred.\r
558//\r
559#define PXE_STATFLAGS_GET_STATUS_TRANSMIT 0x0002\r
560\r
561//\r
562// If set, at least one command interrupt occurred.\r
563//\r
564#define PXE_STATFLAGS_GET_STATUS_COMMAND 0x0004\r
565\r
566//\r
567// If set, at least one software interrupt occurred.\r
568//\r
569#define PXE_STATFLAGS_GET_STATUS_SOFTWARE 0x0008\r
570\r
571//\r
572// This flag is set if the transmitted buffer queue is empty. This flag\r
573// will be set if all transmitted buffer addresses get written into the DB.\r
574//\r
575#define PXE_STATFLAGS_GET_STATUS_TXBUF_QUEUE_EMPTY 0x0010\r
576\r
577//\r
578// This flag is set if no transmitted buffer addresses were written\r
579// into the DB. (This could be because DBsize was too small.)\r
580//\r
581#define PXE_STATFLAGS_GET_STATUS_NO_TXBUFS_WRITTEN 0x0020\r
582\r
583//\r
584// //////////////////////////////////////\r
585// UNDI Fill Header\r
586//\r
587// No additional StatFlags\r
588\r
589////////////////////////////////////////\r
590// UNDI Transmit\r
591//\r
592// No additional StatFlags.\r
593\r
594////////////////////////////////////////\r
595// UNDI Receive\r
596//\r
597// No additional StatFlags.\r
598//\r
599typedef PXE_UINT16 PXE_STATCODE;\r
600\r
601#define PXE_STATCODE_INITIALIZE 0x0000\r
602\r
603//\r
604// //////////////////////////////////////\r
605// Common StatCodes returned by all UNDI commands, UNDI protocol functions\r
606// and BC protocol functions.\r
607//\r
608#define PXE_STATCODE_SUCCESS 0x0000\r
609\r
610#define PXE_STATCODE_INVALID_CDB 0x0001\r
611#define PXE_STATCODE_INVALID_CPB 0x0002\r
612#define PXE_STATCODE_BUSY 0x0003\r
613#define PXE_STATCODE_QUEUE_FULL 0x0004\r
614#define PXE_STATCODE_ALREADY_STARTED 0x0005\r
615#define PXE_STATCODE_NOT_STARTED 0x0006\r
616#define PXE_STATCODE_NOT_SHUTDOWN 0x0007\r
617#define PXE_STATCODE_ALREADY_INITIALIZED 0x0008\r
618#define PXE_STATCODE_NOT_INITIALIZED 0x0009\r
619#define PXE_STATCODE_DEVICE_FAILURE 0x000A\r
620#define PXE_STATCODE_NVDATA_FAILURE 0x000B\r
621#define PXE_STATCODE_UNSUPPORTED 0x000C\r
622#define PXE_STATCODE_BUFFER_FULL 0x000D\r
623#define PXE_STATCODE_INVALID_PARAMETER 0x000E\r
624#define PXE_STATCODE_INVALID_UNDI 0x000F\r
625#define PXE_STATCODE_IPV4_NOT_SUPPORTED 0x0010\r
626#define PXE_STATCODE_IPV6_NOT_SUPPORTED 0x0011\r
627#define PXE_STATCODE_NOT_ENOUGH_MEMORY 0x0012\r
628#define PXE_STATCODE_NO_DATA 0x0013\r
629\r
630typedef PXE_UINT16 PXE_IFNUM;\r
631\r
632//\r
633// This interface number must be passed to the S/W UNDI Start command.\r
634//\r
635#define PXE_IFNUM_START 0x0000\r
636\r
637//\r
638// This interface number is returned by the S/W UNDI Get State and\r
639// Start commands if information in the CDB, CPB or DB is invalid.\r
640//\r
641#define PXE_IFNUM_INVALID 0x0000\r
642\r
643typedef PXE_UINT16 PXE_CONTROL;\r
644\r
645//\r
646// Setting this flag directs the UNDI to queue this command for later\r
647// execution if the UNDI is busy and it supports command queuing.\r
648// If queuing is not supported, a PXE_STATCODE_INVALID_CONTROL error\r
649// is returned. If the queue is full, a PXE_STATCODE_CDB_QUEUE_FULL\r
650// error is returned.\r
651//\r
652#define PXE_CONTROL_QUEUE_IF_BUSY 0x0002\r
653\r
654//\r
655// These two bit values are used to determine if there are more UNDI\r
656// CDB structures following this one. If the link bit is set, there\r
657// must be a CDB structure following this one. Execution will start\r
658// on the next CDB structure as soon as this one completes successfully.\r
659// If an error is generated by this command, execution will stop.\r
660//\r
661#define PXE_CONTROL_LINK 0x0001\r
662#define PXE_CONTROL_LAST_CDB_IN_LIST 0x0000\r
663\r
664typedef PXE_UINT8 PXE_FRAME_TYPE;\r
665\r
666#define PXE_FRAME_TYPE_NONE 0x00\r
667#define PXE_FRAME_TYPE_UNICAST 0x01\r
668#define PXE_FRAME_TYPE_BROADCAST 0x02\r
669#define PXE_FRAME_TYPE_FILTERED_MULTICAST 0x03\r
670#define PXE_FRAME_TYPE_PROMISCUOUS 0x04\r
671#define PXE_FRAME_TYPE_PROMISCUOUS_MULTICAST 0x05\r
672\r
673#define PXE_FRAME_TYPE_MULTICAST PXE_FRAME_TYPE_FILTERED_MULTICAST \r
674\r
675typedef PXE_UINT32 PXE_IPV4;\r
676\r
677typedef PXE_UINT32 PXE_IPV6[4];\r
678#define PXE_MAC_LENGTH 32\r
679\r
680typedef PXE_UINT8 PXE_MAC_ADDR[PXE_MAC_LENGTH];\r
681\r
682typedef PXE_UINT8 PXE_IFTYPE;\r
683typedef UINT16 PXE_MEDIA_PROTOCOL;\r
684\r
685//\r
686// This information is from the ARP section of RFC 1700.\r
687//\r
688// 1 Ethernet (10Mb) [JBP]\r
689// 2 Experimental Ethernet (3Mb) [JBP]\r
690// 3 Amateur Radio AX.25 [PXK]\r
691// 4 Proteon ProNET Token Ring [JBP]\r
692// 5 Chaos [GXP]\r
693// 6 IEEE 802 Networks [JBP]\r
694// 7 ARCNET [JBP]\r
695// 8 Hyperchannel [JBP]\r
696// 9 Lanstar [TU]\r
697// 10 Autonet Short Address [MXB1]\r
698// 11 LocalTalk [JKR1]\r
699// 12 LocalNet (IBM* PCNet or SYTEK* LocalNET) [JXM]\r
700// 13 Ultra link [RXD2]\r
701// 14 SMDS [GXC1]\r
702// 15 Frame Relay [AGM]\r
703// 16 Asynchronous Transmission Mode (ATM) [JXB2]\r
704// 17 HDLC [JBP]\r
705// 18 Fibre Channel [Yakov Rekhter]\r
706// 19 Asynchronous Transmission Mode (ATM) [Mark Laubach]\r
707// 20 Serial Line [JBP]\r
708// 21 Asynchronous Transmission Mode (ATM) [MXB1]\r
709//\r
710// * Other names and brands may be claimed as the property of others.\r
711//\r
712#define PXE_IFTYPE_ETHERNET 0x01\r
713#define PXE_IFTYPE_TOKENRING 0x04\r
714#define PXE_IFTYPE_FIBRE_CHANNEL 0x12\r
715\r
716typedef struct s_pxe_hw_undi {\r
717 PXE_UINT32 Signature; // PXE_ROMID_SIGNATURE\r
718 PXE_UINT8 Len; // sizeof(PXE_HW_UNDI)\r
719 PXE_UINT8 Fudge; // makes 8-bit cksum equal zero\r
720 PXE_UINT8 Rev; // PXE_ROMID_REV\r
721 PXE_UINT8 IFcnt; // physical connector count\r
722 PXE_UINT8 MajorVer; // PXE_ROMID_MAJORVER\r
723 PXE_UINT8 MinorVer; // PXE_ROMID_MINORVER\r
724 PXE_UINT16 reserved; // zero, not used\r
725 PXE_UINT32 Implementation; // implementation flags\r
726 // reserved // vendor use\r
727 // UINT32 Status; // status port\r
728 // UINT32 Command; // command port\r
729 // UINT64 CDBaddr; // CDB address port\r
730 //\r
731} PXE_HW_UNDI;\r
732\r
733//\r
734// Status port bit definitions\r
735//\r
736//\r
737// UNDI operation state\r
738//\r
739#define PXE_HWSTAT_STATE_MASK 0xC0000000\r
740#define PXE_HWSTAT_BUSY 0xC0000000\r
741#define PXE_HWSTAT_INITIALIZED 0x80000000\r
742#define PXE_HWSTAT_STARTED 0x40000000\r
743#define PXE_HWSTAT_STOPPED 0x00000000\r
744\r
745//\r
746// If set, last command failed\r
747//\r
748#define PXE_HWSTAT_COMMAND_FAILED 0x20000000\r
749\r
750//\r
751// If set, identifies enabled receive filters\r
752//\r
753#define PXE_HWSTAT_PROMISCUOUS_MULTICAST_RX_ENABLED 0x00001000\r
754#define PXE_HWSTAT_PROMISCUOUS_RX_ENABLED 0x00000800\r
755#define PXE_HWSTAT_BROADCAST_RX_ENABLED 0x00000400\r
756#define PXE_HWSTAT_MULTICAST_RX_ENABLED 0x00000200\r
757#define PXE_HWSTAT_UNICAST_RX_ENABLED 0x00000100\r
758\r
759//\r
760// If set, identifies enabled external interrupts\r
761//\r
762#define PXE_HWSTAT_SOFTWARE_INT_ENABLED 0x00000080\r
763#define PXE_HWSTAT_TX_COMPLETE_INT_ENABLED 0x00000040\r
764#define PXE_HWSTAT_PACKET_RX_INT_ENABLED 0x00000020\r
765#define PXE_HWSTAT_CMD_COMPLETE_INT_ENABLED 0x00000010\r
766\r
767//\r
768// If set, identifies pending interrupts\r
769//\r
770#define PXE_HWSTAT_SOFTWARE_INT_PENDING 0x00000008\r
771#define PXE_HWSTAT_TX_COMPLETE_INT_PENDING 0x00000004\r
772#define PXE_HWSTAT_PACKET_RX_INT_PENDING 0x00000002\r
773#define PXE_HWSTAT_CMD_COMPLETE_INT_PENDING 0x00000001\r
774\r
775//\r
776// Command port definitions\r
777//\r
778//\r
779// If set, CDB identified in CDBaddr port is given to UNDI.\r
780// If not set, other bits in this word will be processed.\r
781//\r
782#define PXE_HWCMD_ISSUE_COMMAND 0x80000000\r
783#define PXE_HWCMD_INTS_AND_FILTS 0x00000000\r
784\r
785//\r
786// Use these to enable/disable receive filters.\r
787//\r
788#define PXE_HWCMD_PROMISCUOUS_MULTICAST_RX_ENABLE 0x00001000\r
789#define PXE_HWCMD_PROMISCUOUS_RX_ENABLE 0x00000800\r
790#define PXE_HWCMD_BROADCAST_RX_ENABLE 0x00000400\r
791#define PXE_HWCMD_MULTICAST_RX_ENABLE 0x00000200\r
792#define PXE_HWCMD_UNICAST_RX_ENABLE 0x00000100\r
793\r
794//\r
795// Use these to enable/disable external interrupts\r
796//\r
797#define PXE_HWCMD_SOFTWARE_INT_ENABLE 0x00000080\r
798#define PXE_HWCMD_TX_COMPLETE_INT_ENABLE 0x00000040\r
799#define PXE_HWCMD_PACKET_RX_INT_ENABLE 0x00000020\r
800#define PXE_HWCMD_CMD_COMPLETE_INT_ENABLE 0x00000010\r
801\r
802//\r
803// Use these to clear pending external interrupts\r
804//\r
805#define PXE_HWCMD_CLEAR_SOFTWARE_INT 0x00000008\r
806#define PXE_HWCMD_CLEAR_TX_COMPLETE_INT 0x00000004\r
807#define PXE_HWCMD_CLEAR_PACKET_RX_INT 0x00000002\r
808#define PXE_HWCMD_CLEAR_CMD_COMPLETE_INT 0x00000001\r
809\r
810typedef struct s_pxe_sw_undi {\r
811 PXE_UINT32 Signature; // PXE_ROMID_SIGNATURE\r
812 PXE_UINT8 Len; // sizeof(PXE_SW_UNDI)\r
813 PXE_UINT8 Fudge; // makes 8-bit cksum zero\r
814 PXE_UINT8 Rev; // PXE_ROMID_REV\r
815 PXE_UINT8 IFcnt; // physical connector count\r
816 PXE_UINT8 MajorVer; // PXE_ROMID_MAJORVER\r
817 PXE_UINT8 MinorVer; // PXE_ROMID_MINORVER\r
818 PXE_UINT16 reserved1; // zero, not used\r
819 PXE_UINT32 Implementation; // Implementation flags\r
820 PXE_UINT64 EntryPoint; // API entry point\r
821 PXE_UINT8 reserved2[3]; // zero, not used\r
822 PXE_UINT8 BusCnt; // number of bustypes supported\r
823 PXE_UINT32 BusType[1]; // list of supported bustypes\r
824} PXE_SW_UNDI;\r
825\r
826typedef union u_pxe_undi {\r
827 PXE_HW_UNDI hw;\r
828 PXE_SW_UNDI sw;\r
829} PXE_UNDI;\r
830\r
831//\r
832// Signature of !PXE structure\r
833//\r
834#define PXE_ROMID_SIGNATURE PXE_BUSTYPE ('!', 'P', 'X', 'E')\r
835\r
836//\r
837// !PXE structure format revision\r
838//\r
839#define PXE_ROMID_REV 0x02\r
840\r
841//\r
842// UNDI command interface revision. These are the values that get sent\r
843// in option 94 (Client Network Interface Identifier) in the DHCP Discover\r
844// and PXE Boot Server Request packets.\r
845//\r
846#define PXE_ROMID_MAJORVER 0x03\r
847#define PXE_ROMID_MINORVER 0x01\r
848\r
849//\r
850// Implementation flags\r
851//\r
852#define PXE_ROMID_IMP_HW_UNDI 0x80000000\r
853#define PXE_ROMID_IMP_SW_VIRT_ADDR 0x40000000\r
854#define PXE_ROMID_IMP_64BIT_DEVICE 0x00010000\r
855#define PXE_ROMID_IMP_FRAG_SUPPORTED 0x00008000\r
856#define PXE_ROMID_IMP_CMD_LINK_SUPPORTED 0x00004000\r
857#define PXE_ROMID_IMP_CMD_QUEUE_SUPPORTED 0x00002000\r
858#define PXE_ROMID_IMP_MULTI_FRAME_SUPPORTED 0x00001000\r
859#define PXE_ROMID_IMP_NVDATA_SUPPORT_MASK 0x00000C00\r
860#define PXE_ROMID_IMP_NVDATA_BULK_WRITABLE 0x00000C00\r
861#define PXE_ROMID_IMP_NVDATA_SPARSE_WRITABLE 0x00000800\r
862#define PXE_ROMID_IMP_NVDATA_READ_ONLY 0x00000400\r
863#define PXE_ROMID_IMP_NVDATA_NOT_AVAILABLE 0x00000000\r
864#define PXE_ROMID_IMP_STATISTICS_SUPPORTED 0x00000200\r
865#define PXE_ROMID_IMP_STATION_ADDR_SETTABLE 0x00000100\r
866#define PXE_ROMID_IMP_PROMISCUOUS_MULTICAST_RX_SUPPORTED 0x00000080\r
867#define PXE_ROMID_IMP_PROMISCUOUS_RX_SUPPORTED 0x00000040\r
868#define PXE_ROMID_IMP_BROADCAST_RX_SUPPORTED 0x00000020\r
869#define PXE_ROMID_IMP_FILTERED_MULTICAST_RX_SUPPORTED 0x00000010\r
870#define PXE_ROMID_IMP_SOFTWARE_INT_SUPPORTED 0x00000008\r
871#define PXE_ROMID_IMP_TX_COMPLETE_INT_SUPPORTED 0x00000004\r
872#define PXE_ROMID_IMP_PACKET_RX_INT_SUPPORTED 0x00000002\r
873#define PXE_ROMID_IMP_CMD_COMPLETE_INT_SUPPORTED 0x00000001\r
874\r
875typedef struct s_pxe_cdb {\r
876 PXE_OPCODE OpCode;\r
877 PXE_OPFLAGS OpFlags;\r
878 PXE_UINT16 CPBsize;\r
879 PXE_UINT16 DBsize;\r
880 PXE_UINT64 CPBaddr;\r
881 PXE_UINT64 DBaddr;\r
882 PXE_STATCODE StatCode;\r
883 PXE_STATFLAGS StatFlags;\r
884 PXE_UINT16 IFnum;\r
885 PXE_CONTROL Control;\r
886} PXE_CDB;\r
887\r
888typedef union u_pxe_ip_addr {\r
889 PXE_IPV6 IPv6;\r
890 PXE_IPV4 IPv4;\r
891} PXE_IP_ADDR;\r
892\r
893typedef union pxe_device {\r
894 //\r
895 // PCI and PC Card NICs are both identified using bus, device\r
896 // and function numbers. For PC Card, this may require PC\r
897 // Card services to be loaded in the BIOS or preboot\r
898 // environment.\r
899 //\r
900 struct {\r
901 //\r
902 // See S/W UNDI ROMID structure definition for PCI and\r
903 // PCC BusType definitions.\r
904 //\r
905 PXE_UINT32 BusType;\r
906\r
907 //\r
908 // Bus, device & function numbers that locate this device.\r
909 //\r
910 PXE_UINT16 Bus;\r
911 PXE_UINT8 Device;\r
912 PXE_UINT8 Function;\r
913 }\r
914 PCI, PCC;\r
915\r
916 //\r
917 // %%TBD - More information is needed about enumerating\r
918 // USB and 1394 devices.\r
919 //\r
920 struct {\r
921 PXE_UINT32 BusType;\r
922 PXE_UINT32 tdb;\r
923 }\r
924 USB, _1394;\r
925} PXE_DEVICE;\r
926\r
927//\r
928// cpb and db definitions\r
929//\r
930#define MAX_PCI_CONFIG_LEN 64 // # of dwords\r
931#define MAX_EEPROM_LEN 128 // #of dwords\r
932#define MAX_XMIT_BUFFERS 32 // recycling Q length for xmit_done\r
933#define MAX_MCAST_ADDRESS_CNT 8\r
934\r
935typedef struct s_pxe_cpb_start_30 {\r
936 //\r
937 // PXE_VOID Delay(UINTN microseconds);\r
938 //\r
939 // UNDI will never request a delay smaller than 10 microseconds\r
940 // and will always request delays in increments of 10 microseconds.\r
941 // The Delay() CallBack routine must delay between n and n + 10\r
942 // microseconds before returning control to the UNDI.\r
943 //\r
944 // This field cannot be set to zero.\r
945 //\r
946 UINT64 Delay;\r
947\r
948 //\r
949 // PXE_VOID Block(UINT32 enable);\r
950 //\r
951 // UNDI may need to block multi-threaded/multi-processor access to\r
952 // critical code sections when programming or accessing the network\r
953 // device. To this end, a blocking service is needed by the UNDI.\r
954 // When UNDI needs a block, it will call Block() passing a non-zero\r
955 // value. When UNDI no longer needs a block, it will call Block()\r
956 // with a zero value. When called, if the Block() is already enabled,\r
957 // do not return control to the UNDI until the previous Block() is\r
958 // disabled.\r
959 //\r
960 // This field cannot be set to zero.\r
961 //\r
962 UINT64 Block;\r
963\r
964 //\r
965 // PXE_VOID Virt2Phys(UINT64 virtual, UINT64 physical_ptr);\r
966 //\r
967 // UNDI will pass the virtual address of a buffer and the virtual\r
968 // address of a 64-bit physical buffer. Convert the virtual address\r
969 // to a physical address and write the result to the physical address\r
970 // buffer. If virtual and physical addresses are the same, just\r
971 // copy the virtual address to the physical address buffer.\r
972 //\r
973 // This field can be set to zero if virtual and physical addresses\r
974 // are equal.\r
975 //\r
976 UINT64 Virt2Phys;\r
977 //\r
978 // PXE_VOID Mem_IO(UINT8 read_write, UINT8 len, UINT64 port,\r
979 // UINT64 buf_addr);\r
980 //\r
981 // UNDI will read or write the device io space using this call back\r
982 // function. It passes the number of bytes as the len parameter and it\r
983 // will be either 1,2,4 or 8.\r
984 //\r
985 // This field can not be set to zero.\r
986 //\r
987 UINT64 Mem_IO;\r
988} PXE_CPB_START_30;\r
989\r
990typedef struct s_pxe_cpb_start_31 {\r
991 //\r
992 // PXE_VOID Delay(UINT64 UnqId, UINTN microseconds);\r
993 //\r
994 // UNDI will never request a delay smaller than 10 microseconds\r
995 // and will always request delays in increments of 10 microseconds.\r
996 // The Delay() CallBack routine must delay between n and n + 10\r
997 // microseconds before returning control to the UNDI.\r
998 //\r
999 // This field cannot be set to zero.\r
1000 //\r
1001 UINT64 Delay;\r
1002\r
1003 //\r
1004 // PXE_VOID Block(UINT64 unq_id, UINT32 enable);\r
1005 //\r
1006 // UNDI may need to block multi-threaded/multi-processor access to\r
1007 // critical code sections when programming or accessing the network\r
1008 // device. To this end, a blocking service is needed by the UNDI.\r
1009 // When UNDI needs a block, it will call Block() passing a non-zero\r
1010 // value. When UNDI no longer needs a block, it will call Block()\r
1011 // with a zero value. When called, if the Block() is already enabled,\r
1012 // do not return control to the UNDI until the previous Block() is\r
1013 // disabled.\r
1014 //\r
1015 // This field cannot be set to zero.\r
1016 //\r
1017 UINT64 Block;\r
1018\r
1019 //\r
1020 // PXE_VOID Virt2Phys(UINT64 UnqId, UINT64 virtual, UINT64 physical_ptr);\r
1021 //\r
1022 // UNDI will pass the virtual address of a buffer and the virtual\r
1023 // address of a 64-bit physical buffer. Convert the virtual address\r
1024 // to a physical address and write the result to the physical address\r
1025 // buffer. If virtual and physical addresses are the same, just\r
1026 // copy the virtual address to the physical address buffer.\r
1027 //\r
1028 // This field can be set to zero if virtual and physical addresses\r
1029 // are equal.\r
1030 //\r
1031 UINT64 Virt2Phys;\r
1032 //\r
1033 // PXE_VOID Mem_IO(UINT64 UnqId, UINT8 read_write, UINT8 len, UINT64 port,\r
1034 // UINT64 buf_addr);\r
1035 //\r
1036 // UNDI will read or write the device io space using this call back\r
1037 // function. It passes the number of bytes as the len parameter and it\r
1038 // will be either 1,2,4 or 8.\r
1039 //\r
1040 // This field can not be set to zero.\r
1041 //\r
1042 UINT64 Mem_IO;\r
1043 //\r
1044 // PXE_VOID Map_Mem(UINT64 unq_id, UINT64 virtual_addr, UINT32 size,\r
1045 // UINT32 Direction, UINT64 mapped_addr);\r
1046 //\r
1047 // UNDI will pass the virtual address of a buffer, direction of the data\r
1048 // flow from/to the mapped buffer (the constants are defined below)\r
1049 // and a place holder (pointer) for the mapped address.\r
1050 // This call will Map the given address to a physical DMA address and write\r
1051 // the result to the mapped_addr pointer. If there is no need to\r
1052 // map the given address to a lower address (i.e. the given address is\r
1053 // associated with a physical address that is already compatible to be\r
1054 // used with the DMA, it converts the given virtual address to it's\r
1055 // physical address and write that in the mapped address pointer.\r
1056 //\r
1057 // This field can be set to zero if there is no mapping service available\r
1058 //\r
1059 UINT64 Map_Mem;\r
1060\r
1061 //\r
1062 // PXE_VOID UnMap_Mem(UINT64 unq_id, UINT64 virtual_addr, UINT32 size,\r
1063 // UINT32 Direction, UINT64 mapped_addr);\r
1064 //\r
1065 // UNDI will pass the virtual and mapped addresses of a buffer\r
1066 // This call will un map the given address\r
1067 //\r
1068 // This field can be set to zero if there is no unmapping service available\r
1069 //\r
1070 UINT64 UnMap_Mem;\r
1071\r
1072 //\r
1073 // PXE_VOID Sync_Mem(UINT64 unq_id, UINT64 virtual,\r
1074 // UINT32 size, UINT32 Direction, UINT64 mapped_addr);\r
1075 //\r
1076 // UNDI will pass the virtual and mapped addresses of a buffer\r
1077 // This call will synchronize the contents of both the virtual and mapped\r
1078 // buffers for the given Direction.\r
1079 //\r
1080 // This field can be set to zero if there is no service available\r
1081 //\r
1082 UINT64 Sync_Mem;\r
1083\r
1084 //\r
1085 // protocol driver can provide anything for this Unique_ID, UNDI remembers\r
1086 // that as just a 64bit value assocaited to the interface specified by\r
1087 // the ifnum and gives it back as a parameter to all the call-back routines\r
1088 // when calling for that interface!\r
1089 //\r
1090 UINT64 Unique_ID;\r
1091 //\r
1092} PXE_CPB_START_31;\r
1093\r
1094#define TO_AND_FROM_DEVICE 0\r
1095#define FROM_DEVICE 1\r
1096#define TO_DEVICE 2\r
1097\r
1098#define PXE_DELAY_MILLISECOND 1000\r
1099#define PXE_DELAY_SECOND 1000000\r
1100#define PXE_IO_READ 0\r
1101#define PXE_IO_WRITE 1\r
1102#define PXE_MEM_READ 2\r
1103#define PXE_MEM_WRITE 4\r
1104\r
1105typedef struct s_pxe_db_get_init_info {\r
1106 //\r
1107 // Minimum length of locked memory buffer that must be given to\r
1108 // the Initialize command. Giving UNDI more memory will generally\r
1109 // give better performance.\r
1110 //\r
1111 // If MemoryRequired is zero, the UNDI does not need and will not\r
1112 // use system memory to receive and transmit packets.\r
1113 //\r
1114 PXE_UINT32 MemoryRequired;\r
1115\r
1116 //\r
1117 // Maximum frame data length for Tx/Rx excluding the media header.\r
1118 //\r
1119 PXE_UINT32 FrameDataLen;\r
1120\r
1121 //\r
1122 // Supported link speeds are in units of mega bits. Common ethernet\r
1123 // values are 10, 100 and 1000. Unused LinkSpeeds[] entries are zero\r
1124 // filled.\r
1125 //\r
1126 PXE_UINT32 LinkSpeeds[4];\r
1127\r
1128 //\r
1129 // Number of non-volatile storage items.\r
1130 //\r
1131 PXE_UINT32 NvCount;\r
1132\r
1133 //\r
1134 // Width of non-volatile storage item in bytes. 0, 1, 2 or 4\r
1135 //\r
1136 PXE_UINT16 NvWidth;\r
1137\r
1138 //\r
1139 // Media header length. This is the typical media header length for\r
1140 // this UNDI. This information is needed when allocating receive\r
1141 // and transmit buffers.\r
1142 //\r
1143 PXE_UINT16 MediaHeaderLen;\r
1144\r
1145 //\r
1146 // Number of bytes in the NIC hardware (MAC) address.\r
1147 //\r
1148 PXE_UINT16 HWaddrLen;\r
1149\r
1150 //\r
1151 // Maximum number of multicast MAC addresses in the multicast\r
1152 // MAC address filter list.\r
1153 //\r
1154 PXE_UINT16 MCastFilterCnt;\r
1155\r
1156 //\r
1157 // Default number and size of transmit and receive buffers that will\r
1158 // be allocated by the UNDI. If MemoryRequired is non-zero, this\r
1159 // allocation will come out of the memory buffer given to the Initialize\r
1160 // command. If MemoryRequired is zero, this allocation will come out of\r
1161 // memory on the NIC.\r
1162 //\r
1163 PXE_UINT16 TxBufCnt;\r
1164 PXE_UINT16 TxBufSize;\r
1165 PXE_UINT16 RxBufCnt;\r
1166 PXE_UINT16 RxBufSize;\r
1167\r
1168 //\r
1169 // Hardware interface types defined in the Assigned Numbers RFC\r
1170 // and used in DHCP and ARP packets.\r
1171 // See the PXE_IFTYPE typedef and PXE_IFTYPE_xxx macros.\r
1172 //\r
1173 PXE_UINT8 IFtype;\r
1174\r
1175 //\r
1176 // Supported duplex. See PXE_DUPLEX_xxxxx #defines below.\r
1177 //\r
1178 PXE_UINT8 SupportedDuplexModes;\r
1179\r
1180 //\r
1181 // Supported loopback options. See PXE_LOOPBACK_xxxxx #defines below.\r
1182 //\r
1183 PXE_UINT8 SupportedLoopBackModes;\r
1184} PXE_DB_GET_INIT_INFO;\r
1185\r
1186#define PXE_MAX_TXRX_UNIT_ETHER 1500\r
1187\r
1188#define PXE_HWADDR_LEN_ETHER 0x0006\r
1189#define PXE_MAC_HEADER_LEN_ETHER 0x000E\r
1190\r
1191#define PXE_DUPLEX_ENABLE_FULL_SUPPORTED 1\r
1192#define PXE_DUPLEX_FORCE_FULL_SUPPORTED 2\r
1193\r
1194#define PXE_LOOPBACK_INTERNAL_SUPPORTED 1\r
1195#define PXE_LOOPBACK_EXTERNAL_SUPPORTED 2\r
1196\r
1197typedef struct s_pxe_pci_config_info {\r
1198 //\r
1199 // This is the flag field for the PXE_DB_GET_CONFIG_INFO union.\r
1200 // For PCI bus devices, this field is set to PXE_BUSTYPE_PCI.\r
1201 //\r
1202 UINT32 BusType;\r
1203\r
1204 //\r
1205 // This identifies the PCI network device that this UNDI interface\r
1206 // is bound to.\r
1207 //\r
1208 UINT16 Bus;\r
1209 UINT8 Device;\r
1210 UINT8 Function;\r
1211\r
1212 //\r
1213 // This is a copy of the PCI configuration space for this\r
1214 // network device.\r
1215 //\r
1216 union {\r
1217 UINT8 Byte[256];\r
1218 UINT16 Word[128];\r
1219 UINT32 Dword[64];\r
1220 } Config;\r
1221} PXE_PCI_CONFIG_INFO;\r
1222\r
1223typedef struct s_pxe_pcc_config_info {\r
1224 //\r
1225 // This is the flag field for the PXE_DB_GET_CONFIG_INFO union.\r
1226 // For PCC bus devices, this field is set to PXE_BUSTYPE_PCC.\r
1227 //\r
1228 PXE_UINT32 BusType;\r
1229\r
1230 //\r
1231 // This identifies the PCC network device that this UNDI interface\r
1232 // is bound to.\r
1233 //\r
1234 PXE_UINT16 Bus;\r
1235 PXE_UINT8 Device;\r
1236 PXE_UINT8 Function;\r
1237\r
1238 //\r
1239 // This is a copy of the PCC configuration space for this\r
1240 // network device.\r
1241 //\r
1242 union {\r
1243 PXE_UINT8 Byte[256];\r
1244 PXE_UINT16 Word[128];\r
1245 PXE_UINT32 Dword[64];\r
1246 } Config;\r
1247} PXE_PCC_CONFIG_INFO;\r
1248\r
1249typedef union u_pxe_db_get_config_info {\r
1250 PXE_PCI_CONFIG_INFO pci;\r
1251 PXE_PCC_CONFIG_INFO pcc;\r
1252} PXE_DB_GET_CONFIG_INFO;\r
1253\r
1254typedef struct s_pxe_cpb_initialize {\r
1255 //\r
1256 // Address of first (lowest) byte of the memory buffer. This buffer must\r
1257 // be in contiguous physical memory and cannot be swapped out. The UNDI\r
1258 // will be using this for transmit and receive buffering.\r
1259 //\r
1260 PXE_UINT64 MemoryAddr;\r
1261\r
1262 //\r
1263 // MemoryLength must be greater than or equal to MemoryRequired\r
1264 // returned by the Get Init Info command.\r
1265 //\r
1266 PXE_UINT32 MemoryLength;\r
1267\r
1268 //\r
1269 // Desired link speed in Mbit/sec. Common ethernet values are 10, 100\r
1270 // and 1000. Setting a value of zero will auto-detect and/or use the\r
1271 // default link speed (operation depends on UNDI/NIC functionality).\r
1272 //\r
1273 PXE_UINT32 LinkSpeed;\r
1274\r
1275 //\r
1276 // Suggested number and size of receive and transmit buffers to\r
1277 // allocate. If MemoryAddr and MemoryLength are non-zero, this\r
1278 // allocation comes out of the supplied memory buffer. If MemoryAddr\r
1279 // and MemoryLength are zero, this allocation comes out of memory\r
1280 // on the NIC.\r
1281 //\r
1282 // If these fields are set to zero, the UNDI will allocate buffer\r
1283 // counts and sizes as it sees fit.\r
1284 //\r
1285 PXE_UINT16 TxBufCnt;\r
1286 PXE_UINT16 TxBufSize;\r
1287 PXE_UINT16 RxBufCnt;\r
1288 PXE_UINT16 RxBufSize;\r
1289\r
1290 //\r
1291 // The following configuration parameters are optional and must be zero\r
1292 // to use the default values.\r
1293 //\r
1294 PXE_UINT8 DuplexMode;\r
1295\r
1296 PXE_UINT8 LoopBackMode;\r
1297} PXE_CPB_INITIALIZE;\r
1298\r
1299#define PXE_DUPLEX_DEFAULT 0x00\r
1300#define PXE_FORCE_FULL_DUPLEX 0x01\r
1301#define PXE_ENABLE_FULL_DUPLEX 0x02\r
1302#define PXE_FORCE_HALF_DUPLEX 0x04\r
1303#define PXE_DISABLE_FULL_DUPLEX 0x08\r
1304\r
1305#define LOOPBACK_NORMAL 0\r
1306#define LOOPBACK_INTERNAL 1\r
1307#define LOOPBACK_EXTERNAL 2\r
1308\r
1309typedef struct s_pxe_db_initialize {\r
1310 //\r
1311 // Actual amount of memory used from the supplied memory buffer. This\r
1312 // may be less that the amount of memory suppllied and may be zero if\r
1313 // the UNDI and network device do not use external memory buffers.\r
1314 //\r
1315 // Memory used by the UNDI and network device is allocated from the\r
1316 // lowest memory buffer address.\r
1317 //\r
1318 PXE_UINT32 MemoryUsed;\r
1319\r
1320 //\r
1321 // Actual number and size of receive and transmit buffers that were\r
1322 // allocated.\r
1323 //\r
1324 PXE_UINT16 TxBufCnt;\r
1325 PXE_UINT16 TxBufSize;\r
1326 PXE_UINT16 RxBufCnt;\r
1327 PXE_UINT16 RxBufSize;\r
1328} PXE_DB_INITIALIZE;\r
1329\r
1330typedef struct s_pxe_cpb_receive_filters {\r
1331 //\r
1332 // List of multicast MAC addresses. This list, if present, will\r
1333 // replace the existing multicast MAC address filter list.\r
1334 //\r
1335 PXE_MAC_ADDR MCastList[MAX_MCAST_ADDRESS_CNT];\r
1336} PXE_CPB_RECEIVE_FILTERS;\r
1337\r
1338typedef struct s_pxe_db_receive_filters {\r
1339 //\r
1340 // Filtered multicast MAC address list.\r
1341 //\r
1342 PXE_MAC_ADDR MCastList[MAX_MCAST_ADDRESS_CNT];\r
1343} PXE_DB_RECEIVE_FILTERS;\r
1344\r
1345typedef struct s_pxe_cpb_station_address {\r
1346 //\r
1347 // If supplied and supported, the current station MAC address\r
1348 // will be changed.\r
1349 //\r
1350 PXE_MAC_ADDR StationAddr;\r
1351} PXE_CPB_STATION_ADDRESS;\r
1352\r
1353typedef struct s_pxe_dpb_station_address {\r
1354 //\r
1355 // Current station MAC address.\r
1356 //\r
1357 PXE_MAC_ADDR StationAddr;\r
1358\r
1359 //\r
1360 // Station broadcast MAC address.\r
1361 //\r
1362 PXE_MAC_ADDR BroadcastAddr;\r
1363\r
1364 //\r
1365 // Permanent station MAC address.\r
1366 //\r
1367 PXE_MAC_ADDR PermanentAddr;\r
1368} PXE_DB_STATION_ADDRESS;\r
1369\r
1370typedef struct s_pxe_db_statistics {\r
1371 //\r
1372 // Bit field identifying what statistic data is collected by the\r
1373 // UNDI/NIC.\r
1374 // If bit 0x00 is set, Data[0x00] is collected.\r
1375 // If bit 0x01 is set, Data[0x01] is collected.\r
1376 // If bit 0x20 is set, Data[0x20] is collected.\r
1377 // If bit 0x21 is set, Data[0x21] is collected.\r
1378 // Etc.\r
1379 //\r
1380 PXE_UINT64 Supported;\r
1381\r
1382 //\r
1383 // Statistic data.\r
1384 //\r
1385 PXE_UINT64 Data[64];\r
1386} PXE_DB_STATISTICS;\r
1387\r
1388//\r
1389// Total number of frames received. Includes frames with errors and\r
1390// dropped frames.\r
1391//\r
1392#define PXE_STATISTICS_RX_TOTAL_FRAMES 0x00\r
1393\r
1394//\r
1395// Number of valid frames received and copied into receive buffers.\r
1396//\r
1397#define PXE_STATISTICS_RX_GOOD_FRAMES 0x01\r
1398\r
1399//\r
1400// Number of frames below the minimum length for the media.\r
1401// This would be <64 for ethernet.\r
1402//\r
1403#define PXE_STATISTICS_RX_UNDERSIZE_FRAMES 0x02\r
1404\r
1405//\r
1406// Number of frames longer than the maxminum length for the\r
1407// media. This would be >1500 for ethernet.\r
1408//\r
1409#define PXE_STATISTICS_RX_OVERSIZE_FRAMES 0x03\r
1410\r
1411//\r
1412// Valid frames that were dropped because receive buffers were full.\r
1413//\r
1414#define PXE_STATISTICS_RX_DROPPED_FRAMES 0x04\r
1415\r
1416//\r
1417// Number of valid unicast frames received and not dropped.\r
1418//\r
1419#define PXE_STATISTICS_RX_UNICAST_FRAMES 0x05\r
1420\r
1421//\r
1422// Number of valid broadcast frames received and not dropped.\r
1423//\r
1424#define PXE_STATISTICS_RX_BROADCAST_FRAMES 0x06\r
1425\r
1426//\r
1427// Number of valid mutlicast frames received and not dropped.\r
1428//\r
1429#define PXE_STATISTICS_RX_MULTICAST_FRAMES 0x07\r
1430\r
1431//\r
1432// Number of frames w/ CRC or alignment errors.\r
1433//\r
1434#define PXE_STATISTICS_RX_CRC_ERROR_FRAMES 0x08\r
1435\r
1436//\r
1437// Total number of bytes received. Includes frames with errors\r
1438// and dropped frames.\r
1439//\r
1440#define PXE_STATISTICS_RX_TOTAL_BYTES 0x09\r
1441\r
1442//\r
1443// Transmit statistics.\r
1444//\r
1445#define PXE_STATISTICS_TX_TOTAL_FRAMES 0x0A\r
1446#define PXE_STATISTICS_TX_GOOD_FRAMES 0x0B\r
1447#define PXE_STATISTICS_TX_UNDERSIZE_FRAMES 0x0C\r
1448#define PXE_STATISTICS_TX_OVERSIZE_FRAMES 0x0D\r
1449#define PXE_STATISTICS_TX_DROPPED_FRAMES 0x0E\r
1450#define PXE_STATISTICS_TX_UNICAST_FRAMES 0x0F\r
1451#define PXE_STATISTICS_TX_BROADCAST_FRAMES 0x10\r
1452#define PXE_STATISTICS_TX_MULTICAST_FRAMES 0x11\r
1453#define PXE_STATISTICS_TX_CRC_ERROR_FRAMES 0x12\r
1454#define PXE_STATISTICS_TX_TOTAL_BYTES 0x13\r
1455\r
1456//\r
1457// Number of collisions detection on this subnet.\r
1458//\r
1459#define PXE_STATISTICS_COLLISIONS 0x14\r
1460\r
1461//\r
1462// Number of frames destined for unsupported protocol.\r
1463//\r
1464#define PXE_STATISTICS_UNSUPPORTED_PROTOCOL 0x15\r
1465\r
1466typedef struct s_pxe_cpb_mcast_ip_to_mac {\r
1467 //\r
1468 // Multicast IP address to be converted to multicast MAC address.\r
1469 //\r
1470 PXE_IP_ADDR IP;\r
1471} PXE_CPB_MCAST_IP_TO_MAC;\r
1472\r
1473typedef struct s_pxe_db_mcast_ip_to_mac {\r
1474 //\r
1475 // Multicast MAC address.\r
1476 //\r
1477 PXE_MAC_ADDR MAC;\r
1478} PXE_DB_MCAST_IP_TO_MAC;\r
1479\r
1480typedef struct s_pxe_cpb_nvdata_sparse {\r
1481 //\r
1482 // NvData item list. Only items in this list will be updated.\r
1483 //\r
1484 struct {\r
1485 //\r
1486 // Non-volatile storage address to be changed.\r
1487 //\r
1488 PXE_UINT32 Addr;\r
1489\r
1490 //\r
1491 // Data item to write into above storage address.\r
1492 //\r
1493 union {\r
1494 PXE_UINT8 Byte;\r
1495 PXE_UINT16 Word;\r
1496 PXE_UINT32 Dword;\r
1497 } Data;\r
1498 } Item[MAX_EEPROM_LEN];\r
1499}\r
1500PXE_CPB_NVDATA_SPARSE;\r
1501\r
1502//\r
1503// When using bulk update, the size of the CPB structure must be\r
1504// the same size as the non-volatile NIC storage.\r
1505//\r
1506typedef union u_pxe_cpb_nvdata_bulk {\r
1507 //\r
1508 // Array of byte-wide data items.\r
1509 //\r
1510 PXE_UINT8 Byte[MAX_EEPROM_LEN << 2];\r
1511\r
1512 //\r
1513 // Array of word-wide data items.\r
1514 //\r
1515 PXE_UINT16 Word[MAX_EEPROM_LEN << 1];\r
1516\r
1517 //\r
1518 // Array of dword-wide data items.\r
1519 //\r
1520 PXE_UINT32 Dword[MAX_EEPROM_LEN];\r
1521} PXE_CPB_NVDATA_BULK;\r
1522\r
1523typedef struct s_pxe_db_nvdata {\r
1524 //\r
1525 // Arrays of data items from non-volatile storage.\r
1526 //\r
1527 union {\r
1528 //\r
1529 // Array of byte-wide data items.\r
1530 //\r
1531 PXE_UINT8 Byte[MAX_EEPROM_LEN << 2];\r
1532\r
1533 //\r
1534 // Array of word-wide data items.\r
1535 //\r
1536 PXE_UINT16 Word[MAX_EEPROM_LEN << 1];\r
1537\r
1538 //\r
1539 // Array of dword-wide data items.\r
1540 //\r
1541 PXE_UINT32 Dword[MAX_EEPROM_LEN];\r
1542 } Data;\r
1543} PXE_DB_NVDATA;\r
1544\r
1545typedef struct s_pxe_db_get_status {\r
1546 //\r
1547 // Length of next receive frame (header + data). If this is zero,\r
1548 // there is no next receive frame available.\r
1549 //\r
1550 PXE_UINT32 RxFrameLen;\r
1551\r
1552 //\r
1553 // Reserved, set to zero.\r
1554 //\r
1555 PXE_UINT32 reserved;\r
1556\r
1557 //\r
1558 // Addresses of transmitted buffers that need to be recycled.\r
1559 //\r
1560 PXE_UINT64 TxBuffer[MAX_XMIT_BUFFERS];\r
1561} PXE_DB_GET_STATUS;\r
1562\r
1563typedef struct s_pxe_cpb_fill_header {\r
1564 //\r
1565 // Source and destination MAC addresses. These will be copied into\r
1566 // the media header without doing byte swapping.\r
1567 //\r
1568 PXE_MAC_ADDR SrcAddr;\r
1569 PXE_MAC_ADDR DestAddr;\r
1570\r
1571 //\r
1572 // Address of first byte of media header. The first byte of packet data\r
1573 // follows the last byte of the media header.\r
1574 //\r
1575 PXE_UINT64 MediaHeader;\r
1576\r
1577 //\r
1578 // Length of packet data in bytes (not including the media header).\r
1579 //\r
1580 PXE_UINT32 PacketLen;\r
1581\r
1582 //\r
1583 // Protocol type. This will be copied into the media header without\r
1584 // doing byte swapping. Protocol type numbers can be obtained from\r
1585 // the Assigned Numbers RFC 1700.\r
1586 //\r
1587 PXE_UINT16 Protocol;\r
1588\r
1589 //\r
1590 // Length of the media header in bytes.\r
1591 //\r
1592 PXE_UINT16 MediaHeaderLen;\r
1593} PXE_CPB_FILL_HEADER;\r
1594\r
1595#define PXE_PROTOCOL_ETHERNET_IP 0x0800\r
1596#define PXE_PROTOCOL_ETHERNET_ARP 0x0806\r
1597#define MAX_XMIT_FRAGMENTS 16\r
1598\r
1599typedef struct s_pxe_cpb_fill_header_fragmented {\r
1600 //\r
1601 // Source and destination MAC addresses. These will be copied into\r
1602 // the media header without doing byte swapping.\r
1603 //\r
1604 PXE_MAC_ADDR SrcAddr;\r
1605 PXE_MAC_ADDR DestAddr;\r
1606\r
1607 //\r
1608 // Length of packet data in bytes (not including the media header).\r
1609 //\r
1610 PXE_UINT32 PacketLen;\r
1611\r
1612 //\r
1613 // Protocol type. This will be copied into the media header without\r
1614 // doing byte swapping. Protocol type numbers can be obtained from\r
1615 // the Assigned Numbers RFC 1700.\r
1616 //\r
1617 PXE_MEDIA_PROTOCOL Protocol;\r
1618\r
1619 //\r
1620 // Length of the media header in bytes.\r
1621 //\r
1622 PXE_UINT16 MediaHeaderLen;\r
1623\r
1624 //\r
1625 // Number of packet fragment descriptors.\r
1626 //\r
1627 PXE_UINT16 FragCnt;\r
1628\r
1629 //\r
1630 // Reserved, must be set to zero.\r
1631 //\r
1632 PXE_UINT16 reserved;\r
1633\r
1634 //\r
1635 // Array of packet fragment descriptors. The first byte of the media\r
1636 // header is the first byte of the first fragment.\r
1637 //\r
1638 struct {\r
1639 //\r
1640 // Address of this packet fragment.\r
1641 //\r
1642 PXE_UINT64 FragAddr;\r
1643\r
1644 //\r
1645 // Length of this packet fragment.\r
1646 //\r
1647 PXE_UINT32 FragLen;\r
1648\r
1649 //\r
1650 // Reserved, must be set to zero.\r
1651 //\r
1652 PXE_UINT32 reserved;\r
1653 } FragDesc[MAX_XMIT_FRAGMENTS];\r
1654}\r
1655PXE_CPB_FILL_HEADER_FRAGMENTED;\r
1656\r
1657typedef struct s_pxe_cpb_transmit {\r
1658 //\r
1659 // Address of first byte of frame buffer. This is also the first byte\r
1660 // of the media header.\r
1661 //\r
1662 PXE_UINT64 FrameAddr;\r
1663\r
1664 //\r
1665 // Length of the data portion of the frame buffer in bytes. Do not\r
1666 // include the length of the media header.\r
1667 //\r
1668 PXE_UINT32 DataLen;\r
1669\r
1670 //\r
1671 // Length of the media header in bytes.\r
1672 //\r
1673 PXE_UINT16 MediaheaderLen;\r
1674\r
1675 //\r
1676 // Reserved, must be zero.\r
1677 //\r
1678 PXE_UINT16 reserved;\r
1679} PXE_CPB_TRANSMIT;\r
1680\r
1681typedef struct s_pxe_cpb_transmit_fragments {\r
1682 //\r
1683 // Length of packet data in bytes (not including the media header).\r
1684 //\r
1685 PXE_UINT32 FrameLen;\r
1686\r
1687 //\r
1688 // Length of the media header in bytes.\r
1689 //\r
1690 PXE_UINT16 MediaheaderLen;\r
1691\r
1692 //\r
1693 // Number of packet fragment descriptors.\r
1694 //\r
1695 PXE_UINT16 FragCnt;\r
1696\r
1697 //\r
1698 // Array of frame fragment descriptors. The first byte of the first\r
1699 // fragment is also the first byte of the media header.\r
1700 //\r
1701 struct {\r
1702 //\r
1703 // Address of this frame fragment.\r
1704 //\r
1705 PXE_UINT64 FragAddr;\r
1706\r
1707 //\r
1708 // Length of this frame fragment.\r
1709 //\r
1710 PXE_UINT32 FragLen;\r
1711\r
1712 //\r
1713 // Reserved, must be set to zero.\r
1714 //\r
1715 PXE_UINT32 reserved;\r
1716 } FragDesc[MAX_XMIT_FRAGMENTS];\r
1717}\r
1718PXE_CPB_TRANSMIT_FRAGMENTS;\r
1719\r
1720typedef struct s_pxe_cpb_receive {\r
1721 //\r
1722 // Address of first byte of receive buffer. This is also the first byte\r
1723 // of the frame header.\r
1724 //\r
1725 PXE_UINT64 BufferAddr;\r
1726\r
1727 //\r
1728 // Length of receive buffer. This must be large enough to hold the\r
1729 // received frame (media header + data). If the length of smaller than\r
1730 // the received frame, data will be lost.\r
1731 //\r
1732 PXE_UINT32 BufferLen;\r
1733\r
1734 //\r
1735 // Reserved, must be set to zero.\r
1736 //\r
1737 PXE_UINT32 reserved;\r
1738} PXE_CPB_RECEIVE;\r
1739\r
1740typedef struct s_pxe_db_receive {\r
1741 //\r
1742 // Source and destination MAC addresses from media header.\r
1743 //\r
1744 PXE_MAC_ADDR SrcAddr;\r
1745 PXE_MAC_ADDR DestAddr;\r
1746\r
1747 //\r
1748 // Length of received frame. May be larger than receive buffer size.\r
1749 // The receive buffer will not be overwritten. This is how to tell\r
1750 // if data was lost because the receive buffer was too small.\r
1751 //\r
1752 PXE_UINT32 FrameLen;\r
1753\r
1754 //\r
1755 // Protocol type from media header.\r
1756 //\r
1757 PXE_MEDIA_PROTOCOL Protocol;\r
1758\r
1759 //\r
1760 // Length of media header in received frame.\r
1761 //\r
1762 PXE_UINT16 MediaHeaderLen;\r
1763\r
1764 //\r
1765 // Type of receive frame.\r
1766 //\r
1767 PXE_FRAME_TYPE Type;\r
1768\r
1769 //\r
1770 // Reserved, must be zero.\r
1771 //\r
1772 PXE_UINT8 reserved[7];\r
1773\r
1774} PXE_DB_RECEIVE;\r
1775\r
1776//\r
1777// Packet definitions\r
1778//\r
1779typedef struct {\r
1780 UINT8 BootpOpcode;\r
1781 UINT8 BootpHwType;\r
1782 UINT8 BootpHwAddrLen;\r
1783 UINT8 BootpGateHops;\r
1784 UINT32 BootpIdent;\r
1785 UINT16 BootpSeconds;\r
1786 UINT16 BootpFlags;\r
1787 UINT8 BootpCiAddr[4];\r
1788 UINT8 BootpYiAddr[4];\r
1789 UINT8 BootpSiAddr[4];\r
1790 UINT8 BootpGiAddr[4];\r
1791 UINT8 BootpHwAddr[16];\r
1792 UINT8 BootpSrvName[64];\r
1793 UINT8 BootpBootFile[128];\r
1794 UINT32 DhcpMagik;\r
1795 UINT8 DhcpOptions[56];\r
1796} EFI_PXE_BASE_CODE_DHCPV4_PACKET;\r
1797\r
1798typedef union {\r
1799 UINT8 Raw[1472];\r
1800 EFI_PXE_BASE_CODE_DHCPV4_PACKET Dhcpv4;\r
1801\r
1802 //\r
1803 // EFI_PXE_BASE_CODE_DHCPV6_PACKET Dhcpv6;\r
1804 //\r
1805} EFI_PXE_BASE_CODE_PACKET;\r
1806\r
1807\r
1808\r
1809#pragma pack()\r
1810\r
1811#endif\r