TianoCore EDK2 master
Loading...
Searching...
No Matches
VirtioLib.h
Go to the documentation of this file.
1
12#ifndef _VIRTIO_LIB_H_
13#define _VIRTIO_LIB_H_
14
16
18
47EFIAPI
50 IN UINT16 QueueSize,
51 OUT VRING *Ring
52 );
53
72EFIAPI
75 IN VRING *Ring,
76 OUT UINT64 *RingBaseShift,
77 OUT VOID **Mapping
78 );
79
93VOID
94EFIAPI
97 IN OUT VRING *Ring
98 );
99
100//
101// Internal use structure for tracking the submission of a multi-descriptor
102// request.
103//
104typedef struct {
105 UINT16 HeadDescIdx;
106 UINT16 NextDescIdx;
108
121VOID
122EFIAPI
124 IN OUT VRING *Ring,
125 OUT DESC_INDICES *Indices
126 );
127
166VOID
167EFIAPI
169 IN OUT VRING *Ring,
170 IN UINT64 BufferDeviceAddress,
171 IN UINT32 BufferSize,
172 IN UINT16 Flags,
173 IN OUT DESC_INDICES *Indices
174 );
175
204EFIAPI
207 IN UINT16 VirtQueueId,
208 IN OUT VRING *Ring,
209 IN DESC_INDICES *Indices,
210 OUT UINT32 *UsedLen OPTIONAL
211 );
212
251EFIAPI
254 IN UINT64 Features,
255 IN OUT UINT8 *DeviceStatus
256 );
257
300EFIAPI
303 IN VIRTIO_MAP_OPERATION Operation,
304 IN VOID *HostAddress,
305 IN UINTN NumberOfBytes,
306 OUT EFI_PHYSICAL_ADDRESS *DeviceAddress,
307 OUT VOID **Mapping
308 );
309
310#endif // _VIRTIO_LIB_H_
UINT64 UINTN
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
UINT64 EFI_PHYSICAL_ADDRESS
Definition: UefiBaseType.h:50
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
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)
Definition: VirtioLib.c:469
VOID EFIAPI VirtioAppendDesc(IN OUT VRING *Ring, IN UINT64 BufferDeviceAddress, IN UINT32 BufferSize, IN UINT16 Flags, IN OUT DESC_INDICES *Indices)
Definition: VirtioLib.c:228
EFI_STATUS EFIAPI VirtioFlush(IN VIRTIO_DEVICE_PROTOCOL *VirtIo, IN UINT16 VirtQueueId, IN OUT VRING *Ring, IN DESC_INDICES *Indices, OUT UINT32 *UsedLen OPTIONAL)
Definition: VirtioLib.c:274
EFI_STATUS EFIAPI VirtioRingMap(IN VIRTIO_DEVICE_PROTOCOL *VirtIo, IN VRING *Ring, OUT UINT64 *RingBaseShift, OUT VOID **Mapping)
Definition: VirtioLib.c:529
EFI_STATUS EFIAPI Virtio10WriteFeatures(IN VIRTIO_DEVICE_PROTOCOL *VirtIo, IN UINT64 Features, IN OUT UINT8 *DeviceStatus)
Definition: VirtioLib.c:391
VOID EFIAPI VirtioPrepare(IN OUT VRING *Ring, OUT DESC_INDICES *Indices)
Definition: VirtioLib.c:167
EFI_STATUS EFIAPI VirtioRingInit(IN VIRTIO_DEVICE_PROTOCOL *VirtIo, IN UINT16 QueueSize, OUT VRING *Ring)
Definition: VirtioLib.c:49
VOID EFIAPI VirtioRingUninit(IN VIRTIO_DEVICE_PROTOCOL *VirtIo, IN OUT VRING *Ring)
Definition: VirtioLib.c:144