X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=OvmfPkg%2FInclude%2FLibrary%2FVirtioLib.h;h=085e719b08753b3d4be7e6d7ed0fea8c287ff467;hp=e714ec7aee500b3828e257afcf5321cdc9b7e124;hb=ac0a286f4d747a4c6c603a7b225917293cbe1e9f;hpb=d1050b9dff1cace252aff86630bfdb59dff5f507 diff --git a/OvmfPkg/Include/Library/VirtioLib.h b/OvmfPkg/Include/Library/VirtioLib.h index e714ec7aee..085e719b08 100644 --- a/OvmfPkg/Include/Library/VirtioLib.h +++ b/OvmfPkg/Include/Library/VirtioLib.h @@ -16,7 +16,6 @@ #include - /** Configure a virtio ring. @@ -47,12 +46,11 @@ EFI_STATUS EFIAPI VirtioRingInit ( - IN VIRTIO_DEVICE_PROTOCOL *VirtIo, - IN UINT16 QueueSize, - OUT VRING *Ring + IN VIRTIO_DEVICE_PROTOCOL *VirtIo, + IN UINT16 QueueSize, + OUT VRING *Ring ); - /** Map the ring buffer so that it can be accessed equally by both guest @@ -73,10 +71,10 @@ VirtioRingInit ( EFI_STATUS EFIAPI VirtioRingMap ( - IN VIRTIO_DEVICE_PROTOCOL *VirtIo, - IN VRING *Ring, - OUT UINT64 *RingBaseShift, - OUT VOID **Mapping + IN VIRTIO_DEVICE_PROTOCOL *VirtIo, + IN VRING *Ring, + OUT UINT64 *RingBaseShift, + OUT VOID **Mapping ); /** @@ -95,21 +93,19 @@ VirtioRingMap ( VOID EFIAPI VirtioRingUninit ( - IN VIRTIO_DEVICE_PROTOCOL *VirtIo, - IN OUT VRING *Ring + IN VIRTIO_DEVICE_PROTOCOL *VirtIo, + IN OUT VRING *Ring ); - // // Internal use structure for tracking the submission of a multi-descriptor // request. // typedef struct { - UINT16 HeadDescIdx; - UINT16 NextDescIdx; + UINT16 HeadDescIdx; + UINT16 NextDescIdx; } DESC_INDICES; - /** Turn off interrupt notifications from the host, and prepare for appending @@ -125,11 +121,10 @@ typedef struct { VOID EFIAPI VirtioPrepare ( - IN OUT VRING *Ring, - OUT DESC_INDICES *Indices + IN OUT VRING *Ring, + OUT DESC_INDICES *Indices ); - /** Append a contiguous buffer for transmission / reception via the virtio ring. @@ -171,14 +166,13 @@ VirtioPrepare ( VOID EFIAPI VirtioAppendDesc ( - IN OUT VRING *Ring, - IN UINT64 BufferDeviceAddress, - IN UINT32 BufferSize, - IN UINT16 Flags, - IN OUT DESC_INDICES *Indices + IN OUT VRING *Ring, + IN UINT64 BufferDeviceAddress, + IN UINT32 BufferSize, + IN UINT16 Flags, + IN OUT DESC_INDICES *Indices ); - /** Notify the host about the descriptor chain just built, and wait until the @@ -209,14 +203,13 @@ VirtioAppendDesc ( EFI_STATUS EFIAPI VirtioFlush ( - IN VIRTIO_DEVICE_PROTOCOL *VirtIo, - IN UINT16 VirtQueueId, - IN OUT VRING *Ring, - IN DESC_INDICES *Indices, - OUT UINT32 *UsedLen OPTIONAL + IN VIRTIO_DEVICE_PROTOCOL *VirtIo, + IN UINT16 VirtQueueId, + IN OUT VRING *Ring, + IN DESC_INDICES *Indices, + OUT UINT32 *UsedLen OPTIONAL ); - /** Report the feature bits to the VirtIo 1.0 device that the VirtIo 1.0 driver @@ -257,9 +250,9 @@ VirtioFlush ( EFI_STATUS EFIAPI Virtio10WriteFeatures ( - IN VIRTIO_DEVICE_PROTOCOL *VirtIo, - IN UINT64 Features, - IN OUT UINT8 *DeviceStatus + IN VIRTIO_DEVICE_PROTOCOL *VirtIo, + IN UINT64 Features, + IN OUT UINT8 *DeviceStatus ); /** @@ -313,4 +306,5 @@ VirtioMapAllBytesInSharedBuffer ( OUT EFI_PHYSICAL_ADDRESS *DeviceAddress, OUT VOID **Mapping ); + #endif // _VIRTIO_LIB_H_