OvmfPkg/LsiScsiDxe: Map DMA buffer
Map DMA buffer and perpare for the implementation of LsiScsiPassThru(). v2: - Replace 0x10000 with SIZE_64KB macro for the DMA buffer data array - Remove DUAL_ADDRESS_CYCLE from PciIo since we don't really need 64-bit DMA address Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com> Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20200717061130.8881-9-glin@suse.com>
This commit is contained in:
@@ -12,6 +12,17 @@
|
||||
#ifndef _LSI_SCSI_DXE_H_
|
||||
#define _LSI_SCSI_DXE_H_
|
||||
|
||||
typedef struct {
|
||||
//
|
||||
// Allocate 64KB for read/write buffer. It seems sufficient for the common
|
||||
// boot scenarios.
|
||||
//
|
||||
// NOTE: The number of bytes for data transmission is bounded by DMA Byte
|
||||
// Count (DBC), a 24-bit register, so the maximum is 0xFFFFFF (16MB-1).
|
||||
//
|
||||
UINT8 Data[SIZE_64KB];
|
||||
} LSI_SCSI_DMA_BUFFER;
|
||||
|
||||
typedef struct {
|
||||
UINT32 Signature;
|
||||
UINT64 OrigPciAttrs;
|
||||
@@ -19,6 +30,9 @@ typedef struct {
|
||||
EFI_PCI_IO_PROTOCOL *PciIo;
|
||||
UINT8 MaxTarget;
|
||||
UINT8 MaxLun;
|
||||
LSI_SCSI_DMA_BUFFER *Dma;
|
||||
EFI_PHYSICAL_ADDRESS DmaPhysical;
|
||||
VOID *DmaMapping;
|
||||
EFI_EXT_SCSI_PASS_THRU_MODE PassThruMode;
|
||||
EFI_EXT_SCSI_PASS_THRU_PROTOCOL PassThru;
|
||||
} LSI_SCSI_DEV;
|
||||
|
Reference in New Issue
Block a user