45 Dev->VirtIo->UnmapSharedBuffer (Dev->VirtIo, Dev->RxBufMap);
46 Dev->VirtIo->FreeSharedPages (
63 Dev->VirtIo->UnmapSharedBuffer (Dev->VirtIo, Dev->TxSharedReqMap);
64 Dev->VirtIo->FreeSharedPages (
76 TxBufMapInfo = UserStruct;
77 Dev->VirtIo->UnmapSharedBuffer (Dev->VirtIo, TxBufMapInfo->BufMap);
102 Dev->VirtIo->UnmapSharedBuffer (Dev->VirtIo, RingMap);
137 if (TxBufMapInfo ==
NULL) {
138 return EFI_OUT_OF_RESOURCES;
143 VirtioOperationBusMasterRead,
149 if (EFI_ERROR (Status)) {
150 goto FreeTxBufMapInfo;
153 TxBufMapInfo->Buffer = Buffer;
154 TxBufMapInfo->DeviceAddress = Address;
155 TxBufMapInfo->BufMap = Mapping;
158 Dev->TxBufCollection,
163 case EFI_OUT_OF_RESOURCES:
165 case EFI_ALREADY_STARTED:
178 Status = EFI_INVALID_PARAMETER;
185 *DeviceAddress = Address;
189 Dev->VirtIo->UnmapSharedBuffer (Dev->VirtIo, Mapping);
225 return EFI_INVALID_PARAMETER;
230 TxBufMapInfo = UserStruct;
232 *Buffer = TxBufMapInfo->Buffer;
233 Dev->VirtIo->UnmapSharedBuffer (Dev->VirtIo, TxBufMapInfo->BufMap);
262 MapInfo1 = UserStruct1;
263 MapInfo2 = UserStruct2;
265 return MapInfo1->DeviceAddress < MapInfo2->DeviceAddress ? -1 :
266 MapInfo1->DeviceAddress > MapInfo2->DeviceAddress ? 1 :
296 DeviceAddress = StandaloneKey;
297 MapInfo = UserStruct;
299 return *DeviceAddress < MapInfo->DeviceAddress ? -1 :
300 *DeviceAddress > MapInfo->DeviceAddress ? 1 :
VOID EFIAPI FreePool(IN VOID *Buffer)
#define ASSERT_EFI_ERROR(StatusParameter)
ORDERED_COLLECTION_ENTRY *EFIAPI OrderedCollectionFind(IN CONST ORDERED_COLLECTION *Collection, IN CONST VOID *StandaloneKey)
ORDERED_COLLECTION_ENTRY *EFIAPI OrderedCollectionMin(IN CONST ORDERED_COLLECTION *Collection)
RETURN_STATUS EFIAPI OrderedCollectionInsert(IN OUT ORDERED_COLLECTION *Collection, OUT ORDERED_COLLECTION_ENTRY **Entry OPTIONAL, IN VOID *UserStruct)
VOID EFIAPI OrderedCollectionUninit(IN ORDERED_COLLECTION *Collection)
ORDERED_COLLECTION_ENTRY *EFIAPI OrderedCollectionNext(IN CONST ORDERED_COLLECTION_ENTRY *Entry)
VOID EFIAPI OrderedCollectionDelete(IN OUT ORDERED_COLLECTION *Collection, IN ORDERED_COLLECTION_ENTRY *Entry, OUT VOID **UserStruct OPTIONAL)
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
EFI_STATUS EFIAPI VirtioNetMapTxBuf(IN VNET_DEV *Dev, IN VOID *Buffer, IN UINTN NumberOfBytes, OUT EFI_PHYSICAL_ADDRESS *DeviceAddress)
INTN EFIAPI VirtioNetTxBufMapInfoCompare(IN CONST VOID *UserStruct1, IN CONST VOID *UserStruct2)
VOID EFIAPI VirtioNetShutdownRx(IN OUT VNET_DEV *Dev)
EFI_STATUS EFIAPI VirtioNetUnmapTxBuf(IN VNET_DEV *Dev, OUT VOID **Buffer, IN EFI_PHYSICAL_ADDRESS DeviceAddress)
INTN EFIAPI VirtioNetTxBufDeviceAddressCompare(IN CONST VOID *StandaloneKey, IN CONST VOID *UserStruct)
VOID EFIAPI VirtioNetUninitRing(IN OUT VNET_DEV *Dev, IN OUT VRING *Ring, IN VOID *RingMap)
UINT64 EFI_PHYSICAL_ADDRESS
#define EFI_SIZE_TO_PAGES(Size)
EFI_STATUS EFIAPI VirtioMapAllBytesInSharedBuffer(IN VIRTIO_DEVICE_PROTOCOL *VirtIo, IN VIRTIO_MAP_OPERATION Operation, IN VOID *HostAddress, IN UINTN NumberOfBytes, OUT EFI_PHYSICAL_ADDRESS *DeviceAddress, OUT VOID **Mapping)
VOID EFIAPI VirtioRingUninit(IN VIRTIO_DEVICE_PROTOCOL *VirtIo, IN OUT VRING *Ring)