]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkModulePkg/Csm/BiosThunk/Snp16Dxe/PxeUndi.c
IntelFrameworkModulePkg Snp16Dxe: Remove redundant functions
[mirror_edk2.git] / IntelFrameworkModulePkg / Csm / BiosThunk / Snp16Dxe / PxeUndi.c
1 /** @file
2 Wrapper routines that use a PXE-enabled NIC option ROM to
3 supply internal routines for an EFI SNI (Simple Network
4 Interface) Protocol.
5
6 This file relies upon the existence of a PXE-compliant ROM
7 in memory, as defined by the Preboot Execution Environment
8 Specification (PXE), Version 2.1, located at
9
10 http://developer.intel.com/ial/wfm/wfmspecs.htm
11
12 Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.<BR>
13
14 This program and the accompanying materials
15 are licensed and made available under the terms and conditions
16 of the BSD License which accompanies this distribution. The
17 full text of the license may be found at
18 http://opensource.org/licenses/bsd-license.php
19
20 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
21 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
22
23 **/
24
25 #include "BiosSnp16.h"
26
27 /**
28 PXE
29 START UNDI
30 Op-Code: PXENV_START_UNDI (0000h)
31 Input: Far pointer to a PXENV_START_UNDI_T parameter structure that has been initialized by the caller.
32 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in
33 the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx
34 constants.
35 Description: This service is used to pass the BIOS parameter registers to the UNDI driver. The UNDI driver is
36 responsible for saving the information it needs to communicate with the hardware.
37 This service is also responsible for hooking the Int 1Ah service routine
38 Note: This API service must be called only once during UNDI Option ROM boot.
39 The UNDI driver is responsible for saving this information and using it every time
40 PXENV_UNDI_STARTUP is called.
41 Service cannot be used in protected mode.
42 typedef struct {
43 PXENV_STATUS Status;
44 UINT16 AX;
45 UINT16 BX;
46 UINT16 DX;
47 UINT16 DI;
48 UINT16 ES;
49 } PXENV_START_UNDI_T;
50 Set before calling API service
51 AX, BX, DX, DI, ES: BIOS initialization parameter registers. These
52 fields should contain the same information passed to the option ROM
53 initialization routine by the Host System BIOS. Information about the
54 contents of these registers can be found in the [PnP], [PCI] and
55 [BBS] specifications.
56 Returned from API service
57 Status: See the PXENV_STATUS_xxx constants.
58
59 @param SimpleNetworkDevice Device instance
60 @param PxeUndiTable Point to structure which hold parameter and return value
61 for option ROM call.
62
63 @return Return value of PXE option ROM far call.
64 **/
65 EFI_STATUS
66 PxeStartUndi (
67 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,
68 IN OUT PXENV_START_UNDI_T *PxeUndiTable
69 )
70 {
71 return MakePxeCall (
72 SimpleNetworkDevice,
73 PxeUndiTable,
74 sizeof (PXENV_START_UNDI_T),
75 PXENV_START_UNDI
76 );
77 }
78
79 /**
80 PXE
81 UNDI STARTUP
82 Op-Code: PXENV_UNDI_STARTUP (0001h)
83 Input: Far pointer to a PXENV_UNDI_STARTUP_T parameter structure that has been initialized by the
84 caller.
85 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in
86 the parameter structure must be set to one of the values represented by the
87 PXENV_STATUS_xxx constants.
88 Description: This API is responsible for initializing the contents of the UNDI code & data segment for proper
89 operation. Information from the !PXE structure and the first PXENV_START_UNDI API call is used
90 to complete this initialization. The rest of the UNDI APIs will not be available until this call has
91 been completed.
92 Note: PXENV_UNDI_STARTUP must not be called again without first calling
93 PXENV_UNDI_SHUTDOWN.
94 PXENV_UNDI_STARTUP and PXENV_UNDI_SHUTDOWN are no longer responsible for
95 chaining interrupt 1Ah. This must be done by the PXENV_START_UNDI and
96 PXENV_STOP_UNDI API calls.
97 This service cannot be used in protected mode.
98 typedef struct
99 {
100 PXENV_STATUS Status;
101 } PXENV_UNDI_STARTUP_T;
102 Set before calling API service
103 N/A
104 Returned from API service
105 Status: See the PXENV_STATUS_xxx constants.
106
107 @param SimpleNetworkDevice Device instance
108 @param PxeUndiTable Point to structure which hold parameter and return value
109 for option ROM call.
110
111 @return Return value of PXE option ROM far call.
112 **/
113 EFI_STATUS
114 PxeUndiStartup (
115 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,
116 IN OUT PXENV_UNDI_STARTUP_T *PxeUndiTable
117 )
118 {
119 return MakePxeCall (
120 SimpleNetworkDevice,
121 PxeUndiTable,
122 sizeof (PXENV_UNDI_STARTUP_T),
123 PXENV_UNDI_STARTUP
124 );
125 }
126
127 /**
128 PXE
129 UNDI CLEANUP
130 Op-Code: PXENV_UNDI_CLEANUP (0002h)
131 Input: Far pointer to a PXENV_UNDI_CLEANUP_T parameter structure.
132 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field
133 in the parameter structure must be set to one of the values represented by the
134 PXENV_STATUS_xxx constants.
135 Description: This call will prepare the network adapter driver to be unloaded from memory. This call must be
136 made just before unloading the Universal NIC Driver. The rest of the API will not be available
137 after this call executes.
138 This service cannot be used in protected mode.
139 typedef struct {
140 PXENX_STATUS Status;
141 } PXENV_UNDI_CLEANUP_T;
142 Set before calling API service
143 N/A
144 Returned from API service
145 Status: See the PXENV_STATUS_xxx constants.
146
147 @param SimpleNetworkDevice Device instance
148 @param PxeUndiTable Point to structure which hold parameter and return value
149 for option ROM call.
150
151 @return Return value of PXE option ROM far call.
152 **/
153 EFI_STATUS
154 PxeUndiCleanup (
155 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,
156 IN OUT PXENV_UNDI_CLEANUP_T *PxeUndiTable
157 )
158 {
159 return MakePxeCall (
160 SimpleNetworkDevice,
161 PxeUndiTable,
162 sizeof (PXENV_UNDI_CLEANUP_T),
163 PXENV_UNDI_CLEANUP
164 );
165 }
166
167 /**
168 PXE
169 UNDI INITIALIZE
170 Op-Code: PXENV_UNDI_INITIALIZE (0003h)
171 Input: Far pointer to a PXENV_UNDI_INITIALIZE_T parameter structure that has been initialized by the
172 caller.
173 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in
174 the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx
175 constants.
176 Description: This call resets the adapter and programs it with default parameters. The default parameters used
177 are those supplied to the most recent UNDI_STARTUP call. This routine does not enable the
178 receive and transmit units of the network adapter to readily receive or transmit packets. The
179 application must call PXENV_UNDI_OPEN to logically connect the network adapter to the network.
180 This call must be made by an application to establish an interface to the network adapter driver.
181 Note: When the PXE code makes this call to initialize the network adapter, it passes a NULL pointer for
182 the Protocol field in the parameter structure.
183 typedef struct {
184 PXENV_STATUS Status;
185 ADDR32 ProtocolIni;
186 UINT8 reserved[8];
187 } PXENV_UNDI_INITIALIZE_T;
188 Set before calling API service
189 ProtocolIni: Physical address of a memory copy of the driver
190 module from the protocol.ini file obtained from the protocol manager
191 driver (refer to the NDIS 2.0 specification). This parameter is
192 supported for the universal NDIS driver to pass the information
193 contained in the protocol.ini file to the NIC driver for any specific
194 configuration of the NIC. (Note that the module identification in the
195 protocol.ini file was done by NDIS.) This value can be NULL for any
196 other application interfacing to the universal NIC driver
197 Returned from API service
198 Status: See the PXENV_STATUS_xxx constants.
199
200 @param SimpleNetworkDevice Device instance
201 @param PxeUndiTable Point to structure which hold parameter and return value
202 for option ROM call.
203
204 @return Return value of PXE option ROM far call.
205 **/
206 EFI_STATUS
207 PxeUndiInitialize (
208 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,
209 IN OUT PXENV_UNDI_INITIALIZE_T *PxeUndiTable
210 )
211 {
212 return MakePxeCall (
213 SimpleNetworkDevice,
214 PxeUndiTable,
215 sizeof (PXENV_UNDI_INITIALIZE_T),
216 PXENV_UNDI_INITIALIZE
217 );
218 }
219
220 /**
221 Wrapper routine for reset adapter.
222
223 PXE
224 UNDI RESET ADAPTER
225 Op-Code: PXENV_UNDI_RESET_ADAPTER (0004h)
226 Input: Far pointer to a PXENV_UNDI_RESET_ADAPTER_t parameter structure that has been initialized
227 by the caller.
228 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in
229 the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx
230 constants.
231 Description: This call resets and reinitializes the network adapter with the same set of parameters supplied to
232 Initialize Routine. Unlike Initialize, this call opens the adapter that is, it connects logically to the
233 network. This routine cannot be used to replace Initialize or Shutdown calls.
234 typedef struct {
235 PXENV_STATUS Status;
236 PXENV_UNDI_MCAST_ADDRESS_t R_Mcast_Buf;
237 } PXENV_UNDI_RESET_T;
238
239 #define MAXNUM_MCADDR 8
240
241 typedef struct {
242 UINT16 MCastAddrCount;
243 MAC_ADDR McastAddr[MAXNUM_MCADDR];
244 } PXENV_UNDI_MCAST_ADDRESS_t;
245
246 Set before calling API service
247 R_Mcast_Buf: This is a structure of MCastAddrCount and
248 McastAddr.
249 MCastAddrCount: Number of multicast MAC addresses in the
250 buffer.
251 McastAddr: List of up to MAXNUM_MCADDR multicast MAC
252 addresses.
253 Returned from API service
254 Status: See the PXENV_STATUS_xxx constants.
255
256 @param SimpleNetworkDevice Device instance.
257 @param PxeUndiTable Point to structure which hold parameter and return value
258 for option ROM call.
259 @param RxFilter Filter setting mask value for PXE recive .
260
261 @return Return value of PXE option ROM far call.
262 **/
263 EFI_STATUS
264 PxeUndiResetNic (
265 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,
266 IN OUT PXENV_UNDI_RESET_T *PxeUndiTable,
267 IN UINT16 RxFilter
268 )
269 {
270 PXENV_UNDI_OPEN_T Open;
271 PXENV_UNDI_CLOSE_T Close;
272 UINTN Status;
273
274 Status = MakePxeCall (
275 SimpleNetworkDevice,
276 PxeUndiTable,
277 sizeof (PXENV_UNDI_RESET_T),
278 PXENV_UNDI_RESET_NIC
279 );
280 if (!EFI_ERROR(Status)) {
281 return Status;
282 }
283
284 Close.Status = PXENV_STATUS_SUCCESS;
285
286 Status = MakePxeCall (
287 SimpleNetworkDevice,
288 &Close,
289 sizeof (Close),
290 PXENV_UNDI_CLOSE
291 );
292 if (EFI_ERROR(Status)) {
293 return EFI_DEVICE_ERROR;
294 }
295
296 Status = MakePxeCall (
297 SimpleNetworkDevice,
298 PxeUndiTable,
299 sizeof (PXENV_UNDI_RESET_T),
300 PXENV_UNDI_RESET_NIC
301 );
302 if (EFI_ERROR(Status)) {
303 return EFI_DEVICE_ERROR;
304 }
305
306 Open.Status = PXENV_STATUS_SUCCESS;
307 Open.OpenFlag = 0;
308 Open.PktFilter = RxFilter;
309 CopyMem (
310 &Open.McastBuffer,
311 &PxeUndiTable->R_Mcast_Buf,
312 sizeof (PXENV_UNDI_MCAST_ADDR_T)
313 );
314
315
316 Status = MakePxeCall (
317 SimpleNetworkDevice,
318 &Open,
319 sizeof (Open),
320 PXENV_UNDI_OPEN
321 );
322 if (EFI_ERROR(Status)) {
323 return EFI_DEVICE_ERROR;
324 }
325
326 return EFI_SUCCESS;
327 }
328
329 /**
330 PXE
331 UNDI SHUTDOWN
332 Op-Code: PXENV_UNDI_SHUTDOWN (0005h)
333 Input: Far pointer to a PXENV_UNDI_SHUTDOWN_T parameter.
334 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in
335 the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx
336 constants.
337 Description: This call resets the network adapter and leaves it in a safe state for another driver to program it.
338 Note: The contents of the PXENV_UNDI_STARTUP parameter structure need to be saved by the
339 Universal NIC Driver in case PXENV_UNDI_INITIALIZE is called again.
340 typedef struct
341 {
342 PXENV_STATUS Status;
343 } PXENV_UNDI_SHUTDOWN_T;
344 Set before calling API service
345 N/A
346 Returned from API service
347 Status: See the PXENV_STATUS_xxx constants.
348
349 @param SimpleNetworkDevice Device instance
350 @param PxeUndiTable Point to structure which hold parameter and return value
351 for option ROM call.
352
353 @return Return value of PXE option ROM far call.
354 **/
355 EFI_STATUS
356 PxeUndiShutdown (
357 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,
358 IN OUT PXENV_UNDI_SHUTDOWN_T *PxeUndiTable
359 )
360 {
361 return MakePxeCall (
362 SimpleNetworkDevice,
363 PxeUndiTable,
364 sizeof (PXENV_UNDI_SHUTDOWN_T),
365 PXENV_UNDI_SHUTDOWN
366 );
367 }
368
369 /**
370 PXE
371 UNDI OPEN
372 Op-Code: PXENV_UNDI_OPEN (0006h)
373 Input: Far pointer to a PXENV_UNDI_OPEN_T parameter structure that has been initialized by the caller.
374 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in
375 the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx
376 constants.
377 Description: This call activates the adapter network connection and sets the adapter ready to accept packets
378 for transmit and receive.
379 typedef struct {
380 PXENV_STATUS Status;
381 UINT16 OpenFlag;
382 UINT16 PktFilter;
383 #define FLTR_DIRECTED 0x0001
384 #define FLTR_BRDCST 0x0002
385 #define FLTR_PRMSCS 0x0004
386 #define FLTR_SRC_RTG 0x0008
387 PXENV_UNDI_MCAST_ADDRESS_t R_Mcast_Buf;
388 } PXENV_UNDI_OPEN_T;
389 Set before calling API service
390 OpenFlag: This is an adapter specific input parameter. This is
391 supported for the universal NDIS 2.0 driver to pass in the open flags
392 provided by the protocol driver. (See the NDIS 2.0 specification.)
393 This can be zero.
394 PktFilter: Filter for receiving packets. This can be one, or more, of
395 the FLTR_xxx constants. Multiple values are arithmetically or-ed
396 together.
397 directed packets are packets that may come to your MAC address
398 or the multicast MAC address.
399 R_Mcast_Buf: See definition in UNDI RESET ADAPTER (0004h).
400 Returned from API service
401 Status: See the PXENV_STATUS_xxx constants.
402
403 @param SimpleNetworkDevice Device instance
404 @param PxeUndiTable Point to structure which hold parameter and return value
405 for option ROM call.
406
407 @return Return value of PXE option ROM far call.
408 **/
409 EFI_STATUS
410 PxeUndiOpen (
411 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,
412 IN OUT PXENV_UNDI_OPEN_T *PxeUndiTable
413 )
414 {
415 return MakePxeCall (
416 SimpleNetworkDevice,
417 PxeUndiTable,
418 sizeof (PXENV_UNDI_OPEN_T),
419 PXENV_UNDI_OPEN
420 );
421 }
422
423 /**
424 PXE
425 UNDI CLOSE
426 Op-Code: PXENV_UNDI_CLOSE (0007h)
427 Input: Far pointer to a PXENV_UNDI_CLOSE_T parameter.
428 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in
429 the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx
430 constants.
431 Description: This call disconnects the network adapter from the network. Packets cannot be transmitted or
432 received until the network adapter is open again.
433 typedef struct {
434 PXENV_STATUS Status;
435 } PXENV_UNDI_CLOSE_T;
436 Set before calling API service
437 N/A
438 Returned from API service
439 Status: See the PXENV_STATUS_xxx constants.
440
441 @param SimpleNetworkDevice Device instance
442 @param PxeUndiTable Point to structure which hold parameter and return value
443 for option ROM call.
444
445 @return Return value of PXE option ROM far call.
446 **/
447 EFI_STATUS
448 PxeUndiClose (
449 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,
450 IN OUT PXENV_UNDI_CLOSE_T *PxeUndiTable
451 )
452 {
453 return MakePxeCall (
454 SimpleNetworkDevice,
455 PxeUndiTable,
456 sizeof (PXENV_UNDI_CLOSE_T),
457 PXENV_UNDI_CLOSE
458 );
459 }
460
461 /**
462 PXE
463 UNDI TRANSMIT PACKET
464 Op-Code: PXENV_UNDI_TRANSMIT (0008h)
465 Input: Far pointer to a PXENV_UNDI_TRANSMIT_T parameter structure that
466 has been initialized by the caller.
467 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX.
468 The status code must be set to one of the values represented by the
469 PXENV_STATUS_xxx constants.
470 Description: This call transmits a buffer to the network. The media header
471 for the packet can be filled by the calling protocol, but it might not be.
472 The network adapter driver will fill it if required by the values in the
473 parameter block. The packet is buffered for transmission provided there is
474 an available buffer, and the function returns PXENV_EXIT_SUCCESS. If no
475 buffer is available the function returns PXENV_EXIT_FAILURE with a status
476 code of PXE_UNDI_STATUS__OUT OF_RESOURCE. The number of buffers is
477 implementation-dependent. An interrupt is generated on completion of the
478 transmission of one or more packets. A call to PXENV_UNDI_TRANSMIT is
479 permitted in the context of a transmit complete interrupt.
480
481 typedef struct {
482 PXENV_STATUS Status;
483 UINT8 Protocol;
484 #define P_UNKNOWN 0
485 #define P_IP 1
486 #define P_ARP 2
487 #define P_RARP 3
488 UINT8 XmitFlag;
489 #define XMT_DESTADDR 0x0000
490 #define XMT_BROADCAST 0x0001
491 SEGOFF16 DestAddr;
492 SEGOFF16 TBD;
493 UINT32 Reserved[2];
494 } t_PXENV_UNDI_TRANSMIT;
495
496 #define MAX_DATA_BLKS 8
497
498 typedef struct {
499 UINT16 ImmedLength;
500 SEGOFF16 Xmit;
501 UINT16 DataBlkCount;
502 struct DataBlk {
503 UINT8 TDPtrType;
504 UINT8 TDRsvdByte;
505 UINT16 TDDataLen;
506 SEGOFF16 TDDataPtr;
507 } DataBlock[MAX_DATA_BLKS];
508 } PXENV_UNDI_TBD_T
509
510 Set before calling API service
511 Protocol: This is the protocol of the upper layer that is calling UNDI
512 TRANSMIT call. If the upper layer has filled the media header, this
513 field must be P_UNKNOWN.
514 XmitFlag: If this flag is XMT_DESTADDR, the NIC driver expects a
515 pointer to the destination media address in the field DestAddr. If
516 XMT_BROADCAST, the NIC driver fills the broadcast address for the
517 destination.
518 TBD: Segment:Offset address of the transmit buffer descriptor.
519 ImmedLength: Length of the immediate transmit buffer: Xmit.
520 Xmit: Segment:Offset of the immediate transmit buffer.
521 DataBlkCount: Number of blocks in this transmit buffer.
522 TDPtrType:
523 0 => 32-bit physical address in TDDataPtr (not supported in this
524 version of PXE)
525 1 => segment:offset in TDDataPtr which can be a real mode or 16-bit
526 protected mode pointer
527 TDRsvdByte: Reserved must be zero.
528 TDDatalen: Data block length in bytes.
529 TDDataPtr: Segment:Offset of the transmit block.
530 DataBlock: Array of transmit data blocks.
531 Returned from API service
532 Status: See the PXENV_STATUS_xxx constants
533
534 @param SimpleNetworkDevice Device instance
535 @param PxeUndiTable Point to structure which hold parameter and return value
536 for option ROM call.
537
538 @return Return value of PXE option ROM far call.
539 **/
540 EFI_STATUS
541 PxeUndiTransmit (
542 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,
543 IN OUT PXENV_UNDI_TRANSMIT_T *PxeUndiTable
544 )
545 {
546 EFI_STATUS Status;
547
548 Status = MakePxeCall (
549 SimpleNetworkDevice,
550 PxeUndiTable,
551 sizeof (PXENV_UNDI_TRANSMIT_T),
552 PXENV_UNDI_TRANSMIT
553 );
554 if (Status == EFI_SUCCESS) {
555 return EFI_SUCCESS;
556 }
557
558 switch (PxeUndiTable->Status) {
559 case PXENV_STATUS_OUT_OF_RESOURCES:
560 return EFI_NOT_READY;
561
562 default:
563 return EFI_DEVICE_ERROR;
564 }
565 }
566
567
568
569 /**
570 PXE
571 UNDI SET STATION ADDRESS
572 Op-Code: PXENV_UNDI_SET_STATION_ADDRESS (000Ah)
573 Input: Far pointer to a PXENV_UNDI_SET_STATION_ADDRESS_t parameter structure that has been
574 initialized by the caller.
575 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in
576 the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx
577 constants.
578 Description: This call sets the MAC address to be the input value and is called before opening the network
579 adapter. Later, the open call uses this variable as a temporary MAC address to program the
580 adapter individual address registers.
581 typedef struct {
582 PXENV_STATUS Status;
583 MAC_ADDR StationAddress;
584 } PXENV_UNDI_SET_STATION_ADDR_T;
585 Set before calling API service
586 StationAddress: Temporary MAC address to be used for
587 transmit and receive.
588 Returned from API service
589 Status: See the PXENV_STATUS_xxx constants.
590
591 @param SimpleNetworkDevice Device instance
592 @param PxeUndiTable Point to structure which hold parameter and return value
593 for option ROM call.
594
595 @return Return value of PXE option ROM far call.
596 **/
597 EFI_STATUS
598 PxeUndiSetStationAddr (
599 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,
600 IN OUT PXENV_UNDI_SET_STATION_ADDR_T *PxeUndiTable
601 )
602 {
603 return MakePxeCall (
604 SimpleNetworkDevice,
605 PxeUndiTable,
606 sizeof (PXENV_UNDI_SET_STATION_ADDR_T),
607 PXENV_UNDI_SET_STATION_ADDR
608 );
609 }
610
611 /**
612 PXE
613 UNDI SET PACKET FILTER
614 Op-Code: PXENV_UNDI_SET_PACKET_FILTER (000Bh)
615 Input: Far pointer to a PXENV_UNDI_SET_PACKET_FILTER_T parameter structure that has been
616 initialized by the caller.
617 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in
618 the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx
619 constants.
620 Description: This call resets the adapter's receive unit to accept a new filter, different from the one provided with
621 the open call.
622 typedef struct {
623 PXENV_STATUS Status;
624 UINT8 filter;
625 } PXENV_UNDI_SET_PACKET_FILTER_T;
626 Set before calling API service
627 Filter: See the receive filter values in the UNDI OPEN
628 (0006h) API description.
629 Returned from API service
630 Status: See the PXENV_STATUS_xxx constants.
631
632 @param SimpleNetworkDevice Device instance
633 @param PxeUndiTable Point to structure which hold parameter and return value
634 for option ROM call.
635
636 @return Return value of PXE option ROM far call.
637 **/
638
639 /**
640 PXE
641 UNDI GET INFORMATION
642 Op-Code: PXENV_UNDI_GET_INFORMATION (000Ch)
643 Input: Far pointer to a PXENV_UNDI_GET_INFORMATION_T parameter structure that has been
644 initialized by the caller.
645 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in
646 the parameter structure must be set to one of the values represented by the
647 PXENV_STATUS_xxx constants.
648 Description: This call copies the network adapter variables, including the MAC address, into the input buffer.
649 Note: The PermNodeAddress field must be valid after PXENV_START_UNDI and
650 PXENV_UNDI_STARTUP have been issued. All other fields must be valid after
651 PXENV_START_UNDI, PXENV_UNDI_STARTUP and PXENV_UNDI_INITIALIZE have been
652 called.
653 typedef struct {
654 PXENV_STATUS Status;
655 UINT16 BaseIo;
656 UINT16 IntNumber;
657 UINT16 MaxTranUnit;
658 UINT16 HwType;
659 #define ETHER_TYPE 1
660 #define EXP_ETHER_TYPE 2
661 #define IEEE_TYPE 6
662 #define ARCNET_TYPE 7
663 UINT16 HwAddrLen;
664 MAC_ADDR CurrentNodeAddress;
665 MAC_ADDR PermNodeAddress;
666 SEGSEL ROMAddress;
667 UINT16 RxBufCt;
668 UINT16 TxBufCt;
669 } PXENV_UNDI_GET_INFORMATION_T;
670 Set before calling API service
671 N/A
672 Returned from API service
673 Status: See the PXENV_STATUS_xxx constants.
674 BaseIO: Adapter base I/O address.
675 IntNumber: Adapter IRQ number.
676 MaxTranUnit: Adapter maximum transmit unit.
677 HWType: Type of protocol at the hardware level.
678 HWAddrLen: Length of the hardware address.
679 CurrentNodeAddress: Current hardware address.
680 PermNodeAddress: Permanent hardware address.
681 ROMAddress: Real mode ROM segment address.
682 RxBufCnt: Receive queue length.
683 TxBufCnt: Transmit queue length.
684
685 @param SimpleNetworkDevice Device instance
686 @param PxeUndiTable Point to structure which hold parameter and return value
687 for option ROM call.
688
689 @return Return value of PXE option ROM far call.
690 **/
691 EFI_STATUS
692 PxeUndiGetInformation (
693 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,
694 IN OUT PXENV_UNDI_GET_INFORMATION_T *PxeUndiTable
695 )
696 {
697 return MakePxeCall (
698 SimpleNetworkDevice,
699 PxeUndiTable,
700 sizeof (PXENV_UNDI_GET_INFORMATION_T),
701 PXENV_UNDI_GET_INFORMATION
702 );
703 }
704
705 /**
706 PXE
707 UNDI GET STATISTICS
708 Op-Code: PXENV_UNDI_GET_STATISTICS (000Dh)
709 Input: Far pointer to a PXENV_UNDI_GET_STATISTICS_T parameter structure that has been initialized
710 by the caller.
711 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in
712 the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx
713 constants.
714 Description: This call reads statistical information from the network adapter, and returns.
715 typedef struct {
716 PXENV_STATUS Status;
717 UINT32 XmtGoodFrames;
718 UINT32 RcvGoodFrames;
719 UINT32 RcvCRCErrors;
720 UINT32 RcvResourceErrors;
721 } PXENV_UNDI_GET_STATISTICS_T;
722 Set before calling API service
723 N/A
724 Returned from API service
725 Status: See the PXENV_STATUS_xxx constants.
726 XmtGoodFrames: Number of successful transmissions.
727 RcvGoodFrames: Number of good frames received.
728 RcvCRCErrors: Number of frames received with CRC
729 error.
730 RcvResourceErrors: Number of frames discarded
731 because receive queue was full.
732
733 @param SimpleNetworkDevice Device instance
734 @param PxeUndiTable Point to structure which hold parameter and return value
735 for option ROM call.
736
737 @return Return value of PXE option ROM far call.
738 **/
739 EFI_STATUS
740 PxeUndiGetStatistics (
741 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,
742 IN OUT PXENV_UNDI_GET_STATISTICS_T *PxeUndiTable
743 )
744 {
745 return MakePxeCall (
746 SimpleNetworkDevice,
747 PxeUndiTable,
748 sizeof (PXENV_UNDI_GET_STATISTICS_T),
749 PXENV_UNDI_GET_STATISTICS
750 );
751 }
752
753 /**
754 PXE
755 UNDI CLEAR STATISTICS
756 Op-Code: PXENV_UNDI_CLEAR_STATISTICS (000Eh)
757 Input: Far pointer to a PXENV_UNDI_CLEAR_STATISTICS_T parameter.
758 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in
759 the parameter structure must be set to one of the values represented by the
760 PXENV_STATUS_xxx constants.
761 Description: This call clears the statistical information from the network adapter.
762 typedef struct {
763 PXENV_STATUS Status;
764 } PXENV_UNDI_CLEAR_STATISTICS_T;
765 Set before calling API service
766 N/A
767 Returned from API service
768 Status: See the PXENV_STATUS_xxx constants.
769
770 @param SimpleNetworkDevice Device instance
771 @param PxeUndiTable Point to structure which hold parameter and return value
772 for option ROM call.
773
774 @return Return value of PXE option ROM far call.
775 **/
776 EFI_STATUS
777 PxeUndiClearStatistics (
778 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,
779 IN OUT PXENV_UNDI_CLEAR_STATISTICS_T *PxeUndiTable
780 )
781 {
782 return MakePxeCall (
783 SimpleNetworkDevice,
784 PxeUndiTable,
785 sizeof (PXENV_UNDI_CLEAR_STATISTICS_T),
786 PXENV_UNDI_CLEAR_STATISTICS
787 );
788 }
789
790 /**
791 PXE
792 UNDI INITIATE DIAGS
793 Op-Code: PXENV_UNDI_INITIATE_DIAGS (000Fh)
794 Input: Far pointer to a PXENV_UNDI_INITIATE_DIAGS_T parameter.
795 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in
796 the parameter structure must be set to one of the values represented by the
797 PXENV_STATUS_xxx constants.
798 Description: This call can be used to initiate the run-time diagnostics. It causes the network adapter to run
799 hardware diagnostics and to update its status information.
800 typedef struct {
801 PXENV_STATUS Status;
802 } PXENV_UNDI_INITIATE_DIAGS_T;
803 Set before calling API service
804 N/A
805 Returned from API service
806 Status: See the PXENV_STATUS_xxx constants.
807
808 @param SimpleNetworkDevice Device instance
809 @param PxeUndiTable Point to structure which hold parameter and return value
810 for option ROM call.
811
812 @return Return value of PXE option ROM far call.
813 **/
814
815 /**
816 PXE
817 UNDI FORCE INTERRUPT
818 Op-Code: PXENV_UNDI_FORCE_INTERRUPT (0010h)
819 Input: Far pointer to a PXENV_UNDI_FORCE_INTERRUPT_T parameter structure that has been
820 initialized by the caller.
821 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in
822 the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx
823 constants.
824 Description: This call forces the network adapter to generate an interrupt. When a receive interrupt occurs, the
825 network adapter driver usually queues the packet and calls the application's callback receive
826 routine with a pointer to the packet received. Then, the callback routine either can copy the packet
827 to its buffer or can decide to delay the copy to a later time. If the packet is not immediately copied,
828 the network adapter driver does not remove it from the input queue. When the application wants to
829 copy the packet, it can call the PXENV_UNDI_FORCE_INTERRUPT routine to simulate the receive
830 interrupt.
831 typedef struct {
832 PXENV_STATUS Status;
833 } PXENV_UNDI_FORCE_INTERRUPT_T;
834 Set before calling API service
835 N/A
836 Returned from API service
837 Status: See the PXENV_STATUS_xxx constants.
838
839 @param SimpleNetworkDevice Device instance
840 @param PxeUndiTable Point to structure which hold parameter and return value
841 for option ROM call.
842
843 @return Return value of PXE option ROM far call.
844 **/
845
846 /**
847 PXE
848 UNDI GET MULTICAST ADDRESS
849 Op-Code: PXENV_UNDI_GET_MCAST_ADDRESS (0011h)
850 Input: Far pointer to a PXENV_GET_MCAST_ADDRESS_t parameter structure that has been initialized
851 by the caller.
852 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in
853 the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx
854 constants.
855 Description: This call converts the given IP multicast address to a hardware multicast address.
856 typedef struct {
857 PXENV_STATUS Status;
858 IP4 InetAddr;
859 MAC_ADDR MediaAddr;
860 } PXENV_UNDI_GET_MCAST_ADDR_T;
861 Set before calling API service
862 InetAddr: IP multicast address.
863 Returned from API service
864 Status: See the PXENV_STATUS_xxx constants.
865 MediaAddr: MAC multicast address.
866
867 @param SimpleNetworkDevice Device instance
868 @param PxeUndiTable Point to structure which hold parameter and return value
869 for option ROM call.
870
871 @return Return value of PXE option ROM far call.
872 **/
873 EFI_STATUS
874 PxeUndiGetMcastAddr (
875 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,
876 IN OUT PXENV_UNDI_GET_MCAST_ADDR_T *PxeUndiTable
877 )
878 {
879 return MakePxeCall (
880 SimpleNetworkDevice,
881 PxeUndiTable,
882 sizeof (PXENV_UNDI_GET_MCAST_ADDR_T),
883 PXENV_UNDI_GET_MCAST_ADDR
884 );
885 }
886
887 /**
888 PXE
889 UNDI GET NIC TYPE
890 Op-Code: PXENV_UNDI_GET_NIC_TYPE (0012h)
891 Input: Far pointer to a PXENV_UNDI_GET_NIC_TYPE parameter structure that has been initialized by
892 the caller.
893 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in
894 the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx
895 constants. If the PXENV_EXIT_SUCCESS is returned the parameter structure must contain the
896 NIC information.
897 Description: This call, if successful, provides the NIC-specific information necessary to identify the network
898 adapter that is used to boot the system.
899 Note: The application first gets the DHCPDISCOVER packet using GET_CACHED_INFO and checks if
900 the UNDI is supported before making this call. If the UNDI is not supported, the NIC-specific
901 information can be obtained from the DHCPDISCOVER packet itself.
902 PXENV_START_UNDI, PXENV_UNDI_STARTUP and PXENV_UNDI_INITIALIZE must be called
903 before the information provided is valid.
904 typedef {
905 PXENV_STATUS Status;
906 UINT8 NicType;
907 #define PCI_NIC 2
908 #define PnP_NIC 3
909 #define CardBus_NIC 4
910 Union {
911 Struct {
912 UINT16 Vendor_ID;
913 UINT16 Dev_ID;
914 UINT8 Base_Class;
915 UINT8 Sub_Class;
916 UINT8 Prog_Intf;
917 UINT8 Rev;
918 UINT16 BusDevFunc;
919 UINT16 SubVendor_ID;
920 UINT16 SubDevice_ID;
921 } pci, cardbus;
922 struct {
923 UINT32 EISA_Dev_ID;
924 UINT8 Base_Class;
925 UINT8 Sub_Class;
926 UINT8 Prog_Intf;
927 UINT16 CardSelNum;
928 } pnp;
929 } info;
930 } PXENV_UNDI_GET_NIC_TYPE_T;
931 Set before calling API service
932 N/A
933 Returned from API service
934 Status: See the PXENV_STATUS_xxx constants.
935 NICType: Type of NIC information stored in the parameter
936 structure.
937 Info: Information about the fields in this union can be found
938 in the [PnP] and [PCI] specifications
939
940 @param SimpleNetworkDevice Device instance
941 @param PxeUndiTable Point to structure which hold parameter and return value
942 for option ROM call.
943
944 @return Return value of PXE option ROM far call.
945 **/
946 EFI_STATUS
947 PxeUndiGetNicType (
948 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,
949 IN OUT PXENV_UNDI_GET_NIC_TYPE_T *PxeUndiTable
950 )
951 {
952 return MakePxeCall (
953 SimpleNetworkDevice,
954 PxeUndiTable,
955 sizeof (PXENV_UNDI_GET_NIC_TYPE_T),
956 PXENV_UNDI_GET_NIC_TYPE
957 );
958 }
959
960 /**
961 PXE
962 UNDI GET IFACE INFO
963 Op-Code: PXENV_UNDI_GET_IFACE_INFO (0013h)
964 Input: Far pointer to a PXENV_UNDI_GET_IFACE_INFO_t parameter structure that has been initialized
965 by the caller.
966 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in
967 the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx
968 constants. If the PXENV_EXIT_SUCCESS is returned, the parameter structure must contain the
969 interface specific information.
970 Description: This call, if successful, provides the network interface specific information such as the interface
971 type at the link layer (Ethernet, Tokenring) and the link speed. This information can be used in the
972 universal drivers such as NDIS or Miniport to communicate to the upper protocol modules.
973 Note: UNDI follows the NDIS2 specification in giving this information. It is the responsibility of the
974 universal driver to translate/convert this information into a format that is required in its specification
975 or to suit the expectation of the upper level protocol modules.
976 PXENV_START_UNDI, PXENV_UNDI_STARTUP and PXENV_UNDI_INITIALIZE must be called
977 before the information provided is valid.
978 typedef struct {
979 PXENV_STATUS Status
980 UINT8 IfaceType[16];
981 UINT32 LinkSpeed;
982 UINT32 ServiceFlags;
983 UINT32 Reserved[4];
984 } PXENV_UNDI_GET_NDIS_INFO_T;
985 Set before calling API service
986 N/A
987 Returned from API service
988 Status: See the PXENV_STATUS_xxx constants.
989 IfaceType: Name of MAC type in ASCIIZ format. This is
990 used by the universal NDIS driver to specify its driver type
991 to the protocol driver.
992 LinkSpeed: Defined in the NDIS 2.0 specification.
993 ServiceFlags: Defined in the NDIS 2.0 specification.
994 Reserved: Must be zero.
995
996 @param SimpleNetworkDevice Device instance
997 @param PxeUndiTable Point to structure which hold parameter and return value
998 for option ROM call.
999
1000 @return Return value of PXE option ROM far call.
1001 **/
1002 EFI_STATUS
1003 PxeUndiGetNdisInfo (
1004 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,
1005 IN OUT PXENV_UNDI_GET_NDIS_INFO_T *PxeUndiTable
1006 )
1007 {
1008 return MakePxeCall (
1009 SimpleNetworkDevice,
1010 PxeUndiTable,
1011 sizeof (PXENV_UNDI_GET_NDIS_INFO_T),
1012 PXENV_UNDI_GET_NDIS_INFO
1013 );
1014 }
1015
1016 /**
1017 PXE
1018 UNDI ISR
1019 Op-Code: PXENV_UNDI_ISR (0014h)
1020 Input: Far pointer to a PXENV_UNDI_ISR_T parameter structure that has been initialized by the caller.
1021 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in
1022 the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx
1023 constants.
1024 Description: This API function will be called at different levels of processing the interrupt. The FuncFlag field in
1025 the parameter block indicates the operation to be performed for the call. This field is filled with the
1026 status of that operation on return.
1027 Note: Interrupt Service Routine Operation:
1028 In this design the UNDI does not hook the interrupt for the Network Interface. Instead, the
1029 application or the protocol driver hooks the interrupt and calls UNDI with the PXENV_UNDI_ISR
1030 API call for interrupt verification (PXENV_UNDI_ISR_IN_START) and processing
1031 (PXENV_UNDI_ISR_IN_PROCESS and PXENV_UNDI_ISR_GET_NEXT).
1032 When the Network Interface HW generates an interrupt the protocol driver interrupt service
1033 routine (ISR) gets control and takes care of the interrupt processing at the PIC level. The ISR then
1034 calls the UNDI using the PXENV_UNDI_ISR API with the value PXENV_UNDI_ISR_IN_START for
1035 the FuncFlag parameter. At this time UNDI must disable the interrupts at the Network Interface
1036 level and read any status values required to further process the interrupt. UNDI must return as
1037 quickly as possible with one of the two values, PXENV_UNDI_ISR_OUT_OURS or
1038 PXENV_UNDI_ISR_OUT_NOT_OURS, for the parameter FuncFlag depending on whether the
1039 interrupt was generated by this particular Network Interface or not.
1040 If the value returned in FuncFlag is PXENV_UNDI_ISR_OUT_NOT_OURS, then the interrupt was
1041 not generated by our NIC, and interrupt processing is complete.
1042 If the value returned in FuncFlag is PXENV_UNDI_ISR_OUT_OURS, the protocol driver must start
1043 a handler thread and send an end-of-interrupt (EOI) command to the PIC. Interrupt processing is
1044 now complete.
1045 The protocol driver strategy routine will call UNDI using this same API with FuncFlag equal to
1046 PXENV_UNDI_ISR_IN_PROCESS. At this time UNDI must find the cause of this interrupt and
1047 return the status in the FuncFlag. It first checks if there is a frame received and if so it returns the
1048 first buffer pointer of that frame in the parameter block.
1049 The protocol driver calls UNDI repeatedly with the FuncFlag equal to
1050 PXENV_UNDI_ISR_IN_GET_NEXT to get all the buffers in a frame and also all the received
1051 frames in the queue. On this call, UNDI must remember the previous buffer given to the protoco,l
1052 remove it from the receive queue and recycle it. In case of a multi-buffered frame, if the previous
1053 buffer is not the last buffer in the frame it must return the next buffer in the frame in the parameter
1054 block. Otherwise it must return the first buffer in the next frame.
1055 If there is no received frame pending to be processed, UNDI processes the transmit completes and
1056 if there is no other interrupt status to be processed, UNDI re-enables the interrupt at the
1057 NETWORK INTERFACE level and returns PXENV_UNDI_ISR_OUT_DONE in the FuncFlag.
1058 IMPORTANT: It is possible for the protocol driver to be interrupted again while in the
1059 strategy routine when the UNDI re-enables interrupts.
1060
1061 @param SimpleNetworkDevice Device instance
1062 @param PxeUndiTable Point to structure which hold parameter and return value
1063 for option ROM call.
1064
1065 @return Return value of PXE option ROM far call.
1066 **/
1067 EFI_STATUS
1068 PxeUndiIsr (
1069 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,
1070 IN OUT PXENV_UNDI_ISR_T *PxeUndiTable
1071 )
1072 {
1073 return MakePxeCall (
1074 SimpleNetworkDevice,
1075 PxeUndiTable,
1076 sizeof (PXENV_UNDI_ISR_T),
1077 PXENV_UNDI_ISR
1078 );
1079 }
1080
1081 /**
1082 PXE
1083 STOP UNDI
1084 Op-Code: PXENV_STOP_UNDI (0015h)
1085 Input: Far pointer to a PXENV_STOP_UNDI_T parameter structure that has been initialized by the caller.
1086 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in
1087 the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx
1088 constants.
1089 Description: This routine is responsible for unhooking the Int 1Ah service routine.
1090 Note: This API service must be called only once at the end of UNDI Option ROM boot. One of the valid
1091 status codes is PXENV_STATUS_KEEP. If this status is returned, UNDI must not be removed from
1092 base memory. Also, UNDI must not be removed from base memory if BC is not removed from base
1093 memory.
1094 Service cannot be used in protected mode.
1095 typedef struct {
1096 PXENV_STATUS Status;
1097 } PXENV_STOP_UNDI_T;
1098 Set before calling API service
1099 N/A
1100 Returned from API service
1101 Status: See the PXENV_STATUS_xxx constants.
1102
1103 @param SimpleNetworkDevice Device instance
1104 @param PxeUndiTable Point to structure which hold parameter and return value
1105 for option ROM call.
1106
1107 @return Return value of PXE option ROM far call.
1108 **/
1109 EFI_STATUS
1110 PxeUndiStop (
1111 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,
1112 IN OUT PXENV_STOP_UNDI_T *PxeUndiTable
1113 )
1114 {
1115 return MakePxeCall (
1116 SimpleNetworkDevice,
1117 PxeUndiTable,
1118 sizeof (PXENV_STOP_UNDI_T),
1119 PXENV_STOP_UNDI
1120 );
1121 }
1122
1123 /**
1124 PXE
1125 UNDI GET STATE
1126 Op-Code: PXENV_UNDI_GET_STATE (0015h)
1127 Input: Far pointer to a PXENV_UNDI_GET_STATE_T parameter.
1128 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in
1129 the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx
1130 constants. The UNDI_STATE field in the parameter structure must be set to one of the valid state
1131 constants
1132 Description: This call can be used to obtain state of the UNDI engine in order to avoid issuing adverse call
1133 sequences
1134 typedef struct {
1135 #define PXE_UNDI_GET_STATE_STARTED 1
1136 #define PXE_UNDI_GET_STATE_INITIALIZED 2
1137 #define PXE_UNDI_GET_STATE_OPENED 3
1138 PXENV_STATUS Status;
1139 UINT8 UNDIstate;
1140 } PXENV_UNDI_GET_STATE_T;
1141 Set before calling API service
1142 N/A
1143 Returned from API service
1144 Status: See the PXENV_STATUS_xxx constants.
1145 State: See definitions of the state constants.
1146 Note. UNDI implementation is responsible for maintaining
1147 internal state machine.
1148 UNDI ISR
1149 Op-Code: PXENV_UNDI_ISR (0014h)
1150 Input: Far pointer to a t_PXENV_UNDI_ISR parameter structure that has been initialized by the caller.
1151 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in
1152 the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx
1153 constants.
1154 Description: This API function will be called at different levels of processing the interrupt. The FuncFlag field in
1155 the parameter block indicates the operation to be performed for the call. This field is filled with the
1156 status of that operation on return.
1157
1158 @param SimpleNetworkDevice Device instance
1159 @param PxeUndiTable Point to structure which hold parameter and return value
1160 for option ROM call.
1161
1162 @return Return value of PXE option ROM far call.
1163 **/