34#define FOUR_GIGABYTES (UINT64) 0x100000000ULL
36#define SNP_DRIVER_SIGNATURE SIGNATURE_32 ('s', 'n', 'd', 's')
37#define MAX_MAP_LENGTH 100
39#define PCI_BAR_IO_MASK 0x00000003
40#define PCI_BAR_IO_MODE 0x00000001
42#define PCI_BAR_MEM_MASK 0x0000000F
43#define PCI_BAR_MEM_MODE 0x00000000
44#define PCI_BAR_MEM_64BIT 0x00000004
46#define SNP_TX_BUFFER_INCREASEMENT MAX_XMIT_BUFFERS
47#define SNP_MAX_TX_BUFFER_NUM 65536
51(EFIAPI *ISSUE_UNDI32_COMMAND)(
71 ISSUE_UNDI32_COMMAND IssueUndi32Command;
83 UINT32 TxRxBufferSize;
90 UINT8 *ReceiveBufffer;
91 VOID *ReceiveBufferUnmap;
92 UINT8 *FillHeaderBuffer;
93 VOID *FillHeaderBufferUnmap;
113 VOID *SnpDriverUnmap;
121 } MapList[MAX_MAP_LENGTH];
130 BOOLEAN MediaStatusSupported;
137 BOOLEAN CableDetectSupported;
142 UINT64 *RecycledTxBuf;
146 UINT32 MaxRecycledTxBuf;
150 UINT32 RecycledTxBufCount;
153#define EFI_SIMPLE_NETWORK_DEV_FROM_THIS(a) CR (a, SNP_DRIVER, Snp, SNP_DRIVER_SIGNATURE)
206 UINT16 CableDetectFlag
258 OUT UINT32 *InterruptStatusPtr,
259 IN BOOLEAN GetTransmittedBuf
297 IN UINT64 MicroSeconds
317 IN UINT8 ReadOrWrite,
319 IN UINT64 MemOrPortAddr,
320 IN OUT UINT64 BufferPtr
344 IN OUT UINT64 DeviceAddrPtr
485 IN UINTN ExtraRxBufferSize OPTIONAL,
486 IN UINTN ExtraTxBufferSize OPTIONAL
517 IN BOOLEAN ExtendedVerification
645 IN BOOLEAN ResetMCastFilter,
646 IN UINTN MCastFilterCnt OPTIONAL,
838 IN BOOLEAN ReadWrite,
886 OUT UINT32 *InterruptStatus OPTIONAL,
887 OUT VOID **TxBuf OPTIONAL
953 IN UINT16 *Protocol OPTIONAL
1013 OUT UINT16 *Protocol OPTIONAL
1030#define SNP_MEM_PAGES(x) (((x) - 1) / 4096 + 1)
EFI_STATUS EFIAPI Lock(IN EFI_SMM_ACCESS2_PROTOCOL *This)
EFI_STATUS PxeStop(SNP_DRIVER *Snp)
EFI_STATUS EFIAPI SnpUndi32NvData(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN BOOLEAN ReadWrite, IN UINTN Offset, IN UINTN BufferSize, IN OUT VOID *Buffer)
EFI_STATUS PxeGetStnAddr(SNP_DRIVER *Snp)
VOID EFIAPI SnpUndi32CallbackMap(IN UINT64 UniqueId, IN UINT64 CpuAddr, IN UINT32 NumBytes, IN UINT32 Direction, IN OUT UINT64 DeviceAddrPtr)
EFI_STATUS PxeStart(IN SNP_DRIVER *Snp)
EFI_STATUS PxeInit(SNP_DRIVER *Snp, UINT16 CableDetectFlag)
VOID EFIAPI SnpUndi32CallbackUnmap(IN UINT64 UniqueId, IN UINT64 CpuAddr, IN UINT32 NumBytes, IN UINT32 Direction, IN UINT64 DeviceAddr)
EFI_STATUS EFIAPI SnpUndi32Stop(IN EFI_SIMPLE_NETWORK_PROTOCOL *This)
EFI_STATUS EFIAPI SnpUndi32Statistics(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN BOOLEAN Reset, IN OUT UINTN *StatisticsSize OPTIONAL, IN OUT EFI_NETWORK_STATISTICS *StatisticsTable OPTIONAL)
EFI_STATUS EFIAPI SnpUndi32Initialize(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN UINTN ExtraRxBufferSize OPTIONAL, IN UINTN ExtraTxBufferSize OPTIONAL)
VOID EFIAPI SnpUndi32CallbackBlock(IN UINT64 UniqueId, IN UINT32 Enable)
EFI_STATUS EFIAPI SnpUndi32Transmit(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN UINTN HeaderSize, IN UINTN BufferSize, IN VOID *Buffer, IN EFI_MAC_ADDRESS *SrcAddr OPTIONAL, IN EFI_MAC_ADDRESS *DestAddr OPTIONAL, IN UINT16 *Protocol OPTIONAL)
EFI_STATUS EFIAPI SnpUndi32McastIpToMac(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN BOOLEAN IPv6, IN EFI_IP_ADDRESS *IP, OUT EFI_MAC_ADDRESS *MAC)
EFI_STATUS EFIAPI SnpUndi32Shutdown(IN EFI_SIMPLE_NETWORK_PROTOCOL *This)
EFI_STATUS EFIAPI SnpUndi32ReceiveFilters(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN UINT32 Enable, IN UINT32 Disable, IN BOOLEAN ResetMCastFilter, IN UINTN MCastFilterCnt OPTIONAL, IN EFI_MAC_ADDRESS *MCastFilter OPTIONAL)
VOID EFIAPI SnpUndi32CallbackMemio(IN UINT64 UniqueId, IN UINT8 ReadOrWrite, IN UINT8 NumBytes, IN UINT64 MemOrPortAddr, IN OUT UINT64 BufferPtr)
VOID EFIAPI SnpUndi32CallbackDelay(IN UINT64 UniqueId, IN UINT64 MicroSeconds)
EFI_STATUS PxeShutdown(IN SNP_DRIVER *Snp)
VOID EFIAPI SnpUndi32CallbackSync(IN UINT64 UniqueId, IN UINT64 CpuAddr, IN UINT32 NumBytes, IN UINT32 Direction, IN UINT64 DeviceAddr)
EFI_STATUS PxeGetStatus(IN SNP_DRIVER *Snp, OUT UINT32 *InterruptStatusPtr, IN BOOLEAN GetTransmittedBuf)
EFI_STATUS EFIAPI SnpUndi32Receive(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, OUT UINTN *HeaderSize OPTIONAL, IN OUT UINTN *BufferSize, OUT VOID *Buffer, OUT EFI_MAC_ADDRESS *SrcAddr OPTIONAL, OUT EFI_MAC_ADDRESS *DestAddr OPTIONAL, OUT UINT16 *Protocol OPTIONAL)
EFI_STATUS EFIAPI SnpUndi32GetStatus(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, OUT UINT32 *InterruptStatus OPTIONAL, OUT VOID **TxBuf OPTIONAL)
EFI_STATUS EFIAPI SnpUndi32Reset(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN BOOLEAN ExtendedVerification)
EFI_STATUS EFIAPI SnpUndi32StationAddress(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN BOOLEAN Reset, IN EFI_MAC_ADDRESS *New OPTIONAL)
EFI_STATUS EFIAPI SnpUndi32Start(IN EFI_SIMPLE_NETWORK_PROTOCOL *This)
VOID EFIAPI SnpWaitForPacketNotify(EFI_EVENT Event, VOID *SnpPtr)
VOID EFIAPI ExitBootServicesEvent(IN EFI_EVENT Event, IN VOID *Context)
UINT64 EFI_PHYSICAL_ADDRESS