]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkModulePkg/Csm/BiosThunk/Snp16Dxe/BiosSnp16.h
FmpDevicePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / IntelFrameworkModulePkg / Csm / BiosThunk / Snp16Dxe / BiosSnp16.h
CommitLineData
bcecde14 1/** @file\r
2\r
0a6f4824 3Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.<BR>\r
bcecde14 4\r
5This program and the accompanying materials\r
6are licensed and made available under the terms and conditions\r
7of the BSD License which accompanies this distribution. The\r
8full text of the license may be found at\r
9http://opensource.org/licenses/bsd-license.php\r
10\r
11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14**/\r
15\r
16#ifndef _BIOS_SNP_16_H_\r
17#define _BIOS_SNP_16_H_\r
18\r
19#include <Uefi.h>\r
20\r
21#include <Protocol/LegacyBios.h>\r
22#include <Protocol/SimpleNetwork.h>\r
23#include <Protocol/PciIo.h>\r
24#include <Protocol/NetworkInterfaceIdentifier.h>\r
25#include <Protocol/DevicePath.h>\r
26\r
27#include <Library/UefiDriverEntryPoint.h>\r
28#include <Library/DebugLib.h>\r
29#include <Library/BaseMemoryLib.h>\r
30#include <Library/UefiBootServicesTableLib.h>\r
31#include <Library/UefiLib.h>\r
32#include <Library/BaseLib.h>\r
33#include <Library/DevicePathLib.h>\r
34#include <Library/MemoryAllocationLib.h>\r
35\r
36#include <Guid/EventGroup.h>\r
37\r
38#include <IndustryStandard/Pci.h>\r
39\r
40#include "Pxe.h"\r
41\r
42//\r
43// BIOS Simple Network Protocol Device Structure\r
44//\r
45#define EFI_SIMPLE_NETWORK_DEV_SIGNATURE SIGNATURE_32 ('s', 'n', '1', '6')\r
46\r
47#define INIT_PXE_STATUS 0xabcd\r
48\r
49#define EFI_SIMPLE_NETWORK_MAX_TX_FIFO_SIZE 64\r
50\r
51typedef struct {\r
52 UINT32 First;\r
53 UINT32 Last;\r
54 VOID * Data[EFI_SIMPLE_NETWORK_MAX_TX_FIFO_SIZE];\r
55} EFI_SIMPLE_NETWORK_DEV_FIFO;\r
56\r
57typedef struct {\r
58 UINTN Signature;\r
59 EFI_HANDLE Handle;\r
60 EFI_SIMPLE_NETWORK_PROTOCOL SimpleNetwork;\r
61 EFI_SIMPLE_NETWORK_MODE SimpleNetworkMode;\r
62 EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL Nii;\r
63 EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r
64 EFI_PCI_IO_PROTOCOL *PciIo;\r
65 EFI_LEGACY_BIOS_PROTOCOL *LegacyBios;\r
66\r
67 //\r
68 // Local Data for Simple Network Protocol interface goes here\r
69 //\r
70 BOOLEAN UndiLoaded;\r
71 EFI_EVENT EfiBootEvent;\r
72 EFI_EVENT LegacyBootEvent;\r
73 UINT16 PxeEntrySegment;\r
74 UINT16 PxeEntryOffset;\r
75 EFI_SIMPLE_NETWORK_DEV_FIFO TxBufferFifo;\r
76 EFI_DEVICE_PATH_PROTOCOL *BaseDevicePath;\r
77 PXE_T *Pxe; ///< Pointer to !PXE structure\r
78 PXENV_UNDI_GET_INFORMATION_T GetInformation; ///< Data from GET INFORMATION\r
79 PXENV_UNDI_GET_NIC_TYPE_T GetNicType; ///< Data from GET NIC TYPE\r
80 PXENV_UNDI_GET_NDIS_INFO_T GetNdisInfo; ///< Data from GET NDIS INFO\r
81 BOOLEAN IsrValid; ///< TRUE if Isr contains valid data\r
82 PXENV_UNDI_ISR_T Isr; ///< Data from ISR\r
83 PXENV_UNDI_TBD_T *Xmit; //\r
84 VOID *TxRealModeMediaHeader; ///< < 1 MB Size = 0x100\r
85 VOID *TxRealModeDataBuffer; ///< < 1 MB Size = GetInformation.MaxTranUnit\r
86 VOID *TxDestAddr; ///< < 1 MB Size = 16\r
87 UINT8 InterruptStatus; ///< returned/cleared by GetStatus, set in ISR\r
88 UINTN UndiLoaderTablePages;\r
89 UINTN DestinationDataSegmentPages;\r
90 UINTN DestinationStackSegmentPages;\r
91 UINTN DestinationCodeSegmentPages;\r
92 VOID *UndiLoaderTable;\r
93 VOID *DestinationDataSegment;\r
94 VOID *DestinationStackSegment;\r
95 VOID *DestinationCodeSegment;\r
96} EFI_SIMPLE_NETWORK_DEV;\r
97\r
98#define EFI_SIMPLE_NETWORK_DEV_FROM_THIS(a) \\r
99 CR (a, \\r
100 EFI_SIMPLE_NETWORK_DEV, \\r
101 SimpleNetwork, \\r
102 EFI_SIMPLE_NETWORK_DEV_SIGNATURE \\r
103 )\r
104\r
105//\r
106// Global Variables\r
107//\r
108extern EFI_DRIVER_BINDING_PROTOCOL gBiosSnp16DriverBinding;\r
109extern EFI_COMPONENT_NAME_PROTOCOL gBiosSnp16ComponentName;\r
110extern EFI_COMPONENT_NAME2_PROTOCOL gBiosSnp16ComponentName2;\r
111\r
112\r
113//\r
114// Driver Binding Protocol functions\r
115//\r
116/**\r
117 Tests to see if this driver supports a given controller.\r
118\r
119 @param This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
120 @param Controller The handle of the controller to test.\r
121 @param RemainingDevicePath A pointer to the remaining portion of a device path.\r
0a6f4824 122\r
bcecde14 123 @retval EFI_SUCCESS The driver supports given controller.\r
124 @retval EFI_UNSUPPORT The driver doesn't support given controller.\r
125 @retval Other Other errors prevent driver finishing to test\r
126 if the driver supports given controller.\r
127**/\r
128EFI_STATUS\r
129EFIAPI\r
130BiosSnp16DriverBindingSupported (\r
131 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
132 IN EFI_HANDLE Controller,\r
133 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
134 )\r
135;\r
136\r
137/**\r
138 Starts the Snp device controller\r
139\r
140 @param This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
141 @param Controller The handle of the controller to test.\r
142 @param RemainingDevicePath A pointer to the remaining portion of a device path.\r
0a6f4824
LG
143\r
144 @retval EFI_SUCCESS - The device was started.\r
bcecde14 145 @retval EFI_DEVICE_ERROR - The device could not be started due to a device error.\r
146 @retval EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of resources.\r
147**/\r
148EFI_STATUS\r
149EFIAPI\r
150BiosSnp16DriverBindingStart (\r
151 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
152 IN EFI_HANDLE Controller,\r
153 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
154 )\r
155;\r
156\r
157/**\r
158 Stops the device by given device controller.\r
159\r
160 @param This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
161 @param Controller The handle of the controller to test.\r
162 @param NumberOfChildren The number of child device handles in ChildHandleBuffer.\r
163 @param ChildHandleBuffer An array of child handles to be freed. May be NULL if\r
164 NumberOfChildren is 0.\r
0a6f4824 165\r
bcecde14 166 @retval EFI_SUCCESS - The device was stopped.\r
167 @retval EFI_DEVICE_ERROR - The device could not be stopped due to a device error.\r
168**/\r
169EFI_STATUS\r
170EFIAPI\r
171BiosSnp16DriverBindingStop (\r
172 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
173 IN EFI_HANDLE Controller,\r
174 IN UINTN NumberOfChildren,\r
175 IN EFI_HANDLE *ChildHandleBuffer\r
176 )\r
177;\r
178\r
179//\r
180// Simple Network Protocol functions\r
181//\r
182/**\r
183 Call 16 bit UNDI ROM to start the network interface\r
184\r
185 @param This A pointer to EFI_SIMPLE_NETWORK_PROTOCOL structure.\r
0a6f4824 186\r
bcecde14 187 @retval EFI_DEVICE_ERROR Network interface has not be initialized.\r
188 @retval EFI_DEVICE_ERROR Fail to execute 16 bit ROM call.\r
189 @retval EFI_SUCESS Success operation.\r
190**/\r
191EFI_STATUS\r
192EFIAPI\r
193Undi16SimpleNetworkStart (\r
194 IN EFI_SIMPLE_NETWORK_PROTOCOL *This\r
195 )\r
196;\r
197\r
198/**\r
199 Call 16 bit UNDI ROM to stop the network interface\r
200\r
201 @param This A pointer to EFI_SIMPLE_NETWORK_PROTOCOL structure.\r
0a6f4824 202\r
bcecde14 203 @retval EFI_DEVICE_ERROR Network interface has not be initialized.\r
204 @retval EFI_DEVICE_ERROR Fail to execute 16 bit ROM call.\r
205 @retval EFI_SUCESS Success operation.\r
206**/\r
207EFI_STATUS\r
208EFIAPI\r
209Undi16SimpleNetworkStop (\r
210 IN EFI_SIMPLE_NETWORK_PROTOCOL *This\r
211 )\r
212;\r
213\r
214/**\r
0a6f4824 215 Initialize network interface\r
bcecde14 216\r
217 @param This A pointer to EFI_SIMPLE_NETWORK_PROTOCOL structure.\r
218 @param ExtraRxBufferSize The size of extra request receive buffer.\r
219 @param ExtraTxBufferSize The size of extra request transmit buffer.\r
0a6f4824 220\r
bcecde14 221 @retval EFI_DEVICE_ERROR Fail to execute 16 bit ROM call.\r
222 @retval EFI_SUCESS Success operation.\r
223**/\r
224EFI_STATUS\r
225EFIAPI\r
226Undi16SimpleNetworkInitialize (\r
227 IN EFI_SIMPLE_NETWORK_PROTOCOL *This,\r
228 IN UINTN ExtraRxBufferSize OPTIONAL,\r
229 IN UINTN ExtraTxBufferSize OPTIONAL\r
230 )\r
231;\r
232\r
233/**\r
234 Reset network interface.\r
235\r
236 @param This A pointer to EFI_SIMPLE_NETWORK_PROTOCOL structure.\r
237 @param ExtendedVerification Need extended verfication.\r
0a6f4824 238\r
70d3fe9d 239 @retval EFI_INVALID_PARAMETER Invalid This parameter.\r
bcecde14 240 @retval EFI_DEVICE_ERROR Network device has not been initialized.\r
241 @retval EFI_NOT_STARTED Network device has been stopped.\r
242 @retval EFI_DEVICE_ERROR Invalid status for network device\r
243 @retval EFI_SUCCESS Success operation.\r
244**/\r
245EFI_STATUS\r
246EFIAPI\r
247Undi16SimpleNetworkReset (\r
248 IN EFI_SIMPLE_NETWORK_PROTOCOL *This,\r
249 IN BOOLEAN ExtendedVerification\r
250 )\r
251;\r
252\r
253/**\r
254 Shutdown network interface.\r
255\r
256 @param This A pointer to EFI_SIMPLE_NETWORK_PROTOCOL structure.\r
0a6f4824 257\r
70d3fe9d 258 @retval EFI_INVALID_PARAMETER Invalid This parameter.\r
bcecde14 259 @retval EFI_DEVICE_ERROR Network device has not been initialized.\r
260 @retval EFI_NOT_STARTED Network device has been stopped.\r
261 @retval EFI_DEVICE_ERROR Invalid status for network device\r
262 @retval EFI_SUCCESS Success operation.\r
263**/\r
264EFI_STATUS\r
265EFIAPI\r
266Undi16SimpleNetworkShutdown (\r
267 IN EFI_SIMPLE_NETWORK_PROTOCOL *This\r
268 )\r
269;\r
270\r
271/**\r
272 Reset network interface.\r
273\r
274 @param This A pointer to EFI_SIMPLE_NETWORK_PROTOCOL structure.\r
275 @param Enable Enable mask value\r
276 @param Disable Disable mask value\r
277 @param ResetMCastFilter Whether reset multi cast filter or not\r
278 @param MCastFilterCnt Count of mutli cast filter for different MAC address\r
279 @param MCastFilter Buffer for mustli cast filter for different MAC address.\r
0a6f4824 280\r
70d3fe9d 281 @retval EFI_INVALID_PARAMETER Invalid This parameter.\r
bcecde14 282 @retval EFI_DEVICE_ERROR Network device has not been initialized.\r
283 @retval EFI_NOT_STARTED Network device has been stopped.\r
284 @retval EFI_DEVICE_ERROR Invalid status for network device\r
285 @retval EFI_SUCCESS Success operation.\r
286**/\r
287EFI_STATUS\r
288EFIAPI\r
289Undi16SimpleNetworkReceiveFilters (\r
290 IN EFI_SIMPLE_NETWORK_PROTOCOL * This,\r
291 IN UINT32 Enable,\r
292 IN UINT32 Disable,\r
293 IN BOOLEAN ResetMCastFilter,\r
294 IN UINTN MCastFilterCnt OPTIONAL,\r
295 IN EFI_MAC_ADDRESS * MCastFilter OPTIONAL\r
296 )\r
297;\r
298\r
299/**\r
300 Set new MAC address.\r
301\r
302 @param This A pointer to EFI_SIMPLE_NETWORK_PROTOCOL structure.\r
70d3fe9d 303 @param Reset Whether reset station MAC address to permanent address\r
bcecde14 304 @param New A pointer to New address\r
0a6f4824 305\r
70d3fe9d 306 @retval EFI_INVALID_PARAMETER Invalid This parameter.\r
bcecde14 307 @retval EFI_DEVICE_ERROR Network device has not been initialized.\r
308 @retval EFI_NOT_STARTED Network device has been stopped.\r
309 @retval EFI_DEVICE_ERROR Invalid status for network device\r
310 @retval EFI_SUCCESS Success operation.\r
311**/\r
312EFI_STATUS\r
313EFIAPI\r
314Undi16SimpleNetworkStationAddress (\r
315 IN EFI_SIMPLE_NETWORK_PROTOCOL * This,\r
316 IN BOOLEAN Reset,\r
317 IN EFI_MAC_ADDRESS * New OPTIONAL\r
318 )\r
319;\r
320\r
321/**\r
322 Collect statistics.\r
323\r
324 @param This A pointer to EFI_SIMPLE_NETWORK_PROTOCOL structure.\r
325 @param Reset Whether cleanup old statistics data.\r
326 @param StatisticsSize The buffer of statistics table.\r
327 @param StatisticsTable A pointer to statistics buffer.\r
0a6f4824 328\r
70d3fe9d 329 @retval EFI_INVALID_PARAMETER Invalid This parameter.\r
bcecde14 330 @retval EFI_DEVICE_ERROR Network device has not been initialized.\r
331 @retval EFI_NOT_STARTED Network device has been stopped.\r
332 @retval EFI_DEVICE_ERROR Invalid status for network device\r
333 @retval EFI_SUCCESS Success operation.\r
334**/\r
335EFI_STATUS\r
336EFIAPI\r
337Undi16SimpleNetworkStatistics (\r
338 IN EFI_SIMPLE_NETWORK_PROTOCOL * This,\r
339 IN BOOLEAN Reset,\r
340 IN OUT UINTN *StatisticsSize OPTIONAL,\r
341 OUT EFI_NETWORK_STATISTICS * StatisticsTable OPTIONAL\r
342 )\r
343;\r
344\r
345/**\r
346 Translate IP address to MAC address.\r
347\r
348 @param This A pointer to EFI_SIMPLE_NETWORK_PROTOCOL structure.\r
349 @param IPv6 IPv6 or IPv4\r
350 @param IP A pointer to given Ip address.\r
351 @param MAC On return, translated MAC address.\r
0a6f4824 352\r
70d3fe9d 353 @retval EFI_INVALID_PARAMETER Invalid This parameter.\r
bcecde14 354 @retval EFI_INVALID_PARAMETER Invalid IP address.\r
355 @retval EFI_INVALID_PARAMETER Invalid return buffer for holding MAC address.\r
0a6f4824 356 @retval EFI_UNSUPPORTED Do not support IPv6\r
bcecde14 357 @retval EFI_DEVICE_ERROR Network device has not been initialized.\r
358 @retval EFI_NOT_STARTED Network device has been stopped.\r
359 @retval EFI_DEVICE_ERROR Invalid status for network device\r
360 @retval EFI_SUCCESS Success operation.\r
361**/\r
362EFI_STATUS\r
363EFIAPI\r
364Undi16SimpleNetworkMCastIpToMac (\r
365 IN EFI_SIMPLE_NETWORK_PROTOCOL *This,\r
366 IN BOOLEAN IPv6,\r
367 IN EFI_IP_ADDRESS *IP,\r
368 OUT EFI_MAC_ADDRESS *MAC\r
369 )\r
370;\r
371\r
372/**\r
0a6f4824 373 Performs read and write operations on the NVRAM device attached to a\r
bcecde14 374 network interface.\r
375\r
376 @param This The protocol instance pointer.\r
377 @param ReadWrite TRUE for read operations, FALSE for write operations.\r
378 @param Offset Byte offset in the NVRAM device at which to start the read or\r
379 write operation. This must be a multiple of NvRamAccessSize and\r
380 less than NvRamSize.\r
381 @param BufferSize The number of bytes to read or write from the NVRAM device.\r
382 This must also be a multiple of NvramAccessSize.\r
383 @param Buffer A pointer to the data buffer.\r
384\r
385 @retval EFI_SUCCESS The NVRAM access was performed.\r
386 @retval EFI_NOT_STARTED The network interface has not been started.\r
387 @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.\r
388 @retval EFI_DEVICE_ERROR The command could not be sent to the network interface.\r
389 @retval EFI_UNSUPPORTED This function is not supported by the network interface.\r
390\r
391**/\r
392EFI_STATUS\r
393EFIAPI\r
394Undi16SimpleNetworkNvData (\r
395 IN EFI_SIMPLE_NETWORK_PROTOCOL *This,\r
396 IN BOOLEAN Write,\r
397 IN UINTN Offset,\r
398 IN UINTN BufferSize,\r
399 IN OUT VOID *Buffer\r
400 )\r
401;\r
402\r
403/**\r
0a6f4824 404 Reads the current interrupt status and recycled transmit buffer status from\r
bcecde14 405 a network interface.\r
406\r
407 @param This The protocol instance pointer.\r
408 @param InterruptStatus A pointer to the bit mask of the currently active interrupts\r
409 If this is NULL, the interrupt status will not be read from\r
410 the device. If this is not NULL, the interrupt status will\r
411 be read from the device. When the interrupt status is read,\r
412 it will also be cleared. Clearing the transmit interrupt\r
413 does not empty the recycled transmit buffer array.\r
414 @param TxBuf Recycled transmit buffer address. The network interface will\r
415 not transmit if its internal recycled transmit buffer array\r
416 is full. Reading the transmit buffer does not clear the\r
417 transmit interrupt. If this is NULL, then the transmit buffer\r
418 status will not be read. If there are no transmit buffers to\r
419 recycle and TxBuf is not NULL, * TxBuf will be set to NULL.\r
420\r
421 @retval EFI_SUCCESS The status of the network interface was retrieved.\r
422 @retval EFI_NOT_STARTED The network interface has not been started.\r
423 @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.\r
424 @retval EFI_DEVICE_ERROR The command could not be sent to the network interface.\r
425 @retval EFI_UNSUPPORTED This function is not supported by the network interface.\r
426\r
427**/\r
428EFI_STATUS\r
429EFIAPI\r
430Undi16SimpleNetworkGetStatus (\r
431 IN EFI_SIMPLE_NETWORK_PROTOCOL * This,\r
432 OUT UINT32 *InterruptStatus OPTIONAL,\r
433 OUT VOID **TxBuf OPTIONAL\r
434 )\r
435;\r
436\r
437/**\r
438 Places a packet in the transmit queue of a network interface.\r
439\r
440 @param This The protocol instance pointer.\r
441 @param HeaderSize The size, in bytes, of the media header to be filled in by\r
442 the Transmit() function. If HeaderSize is non-zero, then it\r
443 must be equal to This->Mode->MediaHeaderSize and the DestAddr\r
444 and Protocol parameters must not be NULL.\r
445 @param BufferSize The size, in bytes, of the entire packet (media header and\r
446 data) to be transmitted through the network interface.\r
447 @param Buffer A pointer to the packet (media header followed by data) to be\r
448 transmitted. This parameter cannot be NULL. If HeaderSize is zero,\r
449 then the media header in Buffer must already be filled in by the\r
450 caller. If HeaderSize is non-zero, then the media header will be\r
451 filled in by the Transmit() function.\r
452 @param SrcAddr The source HW MAC address. If HeaderSize is zero, then this parameter\r
453 is ignored. If HeaderSize is non-zero and SrcAddr is NULL, then\r
454 This->Mode->CurrentAddress is used for the source HW MAC address.\r
455 @param DestAddr The destination HW MAC address. If HeaderSize is zero, then this\r
456 parameter is ignored.\r
457 @param Protocol The type of header to build. If HeaderSize is zero, then this\r
458 parameter is ignored. See RFC 1700, section "Ether Types", for\r
459 examples.\r
460\r
461 @retval EFI_SUCCESS The packet was placed on the transmit queue.\r
462 @retval EFI_NOT_STARTED The network interface has not been started.\r
0a6f4824 463 @retval EFI_NOT_READY The network interface is too busy to accept this transmit request.\r
bcecde14 464 @retval EFI_BUFFER_TOO_SMALL The BufferSize parameter is too small.\r
465 @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.\r
466 @retval EFI_DEVICE_ERROR The command could not be sent to the network interface.\r
467 @retval EFI_UNSUPPORTED This function is not supported by the network interface.\r
468\r
469**/\r
470EFI_STATUS\r
471EFIAPI\r
472Undi16SimpleNetworkTransmit (\r
473 IN EFI_SIMPLE_NETWORK_PROTOCOL *This,\r
474 IN UINTN HeaderSize,\r
475 IN UINTN BufferSize,\r
476 IN VOID *Buffer,\r
477 IN EFI_MAC_ADDRESS *SrcAddr OPTIONAL,\r
478 IN EFI_MAC_ADDRESS *DestAddr OPTIONAL,\r
479 IN UINT16 *Protocol OPTIONAL\r
480 )\r
481;\r
482\r
483/**\r
484 Receives a packet from a network interface.\r
485\r
486 @param This The protocol instance pointer.\r
487 @param HeaderSize The size, in bytes, of the media header received on the network\r
488 interface. If this parameter is NULL, then the media header size\r
489 will not be returned.\r
490 @param BufferSize On entry, the size, in bytes, of Buffer. On exit, the size, in\r
491 bytes, of the packet that was received on the network interface.\r
492 @param Buffer A pointer to the data buffer to receive both the media header and\r
493 the data.\r
494 @param SrcAddr The source HW MAC address. If this parameter is NULL, the\r
495 HW MAC source address will not be extracted from the media\r
496 header.\r
497 @param DestAddr The destination HW MAC address. If this parameter is NULL,\r
498 the HW MAC destination address will not be extracted from the\r
499 media header.\r
500 @param Protocol The media header type. If this parameter is NULL, then the\r
501 protocol will not be extracted from the media header. See\r
502 RFC 1700 section "Ether Types" for examples.\r
503\r
504 @retval EFI_SUCCESS The received data was stored in Buffer, and BufferSize has\r
505 been updated to the number of bytes received.\r
506 @retval EFI_NOT_STARTED The network interface has not been started.\r
507 @retval EFI_NOT_READY The network interface is too busy to accept this transmit\r
508 request.\r
509 @retval EFI_BUFFER_TOO_SMALL The BufferSize parameter is too small.\r
510 @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.\r
511 @retval EFI_DEVICE_ERROR The command could not be sent to the network interface.\r
512 @retval EFI_UNSUPPORTED This function is not supported by the network interface.\r
513\r
514**/\r
515EFI_STATUS\r
516EFIAPI\r
517Undi16SimpleNetworkReceive (\r
518 IN EFI_SIMPLE_NETWORK_PROTOCOL *This,\r
519 OUT UINTN *HeaderSize OPTIONAL,\r
520 IN OUT UINTN *BufferSize,\r
521 OUT VOID *Buffer,\r
522 OUT EFI_MAC_ADDRESS *SrcAddr OPTIONAL,\r
523 OUT EFI_MAC_ADDRESS *DestAddr OPTIONAL,\r
524 OUT UINT16 *Protocol OPTIONAL\r
525 )\r
526;\r
527\r
528/**\r
529 wait for a packet to be received.\r
530\r
531 @param Event Event used with WaitForEvent() to wait for a packet to be received.\r
532 @param Context Event Context\r
0a6f4824 533\r
bcecde14 534**/\r
535VOID\r
536EFIAPI\r
537Undi16SimpleNetworkWaitForPacket (\r
538 IN EFI_EVENT Event,\r
539 IN VOID *Context\r
540 )\r
541;\r
542\r
543/**\r
544 Check whether packet is ready for receive.\r
545\r
546 @param This The protocol instance pointer.\r
0a6f4824 547\r
bcecde14 548 @retval EFI_SUCCESS Receive data is ready.\r
549 @retval EFI_NOT_STARTED The network interface has not been started.\r
550 @retval EFI_NOT_READY The network interface is too busy to accept this transmit\r
551 request.\r
552 @retval EFI_BUFFER_TOO_SMALL The BufferSize parameter is too small.\r
553 @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.\r
554 @retval EFI_DEVICE_ERROR The command could not be sent to the network interface.\r
555 @retval EFI_UNSUPPORTED This function is not supported by the network interface.\r
556**/\r
557EFI_STATUS\r
558Undi16SimpleNetworkCheckForPacket (\r
559 IN EFI_SIMPLE_NETWORK_PROTOCOL *This\r
560 )\r
561;\r
562\r
563/**\r
564 Cache Interrupt verctor address converted from IVT number.\r
565\r
566 @param VectorNumber IVT number\r
0a6f4824 567\r
bcecde14 568 @retval EFI_SUCCESS Success to operation.\r
569**/\r
570EFI_STATUS\r
571CacheVectorAddress (\r
572 UINT8 VectorNumber\r
573 )\r
574;\r
575\r
576/**\r
0a6f4824
LG
577 Get interrupt vector address according to IVT number.\r
578\r
bcecde14 579 @param VectorNumber Given IVT number\r
0a6f4824 580\r
bcecde14 581 @return cached interrupt vector address.\r
582**/\r
583EFI_STATUS\r
584RestoreCachedVectorAddress (\r
585 UINT8 VectorNumber\r
586 )\r
587;\r
588\r
589/**\r
590 If available, launch the BaseCode from a NIC option ROM.\r
591 This should install the !PXE and PXENV+ structures in memory for\r
592 subsequent use.\r
0a6f4824 593\r
bcecde14 594\r
595 @param SimpleNetworkDevice Simple network device instance\r
596 @param RomAddress The ROM base address for NIC rom.\r
0a6f4824
LG
597\r
598 @retval EFI_NOT_FOUND The check sum does not match\r
599 @retval EFI_NOT_FOUND Rom ID offset is wrong\r
600 @retval EFI_NOT_FOUND No Rom ID structure is found\r
bcecde14 601**/\r
602EFI_STATUS\r
603LaunchBaseCode (\r
604 EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
605 UINTN RomAddress\r
606 )\r
607;\r
608\r
609/**\r
0a6f4824 610 PXE\r
bcecde14 611 START UNDI\r
612 Op-Code: PXENV_START_UNDI (0000h)\r
613 Input: Far pointer to a PXENV_START_UNDI_T parameter structure that has been initialized by the caller.\r
614 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
615 the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx\r
616 constants.\r
617 Description: This service is used to pass the BIOS parameter registers to the UNDI driver. The UNDI driver is\r
618 responsible for saving the information it needs to communicate with the hardware.\r
619 This service is also responsible for hooking the Int 1Ah service routine\r
620 Note: This API service must be called only once during UNDI Option ROM boot.\r
621 The UNDI driver is responsible for saving this information and using it every time\r
622 PXENV_UNDI_STARTUP is called.\r
623 Service cannot be used in protected mode.\r
624 typedef struct {\r
625 PXENV_STATUS Status;\r
626 UINT16 AX;\r
627 UINT16 BX;\r
628 UINT16 DX;\r
629 UINT16 DI;\r
630 UINT16 ES;\r
631 } PXENV_START_UNDI_T;\r
632 Set before calling API service\r
633 AX, BX, DX, DI, ES: BIOS initialization parameter registers. These\r
634 fields should contain the same information passed to the option ROM\r
635 initialization routine by the Host System BIOS. Information about the\r
636 contents of these registers can be found in the [PnP], [PCI] and\r
637 [BBS] specifications.\r
638 Returned from API service\r
0a6f4824 639 Status: See the PXENV_STATUS_xxx constants.\r
bcecde14 640\r
641 @param SimpleNetworkDevice Device instance\r
0a6f4824 642 @param PxeUndiTable Point to structure which hold parameter and return value\r
bcecde14 643 for option ROM call.\r
0a6f4824
LG
644\r
645 @return Return value of PXE option ROM far call.\r
bcecde14 646**/\r
647EFI_STATUS\r
648PxeStartUndi (\r
649 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
650 IN OUT PXENV_START_UNDI_T *PxeUndiTable\r
651 )\r
652;\r
653\r
654/**\r
0a6f4824
LG
655 PXE\r
656 UNDI STARTUP\r
bcecde14 657 Op-Code: PXENV_UNDI_STARTUP (0001h)\r
658 Input: Far pointer to a PXENV_UNDI_STARTUP_T parameter structure that has been initialized by the\r
659 caller.\r
660 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
661 the parameter structure must be set to one of the values represented by the\r
662 PXENV_STATUS_xxx constants.\r
663 Description: This API is responsible for initializing the contents of the UNDI code & data segment for proper\r
664 operation. Information from the !PXE structure and the first PXENV_START_UNDI API call is used\r
665 to complete this initialization. The rest of the UNDI APIs will not be available until this call has\r
666 been completed.\r
667 Note: PXENV_UNDI_STARTUP must not be called again without first calling\r
668 PXENV_UNDI_SHUTDOWN.\r
669 PXENV_UNDI_STARTUP and PXENV_UNDI_SHUTDOWN are no longer responsible for\r
670 chaining interrupt 1Ah. This must be done by the PXENV_START_UNDI and\r
671 PXENV_STOP_UNDI API calls.\r
672 This service cannot be used in protected mode.\r
0a6f4824 673 typedef struct\r
bcecde14 674 {\r
675 PXENV_STATUS Status;\r
676 } PXENV_UNDI_STARTUP_T;\r
677 Set before calling API service\r
678 N/A\r
679 Returned from API service\r
680 Status: See the PXENV_STATUS_xxx constants.\r
681\r
682 @param SimpleNetworkDevice Device instance\r
0a6f4824 683 @param PxeUndiTable Point to structure which hold parameter and return value\r
bcecde14 684 for option ROM call.\r
0a6f4824
LG
685\r
686 @return Return value of PXE option ROM far call.\r
bcecde14 687**/\r
688EFI_STATUS\r
689PxeUndiStartup (\r
690 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
691 IN OUT PXENV_UNDI_STARTUP_T *PxeUndiTable\r
692 )\r
693;\r
694\r
695/**\r
0a6f4824 696 PXE\r
bcecde14 697 UNDI CLEANUP\r
698 Op-Code: PXENV_UNDI_CLEANUP (0002h)\r
699 Input: Far pointer to a PXENV_UNDI_CLEANUP_T parameter structure.\r
700 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field\r
701 in the parameter structure must be set to one of the values represented by the\r
702 PXENV_STATUS_xxx constants.\r
703 Description: This call will prepare the network adapter driver to be unloaded from memory. This call must be\r
704 made just before unloading the Universal NIC Driver. The rest of the API will not be available\r
705 after this call executes.\r
706 This service cannot be used in protected mode.\r
707 typedef struct {\r
708 PXENX_STATUS Status;\r
709 } PXENV_UNDI_CLEANUP_T;\r
710 Set before calling API service\r
711 N/A\r
712 Returned from API service\r
713 Status: See the PXENV_STATUS_xxx constants.\r
714\r
715 @param SimpleNetworkDevice Device instance\r
0a6f4824 716 @param PxeUndiTable Point to structure which hold parameter and return value\r
bcecde14 717 for option ROM call.\r
0a6f4824
LG
718\r
719 @return Return value of PXE option ROM far call.\r
bcecde14 720**/\r
721EFI_STATUS\r
722PxeUndiCleanup (\r
723 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
724 IN OUT PXENV_UNDI_CLEANUP_T *PxeUndiTable\r
725 )\r
726;\r
727\r
728/**\r
0a6f4824 729 PXE\r
bcecde14 730 UNDI INITIALIZE\r
731 Op-Code: PXENV_UNDI_INITIALIZE (0003h)\r
732 Input: Far pointer to a PXENV_UNDI_INITIALIZE_T parameter structure that has been initialized by the\r
733 caller.\r
734 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
735 the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx\r
736 constants.\r
737 Description: This call resets the adapter and programs it with default parameters. The default parameters used\r
738 are those supplied to the most recent UNDI_STARTUP call. This routine does not enable the\r
739 receive and transmit units of the network adapter to readily receive or transmit packets. The\r
740 application must call PXENV_UNDI_OPEN to logically connect the network adapter to the network.\r
741 This call must be made by an application to establish an interface to the network adapter driver.\r
742 Note: When the PXE code makes this call to initialize the network adapter, it passes a NULL pointer for\r
743 the Protocol field in the parameter structure.\r
744 typedef struct {\r
745 PXENV_STATUS Status;\r
746 ADDR32 ProtocolIni;\r
747 UINT8 reserved[8];\r
748 } PXENV_UNDI_INITIALIZE_T;\r
749 Set before calling API service\r
750 ProtocolIni: Physical address of a memory copy of the driver\r
751 module from the protocol.ini file obtained from the protocol manager\r
752 driver (refer to the NDIS 2.0 specification). This parameter is\r
753 supported for the universal NDIS driver to pass the information\r
754 contained in the protocol.ini file to the NIC driver for any specific\r
755 configuration of the NIC. (Note that the module identification in the\r
756 protocol.ini file was done by NDIS.) This value can be NULL for any\r
757 other application interfacing to the universal NIC driver\r
758 Returned from API service\r
0a6f4824
LG
759 Status: See the PXENV_STATUS_xxx constants.\r
760\r
bcecde14 761 @param SimpleNetworkDevice Device instance.\r
0a6f4824 762 @param PxeUndiTable Point to structure which hold parameter and return value\r
bcecde14 763 for option ROM call.\r
0a6f4824
LG
764\r
765 @return Return value of PXE option ROM far call.\r
bcecde14 766**/\r
767EFI_STATUS\r
768PxeUndiInitialize (\r
769 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
770 IN OUT PXENV_UNDI_INITIALIZE_T *PxeUndiTable\r
771 )\r
772;\r
773\r
774/**\r
775 Wrapper routine for reset adapter.\r
0a6f4824
LG
776\r
777 PXE\r
bcecde14 778 UNDI RESET ADAPTER\r
779 Op-Code: PXENV_UNDI_RESET_ADAPTER (0004h)\r
780 Input: Far pointer to a PXENV_UNDI_RESET_ADAPTER_t parameter structure that has been initialized\r
781 by the caller.\r
782 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
783 the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx\r
784 constants.\r
785 Description: This call resets and reinitializes the network adapter with the same set of parameters supplied to\r
786 Initialize Routine. Unlike Initialize, this call opens the adapter that is, it connects logically to the\r
787 network. This routine cannot be used to replace Initialize or Shutdown calls.\r
788 typedef struct {\r
789 PXENV_STATUS Status;\r
790 PXENV_UNDI_MCAST_ADDRESS_t R_Mcast_Buf;\r
791 } PXENV_UNDI_RESET_T;\r
792\r
793 #define MAXNUM_MCADDR 8\r
794\r
795 typedef struct {\r
796 UINT16 MCastAddrCount;\r
797 MAC_ADDR McastAddr[MAXNUM_MCADDR];\r
798 } PXENV_UNDI_MCAST_ADDRESS_t;\r
799\r
800 Set before calling API service\r
801 R_Mcast_Buf: This is a structure of MCastAddrCount and\r
802 McastAddr.\r
803 MCastAddrCount: Number of multicast MAC addresses in the\r
804 buffer.\r
805 McastAddr: List of up to MAXNUM_MCADDR multicast MAC\r
806 addresses.\r
807 Returned from API service\r
808 Status: See the PXENV_STATUS_xxx constants.\r
0a6f4824 809\r
bcecde14 810 @param SimpleNetworkDevice Device instance.\r
0a6f4824 811 @param PxeUndiTable Point to structure which hold parameter and return value\r
bcecde14 812 for option ROM call.\r
0a6f4824
LG
813 @param RxFilter Filter setting mask value for PXE recive .\r
814\r
815 @return Return value of PXE option ROM far call.\r
bcecde14 816**/\r
817EFI_STATUS\r
818PxeUndiResetNic (\r
819 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
820 IN OUT PXENV_UNDI_RESET_T *PxeUndiTable,\r
821 IN UINT16 RxFilter\r
822 )\r
823;\r
824\r
825/**\r
0a6f4824 826 PXE\r
bcecde14 827 UNDI SHUTDOWN\r
828 Op-Code: PXENV_UNDI_SHUTDOWN (0005h)\r
829 Input: Far pointer to a PXENV_UNDI_SHUTDOWN_T parameter.\r
830 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
831 the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx\r
832 constants.\r
833 Description: This call resets the network adapter and leaves it in a safe state for another driver to program it.\r
834 Note: The contents of the PXENV_UNDI_STARTUP parameter structure need to be saved by the\r
835 Universal NIC Driver in case PXENV_UNDI_INITIALIZE is called again.\r
0a6f4824 836 typedef struct\r
bcecde14 837 {\r
838 PXENV_STATUS Status;\r
839 } PXENV_UNDI_SHUTDOWN_T;\r
840 Set before calling API service\r
841 N/A\r
842 Returned from API service\r
843 Status: See the PXENV_STATUS_xxx constants.\r
0a6f4824 844\r
bcecde14 845 @param SimpleNetworkDevice Device instance\r
0a6f4824 846 @param PxeUndiTable Point to structure which hold parameter and return value\r
bcecde14 847 for option ROM call.\r
0a6f4824
LG
848\r
849 @return Return value of PXE option ROM far call.\r
bcecde14 850**/\r
851EFI_STATUS\r
852PxeUndiShutdown (\r
853 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
854 IN OUT PXENV_UNDI_SHUTDOWN_T *PxeUndiTable\r
855 )\r
856;\r
857\r
858/**\r
0a6f4824 859 PXE\r
bcecde14 860 UNDI OPEN\r
861 Op-Code: PXENV_UNDI_OPEN (0006h)\r
862 Input: Far pointer to a PXENV_UNDI_OPEN_T parameter structure that has been initialized by the caller.\r
863 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
864 the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx\r
865 constants.\r
866 Description: This call activates the adapter network connection and sets the adapter ready to accept packets\r
867 for transmit and receive.\r
868 typedef struct {\r
869 PXENV_STATUS Status;\r
870 UINT16 OpenFlag;\r
871 UINT16 PktFilter;\r
872 #define FLTR_DIRECTED 0x0001\r
873 #define FLTR_BRDCST 0x0002\r
874 #define FLTR_PRMSCS 0x0004\r
875 #define FLTR_SRC_RTG 0x0008\r
876 PXENV_UNDI_MCAST_ADDRESS_t R_Mcast_Buf;\r
877 } PXENV_UNDI_OPEN_T;\r
878 Set before calling API service\r
879 OpenFlag: This is an adapter specific input parameter. This is\r
880 supported for the universal NDIS 2.0 driver to pass in the open flags\r
881 provided by the protocol driver. (See the NDIS 2.0 specification.)\r
882 This can be zero.\r
883 PktFilter: Filter for receiving packets. This can be one, or more, of\r
884 the FLTR_xxx constants. Multiple values are arithmetically or-ed\r
885 together.\r
886 directed packets are packets that may come to your MAC address\r
887 or the multicast MAC address.\r
888 R_Mcast_Buf: See definition in UNDI RESET ADAPTER (0004h).\r
889 Returned from API service\r
890 Status: See the PXENV_STATUS_xxx constants.\r
0a6f4824 891\r
bcecde14 892 @param SimpleNetworkDevice Device instance\r
0a6f4824 893 @param PxeUndiTable Point to structure which hold parameter and return value\r
bcecde14 894 for option ROM call.\r
0a6f4824
LG
895\r
896 @return Return value of PXE option ROM far call.\r
bcecde14 897**/\r
898EFI_STATUS\r
899PxeUndiOpen (\r
900 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
901 IN OUT PXENV_UNDI_OPEN_T *PxeUndiTable\r
902 )\r
903;\r
904\r
905/**\r
0a6f4824 906 PXE\r
bcecde14 907 UNDI CLOSE\r
908 Op-Code: PXENV_UNDI_CLOSE (0007h)\r
909 Input: Far pointer to a PXENV_UNDI_CLOSE_T parameter.\r
910 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
911 the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx\r
912 constants.\r
913 Description: This call disconnects the network adapter from the network. Packets cannot be transmitted or\r
914 received until the network adapter is open again.\r
915 typedef struct {\r
916 PXENV_STATUS Status;\r
917 } PXENV_UNDI_CLOSE_T;\r
918 Set before calling API service\r
919 N/A\r
920 Returned from API service\r
921 Status: See the PXENV_STATUS_xxx constants.\r
0a6f4824 922\r
bcecde14 923 @param SimpleNetworkDevice Device instance\r
0a6f4824 924 @param PxeUndiTable Point to structure which hold parameter and return value\r
bcecde14 925 for option ROM call.\r
0a6f4824
LG
926\r
927 @return Return value of PXE option ROM far call.\r
bcecde14 928**/\r
929EFI_STATUS\r
930PxeUndiClose (\r
931 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
932 IN OUT PXENV_UNDI_CLOSE_T *PxeUndiTable\r
933 )\r
934;\r
935\r
936/**\r
0a6f4824 937 PXE\r
bcecde14 938 UNDI TRANSMIT PACKET\r
939 Op-Code: PXENV_UNDI_TRANSMIT (0008h)\r
940 Input: Far pointer to a PXENV_UNDI_TRANSMIT_T parameter structure that\r
941 has been initialized by the caller.\r
942 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX.\r
943 The status code must be set to one of the values represented by the\r
944 PXENV_STATUS_xxx constants.\r
945 Description: This call transmits a buffer to the network. The media header\r
946 for the packet can be filled by the calling protocol, but it might not be.\r
947 The network adapter driver will fill it if required by the values in the\r
948 parameter block. The packet is buffered for transmission provided there is\r
949 an available buffer, and the function returns PXENV_EXIT_SUCCESS. If no\r
950 buffer is available the function returns PXENV_EXIT_FAILURE with a status\r
951 code of PXE_UNDI_STATUS__OUT OF_RESOURCE. The number of buffers is\r
952 implementation-dependent. An interrupt is generated on completion of the\r
953 transmission of one or more packets. A call to PXENV_UNDI_TRANSMIT is\r
954 permitted in the context of a transmit complete interrupt.\r
955\r
956 typedef struct {\r
957 PXENV_STATUS Status;\r
958 UINT8 Protocol;\r
959 #define P_UNKNOWN 0\r
960 #define P_IP 1\r
961 #define P_ARP 2\r
962 #define P_RARP 3\r
963 UINT8 XmitFlag;\r
964 #define XMT_DESTADDR 0x0000\r
965 #define XMT_BROADCAST 0x0001\r
966 SEGOFF16 DestAddr;\r
967 SEGOFF16 TBD;\r
968 UINT32 Reserved[2];\r
969 } t_PXENV_UNDI_TRANSMIT;\r
970\r
971 #define MAX_DATA_BLKS 8\r
972\r
973 typedef struct {\r
974 UINT16 ImmedLength;\r
975 SEGOFF16 Xmit;\r
976 UINT16 DataBlkCount;\r
977 struct DataBlk {\r
978 UINT8 TDPtrType;\r
979 UINT8 TDRsvdByte;\r
980 UINT16 TDDataLen;\r
981 SEGOFF16 TDDataPtr;\r
982 } DataBlock[MAX_DATA_BLKS];\r
983 } PXENV_UNDI_TBD_T\r
984\r
985 Set before calling API service\r
986 Protocol: This is the protocol of the upper layer that is calling UNDI\r
987 TRANSMIT call. If the upper layer has filled the media header, this\r
988 field must be P_UNKNOWN.\r
989 XmitFlag: If this flag is XMT_DESTADDR, the NIC driver expects a\r
990 pointer to the destination media address in the field DestAddr. If\r
991 XMT_BROADCAST, the NIC driver fills the broadcast address for the\r
992 destination.\r
993 TBD: Segment:Offset address of the transmit buffer descriptor.\r
994 ImmedLength: Length of the immediate transmit buffer: Xmit.\r
995 Xmit: Segment:Offset of the immediate transmit buffer.\r
996 DataBlkCount: Number of blocks in this transmit buffer.\r
997 TDPtrType:\r
998 0 => 32-bit physical address in TDDataPtr (not supported in this\r
999 version of PXE)\r
1000 1 => segment:offset in TDDataPtr which can be a real mode or 16-bit\r
1001 protected mode pointer\r
1002 TDRsvdByte: Reserved must be zero.\r
1003 TDDatalen: Data block length in bytes.\r
1004 TDDataPtr: Segment:Offset of the transmit block.\r
1005 DataBlock: Array of transmit data blocks.\r
1006 Returned from API service\r
0a6f4824
LG
1007 Status: See the PXENV_STATUS_xxx constants\r
1008\r
bcecde14 1009 @param SimpleNetworkDevice Device instance\r
0a6f4824 1010 @param PxeUndiTable Point to structure which hold parameter and return value\r
bcecde14 1011 for option ROM call.\r
0a6f4824
LG
1012\r
1013 @return Return value of PXE option ROM far call.\r
bcecde14 1014**/\r
1015EFI_STATUS\r
1016PxeUndiTransmit (\r
1017 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
1018 IN OUT PXENV_UNDI_TRANSMIT_T *PxeUndiTable\r
1019 )\r
1020;\r
1021\r
bcecde14 1022\r
1023/**\r
0a6f4824 1024 PXE\r
bcecde14 1025 UNDI SET STATION ADDRESS\r
1026 Op-Code: PXENV_UNDI_SET_STATION_ADDRESS (000Ah)\r
1027 Input: Far pointer to a PXENV_UNDI_SET_STATION_ADDRESS_t parameter structure that has been\r
1028 initialized by the caller.\r
1029 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
1030 the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx\r
1031 constants.\r
1032 Description: This call sets the MAC address to be the input value and is called before opening the network\r
1033 adapter. Later, the open call uses this variable as a temporary MAC address to program the\r
1034 adapter individual address registers.\r
1035 typedef struct {\r
1036 PXENV_STATUS Status;\r
1037 MAC_ADDR StationAddress;\r
1038 } PXENV_UNDI_SET_STATION_ADDR_T;\r
1039 Set before calling API service\r
1040 StationAddress: Temporary MAC address to be used for\r
1041 transmit and receive.\r
1042 Returned from API service\r
0a6f4824
LG
1043 Status: See the PXENV_STATUS_xxx constants.\r
1044\r
bcecde14 1045 @param SimpleNetworkDevice Device instance\r
0a6f4824 1046 @param PxeUndiTable Point to structure which hold parameter and return value\r
bcecde14 1047 for option ROM call.\r
0a6f4824
LG
1048\r
1049 @return Return value of PXE option ROM far call.\r
bcecde14 1050**/\r
1051EFI_STATUS\r
1052PxeUndiSetStationAddr (\r
1053 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
1054 IN OUT PXENV_UNDI_SET_STATION_ADDR_T *PxeUndiTable\r
1055 )\r
1056;\r
1057\r
bcecde14 1058\r
1059/**\r
0a6f4824 1060 PXE\r
bcecde14 1061 UNDI GET INFORMATION\r
1062 Op-Code: PXENV_UNDI_GET_INFORMATION (000Ch)\r
1063 Input: Far pointer to a PXENV_UNDI_GET_INFORMATION_T parameter structure that has been\r
1064 initialized by the caller.\r
1065 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
1066 the parameter structure must be set to one of the values represented by the\r
1067 PXENV_STATUS_xxx constants.\r
1068 Description: This call copies the network adapter variables, including the MAC address, into the input buffer.\r
1069 Note: The PermNodeAddress field must be valid after PXENV_START_UNDI and\r
1070 PXENV_UNDI_STARTUP have been issued. All other fields must be valid after\r
1071 PXENV_START_UNDI, PXENV_UNDI_STARTUP and PXENV_UNDI_INITIALIZE have been\r
1072 called.\r
1073 typedef struct {\r
1074 PXENV_STATUS Status;\r
1075 UINT16 BaseIo;\r
1076 UINT16 IntNumber;\r
1077 UINT16 MaxTranUnit;\r
1078 UINT16 HwType;\r
1079 #define ETHER_TYPE 1\r
1080 #define EXP_ETHER_TYPE 2\r
1081 #define IEEE_TYPE 6\r
1082 #define ARCNET_TYPE 7\r
1083 UINT16 HwAddrLen;\r
1084 MAC_ADDR CurrentNodeAddress;\r
1085 MAC_ADDR PermNodeAddress;\r
1086 SEGSEL ROMAddress;\r
1087 UINT16 RxBufCt;\r
1088 UINT16 TxBufCt;\r
1089 } PXENV_UNDI_GET_INFORMATION_T;\r
1090 Set before calling API service\r
1091 N/A\r
1092 Returned from API service\r
1093 Status: See the PXENV_STATUS_xxx constants.\r
1094 BaseIO: Adapter base I/O address.\r
1095 IntNumber: Adapter IRQ number.\r
1096 MaxTranUnit: Adapter maximum transmit unit.\r
1097 HWType: Type of protocol at the hardware level.\r
1098 HWAddrLen: Length of the hardware address.\r
1099 CurrentNodeAddress: Current hardware address.\r
1100 PermNodeAddress: Permanent hardware address.\r
1101 ROMAddress: Real mode ROM segment address.\r
1102 RxBufCnt: Receive queue length.\r
0a6f4824
LG
1103 TxBufCnt: Transmit queue length.\r
1104\r
bcecde14 1105 @param SimpleNetworkDevice Device instance\r
0a6f4824 1106 @param PxeUndiTable Point to structure which hold parameter and return value\r
bcecde14 1107 for option ROM call.\r
0a6f4824
LG
1108\r
1109 @return Return value of PXE option ROM far call.\r
bcecde14 1110**/\r
1111EFI_STATUS\r
1112PxeUndiGetInformation (\r
1113 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
1114 IN OUT PXENV_UNDI_GET_INFORMATION_T *PxeUndiTable\r
1115 )\r
1116;\r
1117\r
1118/**\r
0a6f4824 1119 PXE\r
bcecde14 1120 UNDI GET STATISTICS\r
1121 Op-Code: PXENV_UNDI_GET_STATISTICS (000Dh)\r
1122 Input: Far pointer to a PXENV_UNDI_GET_STATISTICS_T parameter structure that has been initialized\r
1123 by the caller.\r
1124 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
1125 the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx\r
1126 constants.\r
1127 Description: This call reads statistical information from the network adapter, and returns.\r
1128 typedef struct {\r
1129 PXENV_STATUS Status;\r
1130 UINT32 XmtGoodFrames;\r
1131 UINT32 RcvGoodFrames;\r
1132 UINT32 RcvCRCErrors;\r
1133 UINT32 RcvResourceErrors;\r
1134 } PXENV_UNDI_GET_STATISTICS_T;\r
1135 Set before calling API service\r
1136 N/A\r
1137 Returned from API service\r
1138 Status: See the PXENV_STATUS_xxx constants.\r
1139 XmtGoodFrames: Number of successful transmissions.\r
1140 RcvGoodFrames: Number of good frames received.\r
1141 RcvCRCErrors: Number of frames received with CRC\r
1142 error.\r
1143 RcvResourceErrors: Number of frames discarded\r
1144 because receive queue was full.\r
0a6f4824 1145\r
bcecde14 1146 @param SimpleNetworkDevice Device instance\r
0a6f4824 1147 @param PxeUndiTable Point to structure which hold parameter and return value\r
bcecde14 1148 for option ROM call.\r
0a6f4824
LG
1149\r
1150 @return Return value of PXE option ROM far call.\r
bcecde14 1151**/\r
1152EFI_STATUS\r
1153PxeUndiGetStatistics (\r
1154 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
1155 IN OUT PXENV_UNDI_GET_STATISTICS_T *PxeUndiTable\r
1156 )\r
1157;\r
1158\r
1159/**\r
0a6f4824 1160 PXE\r
bcecde14 1161 UNDI CLEAR STATISTICS\r
1162 Op-Code: PXENV_UNDI_CLEAR_STATISTICS (000Eh)\r
1163 Input: Far pointer to a PXENV_UNDI_CLEAR_STATISTICS_T parameter.\r
1164 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
1165 the parameter structure must be set to one of the values represented by the\r
1166 PXENV_STATUS_xxx constants.\r
1167 Description: This call clears the statistical information from the network adapter.\r
1168 typedef struct {\r
1169 PXENV_STATUS Status;\r
1170 } PXENV_UNDI_CLEAR_STATISTICS_T;\r
1171 Set before calling API service\r
1172 N/A\r
1173 Returned from API service\r
1174 Status: See the PXENV_STATUS_xxx constants.\r
0a6f4824 1175\r
bcecde14 1176 @param SimpleNetworkDevice Device instance\r
0a6f4824 1177 @param PxeUndiTable Point to structure which hold parameter and return value\r
bcecde14 1178 for option ROM call.\r
0a6f4824
LG
1179\r
1180 @return Return value of PXE option ROM far call.\r
bcecde14 1181**/\r
1182EFI_STATUS\r
1183PxeUndiClearStatistics (\r
1184 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
1185 IN OUT PXENV_UNDI_CLEAR_STATISTICS_T *PxeUndiTable\r
1186 )\r
1187;\r
1188\r
bcecde14 1189\r
1190/**\r
0a6f4824 1191 PXE\r
bcecde14 1192 UNDI GET MULTICAST ADDRESS\r
1193 Op-Code: PXENV_UNDI_GET_MCAST_ADDRESS (0011h)\r
1194 Input: Far pointer to a PXENV_GET_MCAST_ADDRESS_t parameter structure that has been initialized\r
1195 by the caller.\r
1196 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
1197 the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx\r
1198 constants.\r
1199 Description: This call converts the given IP multicast address to a hardware multicast address.\r
1200 typedef struct {\r
1201 PXENV_STATUS Status;\r
1202 IP4 InetAddr;\r
1203 MAC_ADDR MediaAddr;\r
1204 } PXENV_UNDI_GET_MCAST_ADDR_T;\r
1205 Set before calling API service\r
1206 InetAddr: IP multicast address.\r
1207 Returned from API service\r
1208 Status: See the PXENV_STATUS_xxx constants.\r
1209 MediaAddr: MAC multicast address.\r
0a6f4824 1210\r
bcecde14 1211 @param SimpleNetworkDevice Device instance\r
0a6f4824 1212 @param PxeUndiTable Point to structure which hold parameter and return value\r
bcecde14 1213 for option ROM call.\r
0a6f4824
LG
1214\r
1215 @return Return value of PXE option ROM far call.\r
bcecde14 1216**/\r
1217EFI_STATUS\r
1218PxeUndiGetMcastAddr (\r
1219 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
1220 IN OUT PXENV_UNDI_GET_MCAST_ADDR_T *PxeUndiTable\r
1221 )\r
1222;\r
1223\r
1224/**\r
0a6f4824 1225 PXE\r
bcecde14 1226 UNDI GET NIC TYPE\r
1227 Op-Code: PXENV_UNDI_GET_NIC_TYPE (0012h)\r
1228 Input: Far pointer to a PXENV_UNDI_GET_NIC_TYPE_T parameter structure that has been initialized by\r
1229 the caller.\r
1230 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
1231 the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx\r
1232 constants. If the PXENV_EXIT_SUCCESS is returned the parameter structure must contain the\r
1233 NIC information.\r
1234 Description: This call, if successful, provides the NIC-specific information necessary to identify the network\r
1235 adapter that is used to boot the system.\r
1236 Note: The application first gets the DHCPDISCOVER packet using GET_CACHED_INFO and checks if\r
1237 the UNDI is supported before making this call. If the UNDI is not supported, the NIC-specific\r
1238 information can be obtained from the DHCPDISCOVER packet itself.\r
1239 PXENV_START_UNDI, PXENV_UNDI_STARTUP and PXENV_UNDI_INITIALIZE must be called\r
1240 before the information provided is valid.\r
1241 typedef {\r
1242 PXENV_STATUS Status;\r
1243 UINT8 NicType;\r
1244 #define PCI_NIC 2\r
1245 #define PnP_NIC 3\r
1246 #define CardBus_NIC 4\r
1247 Union {\r
1248 Struct {\r
1249 UINT16 Vendor_ID;\r
1250 UINT16 Dev_ID;\r
1251 UINT8 Base_Class;\r
1252 UINT8 Sub_Class;\r
1253 UINT8 Prog_Intf;\r
1254 UINT8 Rev;\r
1255 UINT16 BusDevFunc;\r
1256 UINT16 SubVendor_ID;\r
1257 UINT16 SubDevice_ID;\r
1258 } pci, cardbus;\r
1259 struct {\r
1260 UINT32 EISA_Dev_ID;\r
1261 UINT8 Base_Class;\r
1262 UINT8 Sub_Class;\r
1263 UINT8 Prog_Intf;\r
1264 UINT16 CardSelNum;\r
1265 } pnp;\r
1266 } info;\r
1267 } PXENV_UNDI_GET_NIC_TYPE_T;\r
1268 Set before calling API service\r
1269 N/A\r
1270 Returned from API service\r
1271 Status: See the PXENV_STATUS_xxx constants.\r
1272 NICType: Type of NIC information stored in the parameter\r
1273 structure.\r
1274 Info: Information about the fields in this union can be found\r
0a6f4824
LG
1275 in the [PnP] and [PCI] specifications\r
1276\r
bcecde14 1277 @param SimpleNetworkDevice Device instance\r
0a6f4824 1278 @param PxeUndiTable Point to structure which hold parameter and return value\r
bcecde14 1279 for option ROM call.\r
0a6f4824
LG
1280\r
1281 @return Return value of PXE option ROM far call.\r
bcecde14 1282**/\r
1283EFI_STATUS\r
1284PxeUndiGetNicType (\r
1285 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
1286 IN OUT PXENV_UNDI_GET_NIC_TYPE_T *PxeUndiTable\r
1287 )\r
1288;\r
1289\r
1290/**\r
0a6f4824 1291 PXE\r
bcecde14 1292 UNDI GET IFACE INFO\r
1293 Op-Code: PXENV_UNDI_GET_IFACE_INFO (0013h)\r
1294 Input: Far pointer to a PXENV_UNDI_GET_IFACE_INFO_t parameter structure that has been initialized\r
1295 by the caller.\r
1296 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
1297 the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx\r
1298 constants. If the PXENV_EXIT_SUCCESS is returned, the parameter structure must contain the\r
1299 interface specific information.\r
1300 Description: This call, if successful, provides the network interface specific information such as the interface\r
1301 type at the link layer (Ethernet, Tokenring) and the link speed. This information can be used in the\r
1302 universal drivers such as NDIS or Miniport to communicate to the upper protocol modules.\r
1303 Note: UNDI follows the NDIS2 specification in giving this information. It is the responsibility of the\r
1304 universal driver to translate/convert this information into a format that is required in its specification\r
1305 or to suit the expectation of the upper level protocol modules.\r
1306 PXENV_START_UNDI, PXENV_UNDI_STARTUP and PXENV_UNDI_INITIALIZE must be called\r
1307 before the information provided is valid.\r
1308 typedef struct {\r
1309 PXENV_STATUS Status\r
1310 UINT8 IfaceType[16];\r
1311 UINT32 LinkSpeed;\r
1312 UINT32 ServiceFlags;\r
1313 UINT32 Reserved[4];\r
1314 } PXENV_UNDI_GET_NDIS_INFO_T;\r
1315 Set before calling API service\r
1316 N/A\r
1317 Returned from API service\r
1318 Status: See the PXENV_STATUS_xxx constants.\r
1319 IfaceType: Name of MAC type in ASCIIZ format. This is\r
1320 used by the universal NDIS driver to specify its driver type\r
1321 to the protocol driver.\r
1322 LinkSpeed: Defined in the NDIS 2.0 specification.\r
1323 ServiceFlags: Defined in the NDIS 2.0 specification.\r
0a6f4824
LG
1324 Reserved: Must be zero.\r
1325\r
bcecde14 1326 @param SimpleNetworkDevice Device instance\r
0a6f4824 1327 @param PxeUndiTable Point to structure which hold parameter and return value\r
bcecde14 1328 for option ROM call.\r
0a6f4824
LG
1329\r
1330 @return Return value of PXE option ROM far call.\r
bcecde14 1331**/\r
1332EFI_STATUS\r
1333PxeUndiGetNdisInfo (\r
1334 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
1335 IN OUT PXENV_UNDI_GET_NDIS_INFO_T *PxeUndiTable\r
1336 )\r
1337;\r
1338\r
1339/**\r
0a6f4824 1340 PXE\r
bcecde14 1341 UNDI ISR\r
1342 Op-Code: PXENV_UNDI_ISR (0014h)\r
1343 Input: Far pointer to a PXENV_UNDI_ISR_T parameter structure that has been initialized by the caller.\r
1344 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
1345 the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx\r
1346 constants.\r
1347 Description: This API function will be called at different levels of processing the interrupt. The FuncFlag field in\r
1348 the parameter block indicates the operation to be performed for the call. This field is filled with the\r
1349 status of that operation on return.\r
1350 Note: Interrupt Service Routine Operation:\r
1351 In this design the UNDI does not hook the interrupt for the Network Interface. Instead, the\r
1352 application or the protocol driver hooks the interrupt and calls UNDI with the PXENV_UNDI_ISR\r
1353 API call for interrupt verification (PXENV_UNDI_ISR_IN_START) and processing\r
1354 (PXENV_UNDI_ISR_IN_PROCESS and PXENV_UNDI_ISR_GET_NEXT).\r
1355 When the Network Interface HW generates an interrupt the protocol driver interrupt service\r
1356 routine (ISR) gets control and takes care of the interrupt processing at the PIC level. The ISR then\r
1357 calls the UNDI using the PXENV_UNDI_ISR API with the value PXENV_UNDI_ISR_IN_START for\r
1358 the FuncFlag parameter. At this time UNDI must disable the interrupts at the Network Interface\r
1359 level and read any status values required to further process the interrupt. UNDI must return as\r
1360 quickly as possible with one of the two values, PXENV_UNDI_ISR_OUT_OURS or\r
1361 PXENV_UNDI_ISR_OUT_NOT_OURS, for the parameter FuncFlag depending on whether the\r
1362 interrupt was generated by this particular Network Interface or not.\r
1363 If the value returned in FuncFlag is PXENV_UNDI_ISR_OUT_NOT_OURS, then the interrupt was\r
1364 not generated by our NIC, and interrupt processing is complete.\r
1365 If the value returned in FuncFlag is PXENV_UNDI_ISR_OUT_OURS, the protocol driver must start\r
1366 a handler thread and send an end-of-interrupt (EOI) command to the PIC. Interrupt processing is\r
1367 now complete.\r
1368 The protocol driver strategy routine will call UNDI using this same API with FuncFlag equal to\r
1369 PXENV_UNDI_ISR_IN_PROCESS. At this time UNDI must find the cause of this interrupt and\r
1370 return the status in the FuncFlag. It first checks if there is a frame received and if so it returns the\r
1371 first buffer pointer of that frame in the parameter block.\r
1372 The protocol driver calls UNDI repeatedly with the FuncFlag equal to\r
1373 PXENV_UNDI_ISR_IN_GET_NEXT to get all the buffers in a frame and also all the received\r
1374 frames in the queue. On this call, UNDI must remember the previous buffer given to the protoco,l\r
1375 remove it from the receive queue and recycle it. In case of a multi-buffered frame, if the previous\r
1376 buffer is not the last buffer in the frame it must return the next buffer in the frame in the parameter\r
1377 block. Otherwise it must return the first buffer in the next frame.\r
1378 If there is no received frame pending to be processed, UNDI processes the transmit completes and\r
1379 if there is no other interrupt status to be processed, UNDI re-enables the interrupt at the\r
1380 NETWORK INTERFACE level and returns PXENV_UNDI_ISR_OUT_DONE in the FuncFlag.\r
1381 IMPORTANT: It is possible for the protocol driver to be interrupted again while in the\r
0a6f4824
LG
1382 strategy routine when the UNDI re-enables interrupts.\r
1383\r
bcecde14 1384 @param SimpleNetworkDevice Device instance\r
0a6f4824 1385 @param PxeUndiTable Point to structure which hold parameter and return value\r
bcecde14 1386 for option ROM call.\r
0a6f4824
LG
1387\r
1388 @return Return value of PXE option ROM far call.\r
bcecde14 1389**/\r
1390EFI_STATUS\r
1391PxeUndiIsr (\r
1392 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
1393 IN OUT PXENV_UNDI_ISR_T *PxeUndiTable\r
1394 )\r
1395;\r
1396\r
1397/**\r
0a6f4824 1398 PXE\r
bcecde14 1399 STOP UNDI\r
1400 Op-Code: PXENV_STOP_UNDI (0015h)\r
1401 Input: Far pointer to a PXENV_STOP_UNDI_T parameter structure that has been initialized by the caller.\r
1402 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
1403 the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx\r
1404 constants.\r
1405 Description: This routine is responsible for unhooking the Int 1Ah service routine.\r
1406 Note: This API service must be called only once at the end of UNDI Option ROM boot. One of the valid\r
1407 status codes is PXENV_STATUS_KEEP. If this status is returned, UNDI must not be removed from\r
1408 base memory. Also, UNDI must not be removed from base memory if BC is not removed from base\r
1409 memory.\r
1410 Service cannot be used in protected mode.\r
1411 typedef struct {\r
1412 PXENV_STATUS Status;\r
1413 } PXENV_STOP_UNDI_T;\r
1414 Set before calling API service\r
1415 N/A\r
1416 Returned from API service\r
0a6f4824
LG
1417 Status: See the PXENV_STATUS_xxx constants.\r
1418\r
bcecde14 1419 @param SimpleNetworkDevice Device instance\r
0a6f4824 1420 @param PxeUndiTable Point to structure which hold parameter and return value\r
bcecde14 1421 for option ROM call.\r
0a6f4824
LG
1422\r
1423 @return Return value of PXE option ROM far call.\r
bcecde14 1424**/\r
1425EFI_STATUS\r
1426PxeUndiStop (\r
1427 IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
1428 IN OUT PXENV_STOP_UNDI_T *PxeUndiTable\r
1429 )\r
1430;\r
1431\r
bcecde14 1432\r
1433/**\r
1434 Effect the Far Call into the PXE Layer\r
1435\r
1436 Note: When using a 32-bit stack segment do not push 32-bit words onto the stack. The PXE API\r
1437 services will not work, unless there are three 16-bit parameters pushed onto the stack.\r
1438 push DS ;Far pointer to parameter structure\r
1439 push offset pxe_data_call_struct ;is pushed onto stack.\r
1440 push Index ;UINT16 is pushed onto stack.\r
1441 call dword ptr (s_PXE ptr es:[di]).EntryPointSP\r
0a6f4824 1442 add sp, 6 ;Caller cleans up stack.\r
bcecde14 1443\r
1444 @param SimpleNetworkDevice Device instance for simple network\r
1445 @param Table Point to parameter/retun value table for legacy far call\r
70d3fe9d 1446 @param TableSize The size of parameter/return value table\r
bcecde14 1447 @param CallIndex The index of legacy call.\r
0a6f4824
LG
1448\r
1449 @return EFI_STATUS\r
bcecde14 1450**/\r
1451EFI_STATUS\r
1452MakePxeCall (\r
1453 EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
1454 IN OUT VOID *Table,\r
1455 IN UINTN TableSize,\r
1456 IN UINT16 CallIndex\r
1457 )\r
1458;\r
1459\r
1460/**\r
1461 Allocate buffer below 1M for real mode.\r
1462\r
1463 @param NumPages The number pages want to be allocated.\r
1464 @param Buffer On return, allocated buffer.\r
0a6f4824 1465\r
bcecde14 1466 @return Status of allocating pages.\r
1467**/\r
1468EFI_STATUS\r
1469BiosSnp16AllocatePagesBelowOneMb (\r
1470 UINTN NumPages,\r
1471 VOID **Buffer\r
1472 )\r
1473;\r
1474\r
1475#endif\r