diff options
Diffstat (limited to 'OvmfPkg/XenPvBlkDxe/BlockFront.h')
-rw-r--r-- | OvmfPkg/XenPvBlkDxe/BlockFront.h | 82 |
1 files changed, 40 insertions, 42 deletions
diff --git a/OvmfPkg/XenPvBlkDxe/BlockFront.h b/OvmfPkg/XenPvBlkDxe/BlockFront.h index 7c2d7f2c9e..3651a6c8cd 100644 --- a/OvmfPkg/XenPvBlkDxe/BlockFront.h +++ b/OvmfPkg/XenPvBlkDxe/BlockFront.h @@ -11,50 +11,48 @@ #include <IndustryStandard/Xen/event_channel.h>
#include <IndustryStandard/Xen/io/blkif.h>
-typedef struct _XEN_BLOCK_FRONT_DEVICE XEN_BLOCK_FRONT_DEVICE;
-typedef struct _XEN_BLOCK_FRONT_IO XEN_BLOCK_FRONT_IO;
+typedef struct _XEN_BLOCK_FRONT_DEVICE XEN_BLOCK_FRONT_DEVICE;
+typedef struct _XEN_BLOCK_FRONT_IO XEN_BLOCK_FRONT_IO;
-struct _XEN_BLOCK_FRONT_IO
-{
- XEN_BLOCK_FRONT_DEVICE *Dev;
- UINT8 *Buffer;
- UINTN Size;
- UINTN Sector; ///< 512 bytes sector.
+struct _XEN_BLOCK_FRONT_IO {
+ XEN_BLOCK_FRONT_DEVICE *Dev;
+ UINT8 *Buffer;
+ UINTN Size;
+ UINTN Sector; ///< 512 bytes sector.
- grant_ref_t GrantRef[BLKIF_MAX_SEGMENTS_PER_REQUEST];
- INT32 NumRef;
+ grant_ref_t GrantRef[BLKIF_MAX_SEGMENTS_PER_REQUEST];
+ INT32 NumRef;
- EFI_STATUS Status;
+ EFI_STATUS Status;
};
-typedef struct
-{
- UINT64 Sectors;
- UINT32 SectorSize;
- UINT32 VDiskInfo;
- BOOLEAN ReadWrite;
- BOOLEAN CdRom;
- BOOLEAN FeatureBarrier;
- BOOLEAN FeatureFlushCache;
+typedef struct {
+ UINT64 Sectors;
+ UINT32 SectorSize;
+ UINT32 VDiskInfo;
+ BOOLEAN ReadWrite;
+ BOOLEAN CdRom;
+ BOOLEAN FeatureBarrier;
+ BOOLEAN FeatureFlushCache;
} XEN_BLOCK_FRONT_MEDIA_INFO;
-#define XEN_BLOCK_FRONT_SIGNATURE SIGNATURE_32 ('X', 'p', 'v', 'B')
+#define XEN_BLOCK_FRONT_SIGNATURE SIGNATURE_32 ('X', 'p', 'v', 'B')
struct _XEN_BLOCK_FRONT_DEVICE {
- UINT32 Signature;
- EFI_BLOCK_IO_PROTOCOL BlockIo;
- domid_t DomainId;
+ UINT32 Signature;
+ EFI_BLOCK_IO_PROTOCOL BlockIo;
+ domid_t DomainId;
- blkif_front_ring_t Ring;
- grant_ref_t RingRef;
- evtchn_port_t EventChannel;
- blkif_vdev_t DeviceId;
+ blkif_front_ring_t Ring;
+ grant_ref_t RingRef;
+ evtchn_port_t EventChannel;
+ blkif_vdev_t DeviceId;
- CONST CHAR8 *NodeName;
- XEN_BLOCK_FRONT_MEDIA_INFO MediaInfo;
+ CONST CHAR8 *NodeName;
+ XEN_BLOCK_FRONT_MEDIA_INFO MediaInfo;
- VOID *StateWatchToken;
+ VOID *StateWatchToken;
- XENBUS_PROTOCOL *XenBusIo;
+ XENBUS_PROTOCOL *XenBusIo;
};
#define XEN_BLOCK_FRONT_FROM_BLOCK_IO(b) \
@@ -62,34 +60,34 @@ struct _XEN_BLOCK_FRONT_DEVICE { EFI_STATUS
XenPvBlockFrontInitialization (
- IN XENBUS_PROTOCOL *XenBusIo,
- IN CONST CHAR8 *NodeName,
- OUT XEN_BLOCK_FRONT_DEVICE **DevPtr
+ IN XENBUS_PROTOCOL *XenBusIo,
+ IN CONST CHAR8 *NodeName,
+ OUT XEN_BLOCK_FRONT_DEVICE **DevPtr
);
VOID
XenPvBlockFrontShutdown (
- IN XEN_BLOCK_FRONT_DEVICE *Dev
+ IN XEN_BLOCK_FRONT_DEVICE *Dev
);
VOID
XenPvBlockAsyncIo (
- IN OUT XEN_BLOCK_FRONT_IO *IoData,
- IN BOOLEAN IsWrite
+ IN OUT XEN_BLOCK_FRONT_IO *IoData,
+ IN BOOLEAN IsWrite
);
EFI_STATUS
XenPvBlockIo (
- IN OUT XEN_BLOCK_FRONT_IO *IoData,
- IN BOOLEAN IsWrite
+ IN OUT XEN_BLOCK_FRONT_IO *IoData,
+ IN BOOLEAN IsWrite
);
VOID
XenPvBlockAsyncIoPoll (
- IN XEN_BLOCK_FRONT_DEVICE *Dev
+ IN XEN_BLOCK_FRONT_DEVICE *Dev
);
VOID
XenPvBlockSync (
- IN XEN_BLOCK_FRONT_DEVICE *Dev
+ IN XEN_BLOCK_FRONT_DEVICE *Dev
);
|