summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/VirtioScsiDxe/VirtioScsi.h
diff options
context:
space:
mode:
Diffstat (limited to 'OvmfPkg/VirtioScsiDxe/VirtioScsi.h')
-rw-r--r--OvmfPkg/VirtioScsiDxe/VirtioScsi.h120
1 files changed, 53 insertions, 67 deletions
diff --git a/OvmfPkg/VirtioScsiDxe/VirtioScsi.h b/OvmfPkg/VirtioScsiDxe/VirtioScsi.h
index af1901891f..e7aa16dc2f 100644
--- a/OvmfPkg/VirtioScsiDxe/VirtioScsi.h
+++ b/OvmfPkg/VirtioScsiDxe/VirtioScsi.h
@@ -18,7 +18,6 @@
#include <IndustryStandard/Virtio.h>
-
//
// This driver supports 2-byte target identifiers and 4-byte LUN identifiers.
//
@@ -30,11 +29,10 @@
// AdapterId and our target identifiers.
//
#if TARGET_MAX_BYTES < 4
-# error "virtio-scsi requires TARGET_MAX_BYTES >= 4"
+ #error "virtio-scsi requires TARGET_MAX_BYTES >= 4"
#endif
-
-#define VSCSI_SIG SIGNATURE_32 ('V', 'S', 'C', 'S')
+#define VSCSI_SIG SIGNATURE_32 ('V', 'S', 'C', 'S')
typedef struct {
//
@@ -44,23 +42,22 @@ typedef struct {
//
// field init function init depth
// ---------------- ------------------ ----------
- UINT32 Signature; // DriverBindingStart 0
- VIRTIO_DEVICE_PROTOCOL *VirtIo; // DriverBindingStart 0
- EFI_EVENT ExitBoot; // DriverBindingStart 0
- BOOLEAN InOutSupported; // VirtioScsiInit 1
- UINT16 MaxTarget; // VirtioScsiInit 1
- UINT32 MaxLun; // VirtioScsiInit 1
- UINT32 MaxSectors; // VirtioScsiInit 1
- VRING Ring; // VirtioRingInit 2
- EFI_EXT_SCSI_PASS_THRU_PROTOCOL PassThru; // VirtioScsiInit 1
- EFI_EXT_SCSI_PASS_THRU_MODE PassThruMode; // VirtioScsiInit 1
- VOID *RingMap; // VirtioRingMap 2
+ UINT32 Signature; // DriverBindingStart 0
+ VIRTIO_DEVICE_PROTOCOL *VirtIo; // DriverBindingStart 0
+ EFI_EVENT ExitBoot; // DriverBindingStart 0
+ BOOLEAN InOutSupported; // VirtioScsiInit 1
+ UINT16 MaxTarget; // VirtioScsiInit 1
+ UINT32 MaxLun; // VirtioScsiInit 1
+ UINT32 MaxSectors; // VirtioScsiInit 1
+ VRING Ring; // VirtioRingInit 2
+ EFI_EXT_SCSI_PASS_THRU_PROTOCOL PassThru; // VirtioScsiInit 1
+ EFI_EXT_SCSI_PASS_THRU_MODE PassThruMode; // VirtioScsiInit 1
+ VOID *RingMap; // VirtioRingMap 2
} VSCSI_DEV;
#define VIRTIO_SCSI_FROM_PASS_THRU(PassThruPointer) \
CR (PassThruPointer, VSCSI_DEV, PassThru, VSCSI_SIG)
-
//
// Probe, start and stop functions of this driver, called by the DXE core for
// specific devices.
@@ -73,31 +70,28 @@ typedef struct {
EFI_STATUS
EFIAPI
VirtioScsiDriverBindingSupported (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE DeviceHandle,
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
+ IN EFI_DRIVER_BINDING_PROTOCOL *This,
+ IN EFI_HANDLE DeviceHandle,
+ IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
);
-
EFI_STATUS
EFIAPI
VirtioScsiDriverBindingStart (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE DeviceHandle,
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
+ IN EFI_DRIVER_BINDING_PROTOCOL *This,
+ IN EFI_HANDLE DeviceHandle,
+ IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
);
-
EFI_STATUS
EFIAPI
VirtioScsiDriverBindingStop (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE DeviceHandle,
- IN UINTN NumberOfChildren,
- IN EFI_HANDLE *ChildHandleBuffer
+ IN EFI_DRIVER_BINDING_PROTOCOL *This,
+ IN EFI_HANDLE DeviceHandle,
+ IN UINTN NumberOfChildren,
+ IN EFI_HANDLE *ChildHandleBuffer
);
-
//
// The next seven functions implement EFI_EXT_SCSI_PASS_THRU_PROTOCOL
// for the virtio-scsi HBA. Refer to UEFI Spec 2.3.1 + Errata C, sections
@@ -108,67 +102,60 @@ VirtioScsiDriverBindingStop (
EFI_STATUS
EFIAPI
VirtioScsiPassThru (
- IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
- IN UINT8 *Target,
- IN UINT64 Lun,
- IN OUT EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet,
- IN EFI_EVENT Event OPTIONAL
+ IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
+ IN UINT8 *Target,
+ IN UINT64 Lun,
+ IN OUT EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet,
+ IN EFI_EVENT Event OPTIONAL
);
-
EFI_STATUS
EFIAPI
VirtioScsiGetNextTargetLun (
- IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
- IN OUT UINT8 **Target,
- IN OUT UINT64 *Lun
+ IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
+ IN OUT UINT8 **Target,
+ IN OUT UINT64 *Lun
);
-
EFI_STATUS
EFIAPI
VirtioScsiBuildDevicePath (
- IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
- IN UINT8 *Target,
- IN UINT64 Lun,
- IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
+ IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
+ IN UINT8 *Target,
+ IN UINT64 Lun,
+ IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
);
-
EFI_STATUS
EFIAPI
VirtioScsiGetTargetLun (
- IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
- IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
- OUT UINT8 **Target,
- OUT UINT64 *Lun
+ IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
+ IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
+ OUT UINT8 **Target,
+ OUT UINT64 *Lun
);
-
EFI_STATUS
EFIAPI
VirtioScsiResetChannel (
- IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This
+ IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This
);
-
EFI_STATUS
EFIAPI
VirtioScsiResetTargetLun (
- IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
- IN UINT8 *Target,
- IN UINT64 Lun
+ IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
+ IN UINT8 *Target,
+ IN UINT64 Lun
);
-
EFI_STATUS
EFIAPI
VirtioScsiGetNextTarget (
- IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
- IN OUT UINT8 **Target
+ IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
+ IN OUT UINT8 **Target
);
-
//
// The purpose of the following scaffolding (EFI_COMPONENT_NAME_PROTOCOL and
// EFI_COMPONENT_NAME2_PROTOCOL implementation) is to format the driver's name
@@ -184,20 +171,19 @@ VirtioScsiGetNextTarget (
EFI_STATUS
EFIAPI
VirtioScsiGetDriverName (
- IN EFI_COMPONENT_NAME_PROTOCOL *This,
- IN CHAR8 *Language,
- OUT CHAR16 **DriverName
+ IN EFI_COMPONENT_NAME_PROTOCOL *This,
+ IN CHAR8 *Language,
+ OUT CHAR16 **DriverName
);
-
EFI_STATUS
EFIAPI
VirtioScsiGetDeviceName (
- IN EFI_COMPONENT_NAME_PROTOCOL *This,
- IN EFI_HANDLE DeviceHandle,
- IN EFI_HANDLE ChildHandle,
- IN CHAR8 *Language,
- OUT CHAR16 **ControllerName
+ IN EFI_COMPONENT_NAME_PROTOCOL *This,
+ IN EFI_HANDLE DeviceHandle,
+ IN EFI_HANDLE ChildHandle,
+ IN CHAR8 *Language,
+ OUT CHAR16 **ControllerName
);
#endif // _VIRTIO_SCSI_DXE_H_