TianoCore EDK2
master
Loading...
Searching...
No Matches
PvScsi.h
Go to the documentation of this file.
1
12
#ifndef __PVSCSI_DXE_H_
13
#define __PVSCSI_DXE_H_
14
15
#include <
Library/DebugLib.h
>
16
#include <
Protocol/ScsiPassThruExt.h
>
17
18
typedef
struct
{
19
EFI_PHYSICAL_ADDRESS
DeviceAddress;
20
VOID *Mapping;
21
}
PVSCSI_DMA_DESC
;
22
23
typedef
struct
{
24
PVSCSI_RINGS_STATE
*RingState;
25
PVSCSI_DMA_DESC
RingStateDmaDesc;
26
27
PVSCSI_RING_REQ_DESC
*RingReqs;
28
PVSCSI_DMA_DESC
RingReqsDmaDesc;
29
30
PVSCSI_RING_CMP_DESC
*RingCmps;
31
PVSCSI_DMA_DESC
RingCmpsDmaDesc;
32
}
PVSCSI_RING_DESC
;
33
34
typedef
struct
{
35
//
36
// As EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET.SenseDataLength is defined
37
// as UINT8, defining here SenseData size to MAX_UINT8 will guarantee it
38
// cannot overflow when passed to device.
39
//
40
UINT8 SenseData[MAX_UINT8];
41
//
42
// This size of the data is arbitrarily chosen.
43
// It seems to be sufficient for all I/O requests sent through
44
// EFI_SCSI_PASS_THRU_PROTOCOL.PassThru() for common boot scenarios.
45
//
46
UINT8 Data[0x2000];
47
}
PVSCSI_DMA_BUFFER
;
48
49
#define PVSCSI_SIG SIGNATURE_32 ('P', 'S', 'C', 'S')
50
51
typedef
struct
{
52
UINT32 Signature;
53
EFI_PCI_IO_PROTOCOL
*PciIo;
54
EFI_EVENT
ExitBoot;
55
UINT64 OriginalPciAttributes;
56
PVSCSI_RING_DESC
RingDesc;
57
PVSCSI_DMA_BUFFER
*DmaBuf;
58
PVSCSI_DMA_DESC
DmaBufDmaDesc;
59
UINT8 MaxTarget;
60
UINT8 MaxLun;
61
UINTN
WaitForCmpStallInUsecs;
62
EFI_EXT_SCSI_PASS_THRU_PROTOCOL
PassThru;
63
EFI_EXT_SCSI_PASS_THRU_MODE
PassThruMode;
64
}
PVSCSI_DEV
;
65
66
#define PVSCSI_FROM_PASS_THRU(PassThruPointer) \
67
CR (PassThruPointer, PVSCSI_DEV, PassThru, PVSCSI_SIG)
68
69
#define PVSCSI_DMA_BUF_DEV_ADDR(Dev, MemberName) \
70
(Dev->DmaBufDmaDesc.DeviceAddress + OFFSET_OF(PVSCSI_DMA_BUFFER, MemberName))
71
72
#endif
// __PVSCSI_DXE_H_
UINTN
UINT64 UINTN
Definition:
ProcessorBind.h:112
DebugLib.h
ScsiPassThruExt.h
EFI_PHYSICAL_ADDRESS
UINT64 EFI_PHYSICAL_ADDRESS
Definition:
UefiBaseType.h:50
EFI_EVENT
VOID * EFI_EVENT
Definition:
UefiBaseType.h:37
_EFI_EXT_SCSI_PASS_THRU_PROTOCOL
Definition:
ScsiPassThruExt.h:372
_EFI_PCI_IO_PROTOCOL
Definition:
PciIo.h:516
EFI_EXT_SCSI_PASS_THRU_MODE
Definition:
ScsiPassThruExt.h:62
PVSCSI_DEV
Definition:
PvScsi.h:51
PVSCSI_DMA_BUFFER
Definition:
PvScsi.h:34
PVSCSI_DMA_DESC
Definition:
PvScsi.h:18
PVSCSI_RING_CMP_DESC
Definition:
PvScsi.h:176
PVSCSI_RING_DESC
Definition:
PvScsi.h:23
PVSCSI_RING_REQ_DESC
Definition:
PvScsi.h:111
PVSCSI_RINGS_STATE
Definition:
PvScsi.h:79
OvmfPkg
PvScsiDxe
PvScsi.h
Generated on Fri Nov 15 2024 18:01:20 for TianoCore EDK2 by
1.9.6