X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=OvmfPkg%2FVirtioBlkDxe%2FVirtioBlk.h;h=9ec0b956b81884ec6a05aea57d19bbd1550fe555;hb=1dd46be315d555bd8b9df8ae6f3bad1c18d32673;hp=e846dab514d78d3664110b9471b22a7194e86a4d;hpb=fd51d7599173164be618d26e9d3673c09f60dbb2;p=mirror_edk2.git diff --git a/OvmfPkg/VirtioBlkDxe/VirtioBlk.h b/OvmfPkg/VirtioBlkDxe/VirtioBlk.h index e846dab514..9ec0b956b8 100644 --- a/OvmfPkg/VirtioBlkDxe/VirtioBlk.h +++ b/OvmfPkg/VirtioBlkDxe/VirtioBlk.h @@ -15,12 +15,14 @@ **/ +#ifndef _VIRTIO_BLK_DXE_H_ +#define _VIRTIO_BLK_DXE_H_ + #include #include #include -#include -#include "Virtio.h" +#include #define VBLK_SIG SIGNATURE_32 ('V', 'B', 'L', 'K') @@ -31,14 +33,15 @@ typedef struct { // at various call depths. The table to the right should make it easier to // track them. // - // field init function init dpth - // ---------------------- ------------------ --------- - UINT32 Signature; // DriverBindingStart 0 - EFI_PCI_IO_PROTOCOL *PciIo; // DriverBindingStart 0 - UINT64 OriginalPciAttributes; // DriverBindingStart 0 - VRING Ring; // VirtioRingInit 2 - EFI_BLOCK_IO_PROTOCOL BlockIo; // VirtioBlkInit 1 - EFI_BLOCK_IO_MEDIA BlockIoMedia; // VirtioBlkInit 1 + // field init function init dpth + // --------------------- ------------------ --------- + UINT32 Signature; // DriverBindingStart 0 + VIRTIO_DEVICE_PROTOCOL *VirtIo; // DriverBindingStart 0 + EFI_EVENT ExitBoot; // DriverBindingStart 0 + VRING Ring; // VirtioRingInit 2 + EFI_BLOCK_IO_PROTOCOL BlockIo; // VirtioBlkInit 1 + EFI_BLOCK_IO_MEDIA BlockIoMedia; // VirtioBlkInit 1 + VOID *RingMap; // VirtioRingMap 2 } VBLK_DEV; #define VIRTIO_BLK_FROM_BLOCK_IO(BlockIoPointer) \ @@ -63,11 +66,6 @@ typedef struct { underlying device - 9 Driver Binding Protocol -- for exporting ourselves - Specs relevant in the specific sense: - - UEFI Spec 2.3.1 + Errata C, 13.4 EFI PCI I/O Protocol - - Driver Writer's Guide for UEFI 2.3.1 v1.01, 18 PCI Driver Design - Guidelines, 18.3 PCI drivers. - @param[in] This The EFI_DRIVER_BINDING_PROTOCOL object incorporating this driver (independently of any device). @@ -79,11 +77,10 @@ typedef struct { @retval EFI_SUCCESS The driver supports the device being probed. - @retval EFI_UNSUPPORTED Based on virtio-blk PCI discovery, we do not support + @retval EFI_UNSUPPORTED Based on virtio-blk discovery, we do not support the device. - @return Error codes from the OpenProtocol() boot service or - the PciIo protocol. + @return Error codes from the OpenProtocol() boot service. **/ @@ -100,7 +97,7 @@ VirtioBlkDriverBindingSupported ( After we've pronounced support for a specific device in DriverBindingSupported(), we start managing said device (passed in by the - Driver Exeuction Environment) with the following service. + Driver Execution Environment) with the following service. See DriverBindingSupported() for specification references. @@ -114,14 +111,14 @@ VirtioBlkDriverBindingSupported ( @retval EFI_SUCCESS Driver instance has been created and - initialized for the virtio-blk PCI device, it - is now accessibla via EFI_BLOCK_IO_PROTOCOL. + initialized for the virtio-blk device, it + is now accessible via EFI_BLOCK_IO_PROTOCOL. @retval EFI_OUT_OF_RESOURCES Memory allocation failed. @return Error codes from the OpenProtocol() boot - service, the PciIo protocol, VirtioBlkInit(), - or the InstallProtocolInterface() boot service. + service, VirtioBlkInit(), or the + InstallProtocolInterface() boot service. **/ @@ -291,3 +288,5 @@ VirtioBlkGetDeviceName ( IN CHAR8 *Language, OUT CHAR16 **ControllerName ); + +#endif // _VIRTIO_BLK_DXE_H_