+++ /dev/null
-/** @file\r
- Wrapper routines that use a PXE-enabled NIC option ROM to\r
- supply internal routines for an EFI SNI (Simple Network\r
- Interface) Protocol.\r
-\r
- This file relies upon the existence of a PXE-compliant ROM\r
- in memory, as defined by the Preboot Execution Environment\r
- Specification (PXE), Version 2.1, located at\r
-\r
- http://developer.intel.com/ial/wfm/wfmspecs.htm\r
-\r
-Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.<BR>\r
-\r
-SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-**/\r
-\r
-#include "BiosSnp16.h"\r
-\r
-/**\r
- PXE\r
- START UNDI\r
- Op-Code: PXENV_START_UNDI (0000h)\r
- Input: Far pointer to a PXENV_START_UNDI_T parameter structure that has been initialized by the caller.\r
- Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
- the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx\r
- constants.\r
- Description: This service is used to pass the BIOS parameter registers to the UNDI driver. The UNDI driver is\r
- responsible for saving the information it needs to communicate with the hardware.\r
- This service is also responsible for hooking the Int 1Ah service routine\r
- Note: This API service must be called only once during UNDI Option ROM boot.\r
- The UNDI driver is responsible for saving this information and using it every time\r
- PXENV_UNDI_STARTUP is called.\r
- Service cannot be used in protected mode.\r
- typedef struct {\r
- PXENV_STATUS Status;\r
- UINT16 AX;\r
- UINT16 BX;\r
- UINT16 DX;\r
- UINT16 DI;\r
- UINT16 ES;\r
- } PXENV_START_UNDI_T;\r
- Set before calling API service\r
- AX, BX, DX, DI, ES: BIOS initialization parameter registers. These\r
- fields should contain the same information passed to the option ROM\r
- initialization routine by the Host System BIOS. Information about the\r
- contents of these registers can be found in the [PnP], [PCI] and\r
- [BBS] specifications.\r
- Returned from API service\r
- Status: See the PXENV_STATUS_xxx constants.\r
-\r
- @param SimpleNetworkDevice Device instance\r
- @param PxeUndiTable Point to structure which hold parameter and return value\r
- for option ROM call.\r
-\r
- @return Return value of PXE option ROM far call.\r
-**/\r
-EFI_STATUS\r
-PxeStartUndi (\r
- IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
- IN OUT PXENV_START_UNDI_T *PxeUndiTable\r
- )\r
-{\r
- return MakePxeCall (\r
- SimpleNetworkDevice,\r
- PxeUndiTable,\r
- sizeof (PXENV_START_UNDI_T),\r
- PXENV_START_UNDI\r
- );\r
-}\r
-\r
-/**\r
- PXE\r
- UNDI STARTUP\r
- Op-Code: PXENV_UNDI_STARTUP (0001h)\r
- Input: Far pointer to a PXENV_UNDI_STARTUP_T parameter structure that has been initialized by the\r
- caller.\r
- Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
- the parameter structure must be set to one of the values represented by the\r
- PXENV_STATUS_xxx constants.\r
- Description: This API is responsible for initializing the contents of the UNDI code & data segment for proper\r
- operation. Information from the !PXE structure and the first PXENV_START_UNDI API call is used\r
- to complete this initialization. The rest of the UNDI APIs will not be available until this call has\r
- been completed.\r
- Note: PXENV_UNDI_STARTUP must not be called again without first calling\r
- PXENV_UNDI_SHUTDOWN.\r
- PXENV_UNDI_STARTUP and PXENV_UNDI_SHUTDOWN are no longer responsible for\r
- chaining interrupt 1Ah. This must be done by the PXENV_START_UNDI and\r
- PXENV_STOP_UNDI API calls.\r
- This service cannot be used in protected mode.\r
- typedef struct\r
- {\r
- PXENV_STATUS Status;\r
- } PXENV_UNDI_STARTUP_T;\r
- Set before calling API service\r
- N/A\r
- Returned from API service\r
- Status: See the PXENV_STATUS_xxx constants.\r
-\r
- @param SimpleNetworkDevice Device instance\r
- @param PxeUndiTable Point to structure which hold parameter and return value\r
- for option ROM call.\r
-\r
- @return Return value of PXE option ROM far call.\r
-**/\r
-EFI_STATUS\r
-PxeUndiStartup (\r
- IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
- IN OUT PXENV_UNDI_STARTUP_T *PxeUndiTable\r
- )\r
-{\r
- return MakePxeCall (\r
- SimpleNetworkDevice,\r
- PxeUndiTable,\r
- sizeof (PXENV_UNDI_STARTUP_T),\r
- PXENV_UNDI_STARTUP\r
- );\r
-}\r
-\r
-/**\r
- PXE\r
- UNDI CLEANUP\r
- Op-Code: PXENV_UNDI_CLEANUP (0002h)\r
- Input: Far pointer to a PXENV_UNDI_CLEANUP_T parameter structure.\r
- Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field\r
- in the parameter structure must be set to one of the values represented by the\r
- PXENV_STATUS_xxx constants.\r
- Description: This call will prepare the network adapter driver to be unloaded from memory. This call must be\r
- made just before unloading the Universal NIC Driver. The rest of the API will not be available\r
- after this call executes.\r
- This service cannot be used in protected mode.\r
- typedef struct {\r
- PXENX_STATUS Status;\r
- } PXENV_UNDI_CLEANUP_T;\r
- Set before calling API service\r
- N/A\r
- Returned from API service\r
- Status: See the PXENV_STATUS_xxx constants.\r
-\r
- @param SimpleNetworkDevice Device instance\r
- @param PxeUndiTable Point to structure which hold parameter and return value\r
- for option ROM call.\r
-\r
- @return Return value of PXE option ROM far call.\r
-**/\r
-EFI_STATUS\r
-PxeUndiCleanup (\r
- IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
- IN OUT PXENV_UNDI_CLEANUP_T *PxeUndiTable\r
- )\r
-{\r
- return MakePxeCall (\r
- SimpleNetworkDevice,\r
- PxeUndiTable,\r
- sizeof (PXENV_UNDI_CLEANUP_T),\r
- PXENV_UNDI_CLEANUP\r
- );\r
-}\r
-\r
-/**\r
- PXE\r
- UNDI INITIALIZE\r
- Op-Code: PXENV_UNDI_INITIALIZE (0003h)\r
- Input: Far pointer to a PXENV_UNDI_INITIALIZE_T parameter structure that has been initialized by the\r
- caller.\r
- Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
- the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx\r
- constants.\r
- Description: This call resets the adapter and programs it with default parameters. The default parameters used\r
- are those supplied to the most recent UNDI_STARTUP call. This routine does not enable the\r
- receive and transmit units of the network adapter to readily receive or transmit packets. The\r
- application must call PXENV_UNDI_OPEN to logically connect the network adapter to the network.\r
- This call must be made by an application to establish an interface to the network adapter driver.\r
- Note: When the PXE code makes this call to initialize the network adapter, it passes a NULL pointer for\r
- the Protocol field in the parameter structure.\r
- typedef struct {\r
- PXENV_STATUS Status;\r
- ADDR32 ProtocolIni;\r
- UINT8 reserved[8];\r
- } PXENV_UNDI_INITIALIZE_T;\r
- Set before calling API service\r
- ProtocolIni: Physical address of a memory copy of the driver\r
- module from the protocol.ini file obtained from the protocol manager\r
- driver (refer to the NDIS 2.0 specification). This parameter is\r
- supported for the universal NDIS driver to pass the information\r
- contained in the protocol.ini file to the NIC driver for any specific\r
- configuration of the NIC. (Note that the module identification in the\r
- protocol.ini file was done by NDIS.) This value can be NULL for any\r
- other application interfacing to the universal NIC driver\r
- Returned from API service\r
- Status: See the PXENV_STATUS_xxx constants.\r
-\r
- @param SimpleNetworkDevice Device instance\r
- @param PxeUndiTable Point to structure which hold parameter and return value\r
- for option ROM call.\r
-\r
- @return Return value of PXE option ROM far call.\r
-**/\r
-EFI_STATUS\r
-PxeUndiInitialize (\r
- IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
- IN OUT PXENV_UNDI_INITIALIZE_T *PxeUndiTable\r
- )\r
-{\r
- return MakePxeCall (\r
- SimpleNetworkDevice,\r
- PxeUndiTable,\r
- sizeof (PXENV_UNDI_INITIALIZE_T),\r
- PXENV_UNDI_INITIALIZE\r
- );\r
-}\r
-\r
-/**\r
- Wrapper routine for reset adapter.\r
-\r
- PXE\r
- UNDI RESET ADAPTER\r
- Op-Code: PXENV_UNDI_RESET_ADAPTER (0004h)\r
- Input: Far pointer to a PXENV_UNDI_RESET_ADAPTER_t parameter structure that has been initialized\r
- by the caller.\r
- Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
- the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx\r
- constants.\r
- Description: This call resets and reinitializes the network adapter with the same set of parameters supplied to\r
- Initialize Routine. Unlike Initialize, this call opens the adapter that is, it connects logically to the\r
- network. This routine cannot be used to replace Initialize or Shutdown calls.\r
- typedef struct {\r
- PXENV_STATUS Status;\r
- PXENV_UNDI_MCAST_ADDRESS_t R_Mcast_Buf;\r
- } PXENV_UNDI_RESET_T;\r
-\r
- #define MAXNUM_MCADDR 8\r
-\r
- typedef struct {\r
- UINT16 MCastAddrCount;\r
- MAC_ADDR McastAddr[MAXNUM_MCADDR];\r
- } PXENV_UNDI_MCAST_ADDRESS_t;\r
-\r
- Set before calling API service\r
- R_Mcast_Buf: This is a structure of MCastAddrCount and\r
- McastAddr.\r
- MCastAddrCount: Number of multicast MAC addresses in the\r
- buffer.\r
- McastAddr: List of up to MAXNUM_MCADDR multicast MAC\r
- addresses.\r
- Returned from API service\r
- Status: See the PXENV_STATUS_xxx constants.\r
-\r
- @param SimpleNetworkDevice Device instance.\r
- @param PxeUndiTable Point to structure which hold parameter and return value\r
- for option ROM call.\r
- @param RxFilter Filter setting mask value for PXE recive .\r
-\r
- @return Return value of PXE option ROM far call.\r
-**/\r
-EFI_STATUS\r
-PxeUndiResetNic (\r
- IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
- IN OUT PXENV_UNDI_RESET_T *PxeUndiTable,\r
- IN UINT16 RxFilter\r
- )\r
-{\r
- PXENV_UNDI_OPEN_T Open;\r
- PXENV_UNDI_CLOSE_T Close;\r
- UINTN Status;\r
-\r
- Status = MakePxeCall (\r
- SimpleNetworkDevice,\r
- PxeUndiTable,\r
- sizeof (PXENV_UNDI_RESET_T),\r
- PXENV_UNDI_RESET_NIC\r
- );\r
- if (!EFI_ERROR(Status)) {\r
- return Status;\r
- }\r
-\r
- Close.Status = PXENV_STATUS_SUCCESS;\r
-\r
- Status = MakePxeCall (\r
- SimpleNetworkDevice,\r
- &Close,\r
- sizeof (Close),\r
- PXENV_UNDI_CLOSE\r
- );\r
- if (EFI_ERROR(Status)) {\r
- return EFI_DEVICE_ERROR;\r
- }\r
-\r
- Status = MakePxeCall (\r
- SimpleNetworkDevice,\r
- PxeUndiTable,\r
- sizeof (PXENV_UNDI_RESET_T),\r
- PXENV_UNDI_RESET_NIC\r
- );\r
- if (EFI_ERROR(Status)) {\r
- return EFI_DEVICE_ERROR;\r
- }\r
-\r
- Open.Status = PXENV_STATUS_SUCCESS;\r
- Open.OpenFlag = 0;\r
- Open.PktFilter = RxFilter;\r
- CopyMem (\r
- &Open.McastBuffer,\r
- &PxeUndiTable->R_Mcast_Buf,\r
- sizeof (PXENV_UNDI_MCAST_ADDR_T)\r
- );\r
-\r
-\r
- Status = MakePxeCall (\r
- SimpleNetworkDevice,\r
- &Open,\r
- sizeof (Open),\r
- PXENV_UNDI_OPEN\r
- );\r
- if (EFI_ERROR(Status)) {\r
- return EFI_DEVICE_ERROR;\r
- }\r
-\r
- return EFI_SUCCESS;\r
-}\r
-\r
-/**\r
- PXE\r
- UNDI SHUTDOWN\r
- Op-Code: PXENV_UNDI_SHUTDOWN (0005h)\r
- Input: Far pointer to a PXENV_UNDI_SHUTDOWN_T parameter.\r
- Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
- the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx\r
- constants.\r
- Description: This call resets the network adapter and leaves it in a safe state for another driver to program it.\r
- Note: The contents of the PXENV_UNDI_STARTUP parameter structure need to be saved by the\r
- Universal NIC Driver in case PXENV_UNDI_INITIALIZE is called again.\r
- typedef struct\r
- {\r
- PXENV_STATUS Status;\r
- } PXENV_UNDI_SHUTDOWN_T;\r
- Set before calling API service\r
- N/A\r
- Returned from API service\r
- Status: See the PXENV_STATUS_xxx constants.\r
-\r
- @param SimpleNetworkDevice Device instance\r
- @param PxeUndiTable Point to structure which hold parameter and return value\r
- for option ROM call.\r
-\r
- @return Return value of PXE option ROM far call.\r
-**/\r
-EFI_STATUS\r
-PxeUndiShutdown (\r
- IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
- IN OUT PXENV_UNDI_SHUTDOWN_T *PxeUndiTable\r
- )\r
-{\r
- return MakePxeCall (\r
- SimpleNetworkDevice,\r
- PxeUndiTable,\r
- sizeof (PXENV_UNDI_SHUTDOWN_T),\r
- PXENV_UNDI_SHUTDOWN\r
- );\r
-}\r
-\r
-/**\r
- PXE\r
- UNDI OPEN\r
- Op-Code: PXENV_UNDI_OPEN (0006h)\r
- Input: Far pointer to a PXENV_UNDI_OPEN_T parameter structure that has been initialized by the caller.\r
- Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
- the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx\r
- constants.\r
- Description: This call activates the adapter network connection and sets the adapter ready to accept packets\r
- for transmit and receive.\r
- typedef struct {\r
- PXENV_STATUS Status;\r
- UINT16 OpenFlag;\r
- UINT16 PktFilter;\r
- #define FLTR_DIRECTED 0x0001\r
- #define FLTR_BRDCST 0x0002\r
- #define FLTR_PRMSCS 0x0004\r
- #define FLTR_SRC_RTG 0x0008\r
- PXENV_UNDI_MCAST_ADDRESS_t R_Mcast_Buf;\r
- } PXENV_UNDI_OPEN_T;\r
- Set before calling API service\r
- OpenFlag: This is an adapter specific input parameter. This is\r
- supported for the universal NDIS 2.0 driver to pass in the open flags\r
- provided by the protocol driver. (See the NDIS 2.0 specification.)\r
- This can be zero.\r
- PktFilter: Filter for receiving packets. This can be one, or more, of\r
- the FLTR_xxx constants. Multiple values are arithmetically or-ed\r
- together.\r
- directed packets are packets that may come to your MAC address\r
- or the multicast MAC address.\r
- R_Mcast_Buf: See definition in UNDI RESET ADAPTER (0004h).\r
- Returned from API service\r
- Status: See the PXENV_STATUS_xxx constants.\r
-\r
- @param SimpleNetworkDevice Device instance\r
- @param PxeUndiTable Point to structure which hold parameter and return value\r
- for option ROM call.\r
-\r
- @return Return value of PXE option ROM far call.\r
-**/\r
-EFI_STATUS\r
-PxeUndiOpen (\r
- IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
- IN OUT PXENV_UNDI_OPEN_T *PxeUndiTable\r
- )\r
-{\r
- return MakePxeCall (\r
- SimpleNetworkDevice,\r
- PxeUndiTable,\r
- sizeof (PXENV_UNDI_OPEN_T),\r
- PXENV_UNDI_OPEN\r
- );\r
-}\r
-\r
-/**\r
- PXE\r
- UNDI CLOSE\r
- Op-Code: PXENV_UNDI_CLOSE (0007h)\r
- Input: Far pointer to a PXENV_UNDI_CLOSE_T parameter.\r
- Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
- the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx\r
- constants.\r
- Description: This call disconnects the network adapter from the network. Packets cannot be transmitted or\r
- received until the network adapter is open again.\r
- typedef struct {\r
- PXENV_STATUS Status;\r
- } PXENV_UNDI_CLOSE_T;\r
- Set before calling API service\r
- N/A\r
- Returned from API service\r
- Status: See the PXENV_STATUS_xxx constants.\r
-\r
- @param SimpleNetworkDevice Device instance\r
- @param PxeUndiTable Point to structure which hold parameter and return value\r
- for option ROM call.\r
-\r
- @return Return value of PXE option ROM far call.\r
-**/\r
-EFI_STATUS\r
-PxeUndiClose (\r
- IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
- IN OUT PXENV_UNDI_CLOSE_T *PxeUndiTable\r
- )\r
-{\r
- return MakePxeCall (\r
- SimpleNetworkDevice,\r
- PxeUndiTable,\r
- sizeof (PXENV_UNDI_CLOSE_T),\r
- PXENV_UNDI_CLOSE\r
- );\r
-}\r
-\r
-/**\r
- PXE\r
- UNDI TRANSMIT PACKET\r
- Op-Code: PXENV_UNDI_TRANSMIT (0008h)\r
- Input: Far pointer to a PXENV_UNDI_TRANSMIT_T parameter structure that\r
- has been initialized by the caller.\r
- Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX.\r
- The status code must be set to one of the values represented by the\r
- PXENV_STATUS_xxx constants.\r
- Description: This call transmits a buffer to the network. The media header\r
- for the packet can be filled by the calling protocol, but it might not be.\r
- The network adapter driver will fill it if required by the values in the\r
- parameter block. The packet is buffered for transmission provided there is\r
- an available buffer, and the function returns PXENV_EXIT_SUCCESS. If no\r
- buffer is available the function returns PXENV_EXIT_FAILURE with a status\r
- code of PXE_UNDI_STATUS__OUT OF_RESOURCE. The number of buffers is\r
- implementation-dependent. An interrupt is generated on completion of the\r
- transmission of one or more packets. A call to PXENV_UNDI_TRANSMIT is\r
- permitted in the context of a transmit complete interrupt.\r
-\r
- typedef struct {\r
- PXENV_STATUS Status;\r
- UINT8 Protocol;\r
- #define P_UNKNOWN 0\r
- #define P_IP 1\r
- #define P_ARP 2\r
- #define P_RARP 3\r
- UINT8 XmitFlag;\r
- #define XMT_DESTADDR 0x0000\r
- #define XMT_BROADCAST 0x0001\r
- SEGOFF16 DestAddr;\r
- SEGOFF16 TBD;\r
- UINT32 Reserved[2];\r
- } t_PXENV_UNDI_TRANSMIT;\r
-\r
- #define MAX_DATA_BLKS 8\r
-\r
- typedef struct {\r
- UINT16 ImmedLength;\r
- SEGOFF16 Xmit;\r
- UINT16 DataBlkCount;\r
- struct DataBlk {\r
- UINT8 TDPtrType;\r
- UINT8 TDRsvdByte;\r
- UINT16 TDDataLen;\r
- SEGOFF16 TDDataPtr;\r
- } DataBlock[MAX_DATA_BLKS];\r
- } PXENV_UNDI_TBD_T\r
-\r
- Set before calling API service\r
- Protocol: This is the protocol of the upper layer that is calling UNDI\r
- TRANSMIT call. If the upper layer has filled the media header, this\r
- field must be P_UNKNOWN.\r
- XmitFlag: If this flag is XMT_DESTADDR, the NIC driver expects a\r
- pointer to the destination media address in the field DestAddr. If\r
- XMT_BROADCAST, the NIC driver fills the broadcast address for the\r
- destination.\r
- TBD: Segment:Offset address of the transmit buffer descriptor.\r
- ImmedLength: Length of the immediate transmit buffer: Xmit.\r
- Xmit: Segment:Offset of the immediate transmit buffer.\r
- DataBlkCount: Number of blocks in this transmit buffer.\r
- TDPtrType:\r
- 0 => 32-bit physical address in TDDataPtr (not supported in this\r
- version of PXE)\r
- 1 => segment:offset in TDDataPtr which can be a real mode or 16-bit\r
- protected mode pointer\r
- TDRsvdByte: Reserved must be zero.\r
- TDDatalen: Data block length in bytes.\r
- TDDataPtr: Segment:Offset of the transmit block.\r
- DataBlock: Array of transmit data blocks.\r
- Returned from API service\r
- Status: See the PXENV_STATUS_xxx constants\r
-\r
- @param SimpleNetworkDevice Device instance\r
- @param PxeUndiTable Point to structure which hold parameter and return value\r
- for option ROM call.\r
-\r
- @return Return value of PXE option ROM far call.\r
-**/\r
-EFI_STATUS\r
-PxeUndiTransmit (\r
- IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
- IN OUT PXENV_UNDI_TRANSMIT_T *PxeUndiTable\r
- )\r
-{\r
- EFI_STATUS Status;\r
-\r
- Status = MakePxeCall (\r
- SimpleNetworkDevice,\r
- PxeUndiTable,\r
- sizeof (PXENV_UNDI_TRANSMIT_T),\r
- PXENV_UNDI_TRANSMIT\r
- );\r
- if (Status == EFI_SUCCESS) {\r
- return EFI_SUCCESS;\r
- }\r
-\r
- switch (PxeUndiTable->Status) {\r
- case PXENV_STATUS_OUT_OF_RESOURCES:\r
- return EFI_NOT_READY;\r
-\r
- default:\r
- return EFI_DEVICE_ERROR;\r
- }\r
-}\r
-\r
-\r
-\r
-/**\r
- PXE\r
- UNDI SET STATION ADDRESS\r
- Op-Code: PXENV_UNDI_SET_STATION_ADDRESS (000Ah)\r
- Input: Far pointer to a PXENV_UNDI_SET_STATION_ADDRESS_t parameter structure that has been\r
- initialized by the caller.\r
- Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
- the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx\r
- constants.\r
- Description: This call sets the MAC address to be the input value and is called before opening the network\r
- adapter. Later, the open call uses this variable as a temporary MAC address to program the\r
- adapter individual address registers.\r
- typedef struct {\r
- PXENV_STATUS Status;\r
- MAC_ADDR StationAddress;\r
- } PXENV_UNDI_SET_STATION_ADDR_T;\r
- Set before calling API service\r
- StationAddress: Temporary MAC address to be used for\r
- transmit and receive.\r
- Returned from API service\r
- Status: See the PXENV_STATUS_xxx constants.\r
-\r
- @param SimpleNetworkDevice Device instance\r
- @param PxeUndiTable Point to structure which hold parameter and return value\r
- for option ROM call.\r
-\r
- @return Return value of PXE option ROM far call.\r
-**/\r
-EFI_STATUS\r
-PxeUndiSetStationAddr (\r
- IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
- IN OUT PXENV_UNDI_SET_STATION_ADDR_T *PxeUndiTable\r
- )\r
-{\r
- return MakePxeCall (\r
- SimpleNetworkDevice,\r
- PxeUndiTable,\r
- sizeof (PXENV_UNDI_SET_STATION_ADDR_T),\r
- PXENV_UNDI_SET_STATION_ADDR\r
- );\r
-}\r
-\r
-/**\r
- PXE\r
- UNDI SET PACKET FILTER\r
- Op-Code: PXENV_UNDI_SET_PACKET_FILTER (000Bh)\r
- Input: Far pointer to a PXENV_UNDI_SET_PACKET_FILTER_T parameter structure that has been\r
- initialized by the caller.\r
- Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
- the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx\r
- constants.\r
- Description: This call resets the adapter's receive unit to accept a new filter, different from the one provided with\r
- the open call.\r
- typedef struct {\r
- PXENV_STATUS Status;\r
- UINT8 filter;\r
- } PXENV_UNDI_SET_PACKET_FILTER_T;\r
- Set before calling API service\r
- Filter: See the receive filter values in the UNDI OPEN\r
- (0006h) API description.\r
- Returned from API service\r
- Status: See the PXENV_STATUS_xxx constants.\r
-\r
- @param SimpleNetworkDevice Device instance\r
- @param PxeUndiTable Point to structure which hold parameter and return value\r
- for option ROM call.\r
-\r
- @return Return value of PXE option ROM far call.\r
-**/\r
-\r
-/**\r
- PXE\r
- UNDI GET INFORMATION\r
- Op-Code: PXENV_UNDI_GET_INFORMATION (000Ch)\r
- Input: Far pointer to a PXENV_UNDI_GET_INFORMATION_T parameter structure that has been\r
- initialized by the caller.\r
- Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
- the parameter structure must be set to one of the values represented by the\r
- PXENV_STATUS_xxx constants.\r
- Description: This call copies the network adapter variables, including the MAC address, into the input buffer.\r
- Note: The PermNodeAddress field must be valid after PXENV_START_UNDI and\r
- PXENV_UNDI_STARTUP have been issued. All other fields must be valid after\r
- PXENV_START_UNDI, PXENV_UNDI_STARTUP and PXENV_UNDI_INITIALIZE have been\r
- called.\r
- typedef struct {\r
- PXENV_STATUS Status;\r
- UINT16 BaseIo;\r
- UINT16 IntNumber;\r
- UINT16 MaxTranUnit;\r
- UINT16 HwType;\r
- #define ETHER_TYPE 1\r
- #define EXP_ETHER_TYPE 2\r
- #define IEEE_TYPE 6\r
- #define ARCNET_TYPE 7\r
- UINT16 HwAddrLen;\r
- MAC_ADDR CurrentNodeAddress;\r
- MAC_ADDR PermNodeAddress;\r
- SEGSEL ROMAddress;\r
- UINT16 RxBufCt;\r
- UINT16 TxBufCt;\r
- } PXENV_UNDI_GET_INFORMATION_T;\r
- Set before calling API service\r
- N/A\r
- Returned from API service\r
- Status: See the PXENV_STATUS_xxx constants.\r
- BaseIO: Adapter base I/O address.\r
- IntNumber: Adapter IRQ number.\r
- MaxTranUnit: Adapter maximum transmit unit.\r
- HWType: Type of protocol at the hardware level.\r
- HWAddrLen: Length of the hardware address.\r
- CurrentNodeAddress: Current hardware address.\r
- PermNodeAddress: Permanent hardware address.\r
- ROMAddress: Real mode ROM segment address.\r
- RxBufCnt: Receive queue length.\r
- TxBufCnt: Transmit queue length.\r
-\r
- @param SimpleNetworkDevice Device instance\r
- @param PxeUndiTable Point to structure which hold parameter and return value\r
- for option ROM call.\r
-\r
- @return Return value of PXE option ROM far call.\r
-**/\r
-EFI_STATUS\r
-PxeUndiGetInformation (\r
- IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
- IN OUT PXENV_UNDI_GET_INFORMATION_T *PxeUndiTable\r
- )\r
-{\r
- return MakePxeCall (\r
- SimpleNetworkDevice,\r
- PxeUndiTable,\r
- sizeof (PXENV_UNDI_GET_INFORMATION_T),\r
- PXENV_UNDI_GET_INFORMATION\r
- );\r
-}\r
-\r
-/**\r
- PXE\r
- UNDI GET STATISTICS\r
- Op-Code: PXENV_UNDI_GET_STATISTICS (000Dh)\r
- Input: Far pointer to a PXENV_UNDI_GET_STATISTICS_T parameter structure that has been initialized\r
- by the caller.\r
- Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
- the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx\r
- constants.\r
- Description: This call reads statistical information from the network adapter, and returns.\r
- typedef struct {\r
- PXENV_STATUS Status;\r
- UINT32 XmtGoodFrames;\r
- UINT32 RcvGoodFrames;\r
- UINT32 RcvCRCErrors;\r
- UINT32 RcvResourceErrors;\r
- } PXENV_UNDI_GET_STATISTICS_T;\r
- Set before calling API service\r
- N/A\r
- Returned from API service\r
- Status: See the PXENV_STATUS_xxx constants.\r
- XmtGoodFrames: Number of successful transmissions.\r
- RcvGoodFrames: Number of good frames received.\r
- RcvCRCErrors: Number of frames received with CRC\r
- error.\r
- RcvResourceErrors: Number of frames discarded\r
- because receive queue was full.\r
-\r
- @param SimpleNetworkDevice Device instance\r
- @param PxeUndiTable Point to structure which hold parameter and return value\r
- for option ROM call.\r
-\r
- @return Return value of PXE option ROM far call.\r
-**/\r
-EFI_STATUS\r
-PxeUndiGetStatistics (\r
- IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
- IN OUT PXENV_UNDI_GET_STATISTICS_T *PxeUndiTable\r
- )\r
-{\r
- return MakePxeCall (\r
- SimpleNetworkDevice,\r
- PxeUndiTable,\r
- sizeof (PXENV_UNDI_GET_STATISTICS_T),\r
- PXENV_UNDI_GET_STATISTICS\r
- );\r
-}\r
-\r
-/**\r
- PXE\r
- UNDI CLEAR STATISTICS\r
- Op-Code: PXENV_UNDI_CLEAR_STATISTICS (000Eh)\r
- Input: Far pointer to a PXENV_UNDI_CLEAR_STATISTICS_T parameter.\r
- Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
- the parameter structure must be set to one of the values represented by the\r
- PXENV_STATUS_xxx constants.\r
- Description: This call clears the statistical information from the network adapter.\r
- typedef struct {\r
- PXENV_STATUS Status;\r
- } PXENV_UNDI_CLEAR_STATISTICS_T;\r
- Set before calling API service\r
- N/A\r
- Returned from API service\r
- Status: See the PXENV_STATUS_xxx constants.\r
-\r
- @param SimpleNetworkDevice Device instance\r
- @param PxeUndiTable Point to structure which hold parameter and return value\r
- for option ROM call.\r
-\r
- @return Return value of PXE option ROM far call.\r
-**/\r
-EFI_STATUS\r
-PxeUndiClearStatistics (\r
- IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
- IN OUT PXENV_UNDI_CLEAR_STATISTICS_T *PxeUndiTable\r
- )\r
-{\r
- return MakePxeCall (\r
- SimpleNetworkDevice,\r
- PxeUndiTable,\r
- sizeof (PXENV_UNDI_CLEAR_STATISTICS_T),\r
- PXENV_UNDI_CLEAR_STATISTICS\r
- );\r
-}\r
-\r
-/**\r
- PXE\r
- UNDI INITIATE DIAGS\r
- Op-Code: PXENV_UNDI_INITIATE_DIAGS (000Fh)\r
- Input: Far pointer to a PXENV_UNDI_INITIATE_DIAGS_T parameter.\r
- Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
- the parameter structure must be set to one of the values represented by the\r
- PXENV_STATUS_xxx constants.\r
- Description: This call can be used to initiate the run-time diagnostics. It causes the network adapter to run\r
- hardware diagnostics and to update its status information.\r
- typedef struct {\r
- PXENV_STATUS Status;\r
- } PXENV_UNDI_INITIATE_DIAGS_T;\r
- Set before calling API service\r
- N/A\r
- Returned from API service\r
- Status: See the PXENV_STATUS_xxx constants.\r
-\r
- @param SimpleNetworkDevice Device instance\r
- @param PxeUndiTable Point to structure which hold parameter and return value\r
- for option ROM call.\r
-\r
- @return Return value of PXE option ROM far call.\r
-**/\r
-\r
-/**\r
- PXE\r
- UNDI FORCE INTERRUPT\r
- Op-Code: PXENV_UNDI_FORCE_INTERRUPT (0010h)\r
- Input: Far pointer to a PXENV_UNDI_FORCE_INTERRUPT_T parameter structure that has been\r
- initialized by the caller.\r
- Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
- the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx\r
- constants.\r
- Description: This call forces the network adapter to generate an interrupt. When a receive interrupt occurs, the\r
- network adapter driver usually queues the packet and calls the application's callback receive\r
- routine with a pointer to the packet received. Then, the callback routine either can copy the packet\r
- to its buffer or can decide to delay the copy to a later time. If the packet is not immediately copied,\r
- the network adapter driver does not remove it from the input queue. When the application wants to\r
- copy the packet, it can call the PXENV_UNDI_FORCE_INTERRUPT routine to simulate the receive\r
- interrupt.\r
- typedef struct {\r
- PXENV_STATUS Status;\r
- } PXENV_UNDI_FORCE_INTERRUPT_T;\r
- Set before calling API service\r
- N/A\r
- Returned from API service\r
- Status: See the PXENV_STATUS_xxx constants.\r
-\r
- @param SimpleNetworkDevice Device instance\r
- @param PxeUndiTable Point to structure which hold parameter and return value\r
- for option ROM call.\r
-\r
- @return Return value of PXE option ROM far call.\r
-**/\r
-\r
-/**\r
- PXE\r
- UNDI GET MULTICAST ADDRESS\r
- Op-Code: PXENV_UNDI_GET_MCAST_ADDRESS (0011h)\r
- Input: Far pointer to a PXENV_GET_MCAST_ADDRESS_t parameter structure that has been initialized\r
- by the caller.\r
- Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
- the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx\r
- constants.\r
- Description: This call converts the given IP multicast address to a hardware multicast address.\r
- typedef struct {\r
- PXENV_STATUS Status;\r
- IP4 InetAddr;\r
- MAC_ADDR MediaAddr;\r
- } PXENV_UNDI_GET_MCAST_ADDR_T;\r
- Set before calling API service\r
- InetAddr: IP multicast address.\r
- Returned from API service\r
- Status: See the PXENV_STATUS_xxx constants.\r
- MediaAddr: MAC multicast address.\r
-\r
- @param SimpleNetworkDevice Device instance\r
- @param PxeUndiTable Point to structure which hold parameter and return value\r
- for option ROM call.\r
-\r
- @return Return value of PXE option ROM far call.\r
-**/\r
-EFI_STATUS\r
-PxeUndiGetMcastAddr (\r
- IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
- IN OUT PXENV_UNDI_GET_MCAST_ADDR_T *PxeUndiTable\r
- )\r
-{\r
- return MakePxeCall (\r
- SimpleNetworkDevice,\r
- PxeUndiTable,\r
- sizeof (PXENV_UNDI_GET_MCAST_ADDR_T),\r
- PXENV_UNDI_GET_MCAST_ADDR\r
- );\r
-}\r
-\r
-/**\r
- PXE\r
- UNDI GET NIC TYPE\r
- Op-Code: PXENV_UNDI_GET_NIC_TYPE (0012h)\r
- Input: Far pointer to a PXENV_UNDI_GET_NIC_TYPE parameter structure that has been initialized by\r
- the caller.\r
- Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
- the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx\r
- constants. If the PXENV_EXIT_SUCCESS is returned the parameter structure must contain the\r
- NIC information.\r
- Description: This call, if successful, provides the NIC-specific information necessary to identify the network\r
- adapter that is used to boot the system.\r
- Note: The application first gets the DHCPDISCOVER packet using GET_CACHED_INFO and checks if\r
- the UNDI is supported before making this call. If the UNDI is not supported, the NIC-specific\r
- information can be obtained from the DHCPDISCOVER packet itself.\r
- PXENV_START_UNDI, PXENV_UNDI_STARTUP and PXENV_UNDI_INITIALIZE must be called\r
- before the information provided is valid.\r
- typedef {\r
- PXENV_STATUS Status;\r
- UINT8 NicType;\r
- #define PCI_NIC 2\r
- #define PnP_NIC 3\r
- #define CardBus_NIC 4\r
- Union {\r
- Struct {\r
- UINT16 Vendor_ID;\r
- UINT16 Dev_ID;\r
- UINT8 Base_Class;\r
- UINT8 Sub_Class;\r
- UINT8 Prog_Intf;\r
- UINT8 Rev;\r
- UINT16 BusDevFunc;\r
- UINT16 SubVendor_ID;\r
- UINT16 SubDevice_ID;\r
- } pci, cardbus;\r
- struct {\r
- UINT32 EISA_Dev_ID;\r
- UINT8 Base_Class;\r
- UINT8 Sub_Class;\r
- UINT8 Prog_Intf;\r
- UINT16 CardSelNum;\r
- } pnp;\r
- } info;\r
- } PXENV_UNDI_GET_NIC_TYPE_T;\r
- Set before calling API service\r
- N/A\r
- Returned from API service\r
- Status: See the PXENV_STATUS_xxx constants.\r
- NICType: Type of NIC information stored in the parameter\r
- structure.\r
- Info: Information about the fields in this union can be found\r
- in the [PnP] and [PCI] specifications\r
-\r
- @param SimpleNetworkDevice Device instance\r
- @param PxeUndiTable Point to structure which hold parameter and return value\r
- for option ROM call.\r
-\r
- @return Return value of PXE option ROM far call.\r
-**/\r
-EFI_STATUS\r
-PxeUndiGetNicType (\r
- IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
- IN OUT PXENV_UNDI_GET_NIC_TYPE_T *PxeUndiTable\r
- )\r
-{\r
- return MakePxeCall (\r
- SimpleNetworkDevice,\r
- PxeUndiTable,\r
- sizeof (PXENV_UNDI_GET_NIC_TYPE_T),\r
- PXENV_UNDI_GET_NIC_TYPE\r
- );\r
-}\r
-\r
-/**\r
- PXE\r
- UNDI GET IFACE INFO\r
- Op-Code: PXENV_UNDI_GET_IFACE_INFO (0013h)\r
- Input: Far pointer to a PXENV_UNDI_GET_IFACE_INFO_t parameter structure that has been initialized\r
- by the caller.\r
- Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
- the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx\r
- constants. If the PXENV_EXIT_SUCCESS is returned, the parameter structure must contain the\r
- interface specific information.\r
- Description: This call, if successful, provides the network interface specific information such as the interface\r
- type at the link layer (Ethernet, Tokenring) and the link speed. This information can be used in the\r
- universal drivers such as NDIS or Miniport to communicate to the upper protocol modules.\r
- Note: UNDI follows the NDIS2 specification in giving this information. It is the responsibility of the\r
- universal driver to translate/convert this information into a format that is required in its specification\r
- or to suit the expectation of the upper level protocol modules.\r
- PXENV_START_UNDI, PXENV_UNDI_STARTUP and PXENV_UNDI_INITIALIZE must be called\r
- before the information provided is valid.\r
- typedef struct {\r
- PXENV_STATUS Status\r
- UINT8 IfaceType[16];\r
- UINT32 LinkSpeed;\r
- UINT32 ServiceFlags;\r
- UINT32 Reserved[4];\r
- } PXENV_UNDI_GET_NDIS_INFO_T;\r
- Set before calling API service\r
- N/A\r
- Returned from API service\r
- Status: See the PXENV_STATUS_xxx constants.\r
- IfaceType: Name of MAC type in ASCIIZ format. This is\r
- used by the universal NDIS driver to specify its driver type\r
- to the protocol driver.\r
- LinkSpeed: Defined in the NDIS 2.0 specification.\r
- ServiceFlags: Defined in the NDIS 2.0 specification.\r
- Reserved: Must be zero.\r
-\r
- @param SimpleNetworkDevice Device instance\r
- @param PxeUndiTable Point to structure which hold parameter and return value\r
- for option ROM call.\r
-\r
- @return Return value of PXE option ROM far call.\r
-**/\r
-EFI_STATUS\r
-PxeUndiGetNdisInfo (\r
- IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
- IN OUT PXENV_UNDI_GET_NDIS_INFO_T *PxeUndiTable\r
- )\r
-{\r
- return MakePxeCall (\r
- SimpleNetworkDevice,\r
- PxeUndiTable,\r
- sizeof (PXENV_UNDI_GET_NDIS_INFO_T),\r
- PXENV_UNDI_GET_NDIS_INFO\r
- );\r
-}\r
-\r
-/**\r
- PXE\r
- UNDI ISR\r
- Op-Code: PXENV_UNDI_ISR (0014h)\r
- Input: Far pointer to a PXENV_UNDI_ISR_T parameter structure that has been initialized by the caller.\r
- Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
- the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx\r
- constants.\r
- Description: This API function will be called at different levels of processing the interrupt. The FuncFlag field in\r
- the parameter block indicates the operation to be performed for the call. This field is filled with the\r
- status of that operation on return.\r
- Note: Interrupt Service Routine Operation:\r
- In this design the UNDI does not hook the interrupt for the Network Interface. Instead, the\r
- application or the protocol driver hooks the interrupt and calls UNDI with the PXENV_UNDI_ISR\r
- API call for interrupt verification (PXENV_UNDI_ISR_IN_START) and processing\r
- (PXENV_UNDI_ISR_IN_PROCESS and PXENV_UNDI_ISR_GET_NEXT).\r
- When the Network Interface HW generates an interrupt the protocol driver interrupt service\r
- routine (ISR) gets control and takes care of the interrupt processing at the PIC level. The ISR then\r
- calls the UNDI using the PXENV_UNDI_ISR API with the value PXENV_UNDI_ISR_IN_START for\r
- the FuncFlag parameter. At this time UNDI must disable the interrupts at the Network Interface\r
- level and read any status values required to further process the interrupt. UNDI must return as\r
- quickly as possible with one of the two values, PXENV_UNDI_ISR_OUT_OURS or\r
- PXENV_UNDI_ISR_OUT_NOT_OURS, for the parameter FuncFlag depending on whether the\r
- interrupt was generated by this particular Network Interface or not.\r
- If the value returned in FuncFlag is PXENV_UNDI_ISR_OUT_NOT_OURS, then the interrupt was\r
- not generated by our NIC, and interrupt processing is complete.\r
- If the value returned in FuncFlag is PXENV_UNDI_ISR_OUT_OURS, the protocol driver must start\r
- a handler thread and send an end-of-interrupt (EOI) command to the PIC. Interrupt processing is\r
- now complete.\r
- The protocol driver strategy routine will call UNDI using this same API with FuncFlag equal to\r
- PXENV_UNDI_ISR_IN_PROCESS. At this time UNDI must find the cause of this interrupt and\r
- return the status in the FuncFlag. It first checks if there is a frame received and if so it returns the\r
- first buffer pointer of that frame in the parameter block.\r
- The protocol driver calls UNDI repeatedly with the FuncFlag equal to\r
- PXENV_UNDI_ISR_IN_GET_NEXT to get all the buffers in a frame and also all the received\r
- frames in the queue. On this call, UNDI must remember the previous buffer given to the protoco,l\r
- remove it from the receive queue and recycle it. In case of a multi-buffered frame, if the previous\r
- buffer is not the last buffer in the frame it must return the next buffer in the frame in the parameter\r
- block. Otherwise it must return the first buffer in the next frame.\r
- If there is no received frame pending to be processed, UNDI processes the transmit completes and\r
- if there is no other interrupt status to be processed, UNDI re-enables the interrupt at the\r
- NETWORK INTERFACE level and returns PXENV_UNDI_ISR_OUT_DONE in the FuncFlag.\r
- IMPORTANT: It is possible for the protocol driver to be interrupted again while in the\r
- strategy routine when the UNDI re-enables interrupts.\r
-\r
- @param SimpleNetworkDevice Device instance\r
- @param PxeUndiTable Point to structure which hold parameter and return value\r
- for option ROM call.\r
-\r
- @return Return value of PXE option ROM far call.\r
-**/\r
-EFI_STATUS\r
-PxeUndiIsr (\r
- IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
- IN OUT PXENV_UNDI_ISR_T *PxeUndiTable\r
- )\r
-{\r
- return MakePxeCall (\r
- SimpleNetworkDevice,\r
- PxeUndiTable,\r
- sizeof (PXENV_UNDI_ISR_T),\r
- PXENV_UNDI_ISR\r
- );\r
-}\r
-\r
-/**\r
- PXE\r
- STOP UNDI\r
- Op-Code: PXENV_STOP_UNDI (0015h)\r
- Input: Far pointer to a PXENV_STOP_UNDI_T parameter structure that has been initialized by the caller.\r
- Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
- the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx\r
- constants.\r
- Description: This routine is responsible for unhooking the Int 1Ah service routine.\r
- Note: This API service must be called only once at the end of UNDI Option ROM boot. One of the valid\r
- status codes is PXENV_STATUS_KEEP. If this status is returned, UNDI must not be removed from\r
- base memory. Also, UNDI must not be removed from base memory if BC is not removed from base\r
- memory.\r
- Service cannot be used in protected mode.\r
- typedef struct {\r
- PXENV_STATUS Status;\r
- } PXENV_STOP_UNDI_T;\r
- Set before calling API service\r
- N/A\r
- Returned from API service\r
- Status: See the PXENV_STATUS_xxx constants.\r
-\r
- @param SimpleNetworkDevice Device instance\r
- @param PxeUndiTable Point to structure which hold parameter and return value\r
- for option ROM call.\r
-\r
- @return Return value of PXE option ROM far call.\r
-**/\r
-EFI_STATUS\r
-PxeUndiStop (\r
- IN EFI_SIMPLE_NETWORK_DEV *SimpleNetworkDevice,\r
- IN OUT PXENV_STOP_UNDI_T *PxeUndiTable\r
- )\r
-{\r
- return MakePxeCall (\r
- SimpleNetworkDevice,\r
- PxeUndiTable,\r
- sizeof (PXENV_STOP_UNDI_T),\r
- PXENV_STOP_UNDI\r
- );\r
-}\r
-\r
-/**\r
- PXE\r
- UNDI GET STATE\r
- Op-Code: PXENV_UNDI_GET_STATE (0015h)\r
- Input: Far pointer to a PXENV_UNDI_GET_STATE_T parameter.\r
- Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
- the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx\r
- constants. The UNDI_STATE field in the parameter structure must be set to one of the valid state\r
- constants\r
- Description: This call can be used to obtain state of the UNDI engine in order to avoid issuing adverse call\r
- sequences\r
- typedef struct {\r
- #define PXE_UNDI_GET_STATE_STARTED 1\r
- #define PXE_UNDI_GET_STATE_INITIALIZED 2\r
- #define PXE_UNDI_GET_STATE_OPENED 3\r
- PXENV_STATUS Status;\r
- UINT8 UNDIstate;\r
- } PXENV_UNDI_GET_STATE_T;\r
- Set before calling API service\r
- N/A\r
- Returned from API service\r
- Status: See the PXENV_STATUS_xxx constants.\r
- State: See definitions of the state constants.\r
- Note. UNDI implementation is responsible for maintaining\r
- internal state machine.\r
- UNDI ISR\r
- Op-Code: PXENV_UNDI_ISR (0014h)\r
- Input: Far pointer to a t_PXENV_UNDI_ISR parameter structure that has been initialized by the caller.\r
- Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be returned in AX. The status field in\r
- the parameter structure must be set to one of the values represented by the PXENV_STATUS_xxx\r
- constants.\r
- Description: This API function will be called at different levels of processing the interrupt. The FuncFlag field in\r
- the parameter block indicates the operation to be performed for the call. This field is filled with the\r
- status of that operation on return.\r
-\r
- @param SimpleNetworkDevice Device instance\r
- @param PxeUndiTable Point to structure which hold parameter and return value\r
- for option ROM call.\r
-\r
- @return Return value of PXE option ROM far call.\r
-**/\r