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