From nobody Tue Nov 26 08:42:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+56548+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+56548+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=oracle.com ARC-Seal: i=1; a=rsa-sha256; t=1585425554; cv=none; d=zohomail.com; s=zohoarc; b=nEQE8RZjNI3eRz66CVNXNHOAmt022P8iyES61JY+FRyqm0Rn8L/ZvYQ2psfxumoltWJ78n5jAWIRUFtGxsadA/U8WIVHYJMuBZThn1+8rRXP9hyGj3/guL+e+LO6+WpsZ/rkBBasV2jlirbT5OCu/nkyemgNgasWn0Lv9JjhKLo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585425554; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=MmXNxYM8TYJslBp1lQxrWXNPDDrYp8v2ha5GSOCeF7Y=; b=Gb6zxdsafBefpT9Bswn6gXSTQr6KhF6JpR8dxRPgVL2ueidzAf4cnDNPvt/FcU/hclTT5iEOlWWTxcvJfEocsUls8uJ1Iktv3pHNI7TWAtIks89Vi0ATQ17CzTGcRCLjrWsC1sktCxfEXsQIxHBFTKAT68WLvA3Okcrztspqx6A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+56548+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1585425554481125.82831574806585; Sat, 28 Mar 2020 12:59:14 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id VLR1YY1788612xyUnknkTEGu; Sat, 28 Mar 2020 12:59:14 -0700 X-Received: from aserp2120.oracle.com (aserp2120.oracle.com [141.146.126.78]) by mx.groups.io with SMTP id smtpd.web10.14137.1585425553444636349 for ; Sat, 28 Mar 2020 12:59:13 -0700 X-Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 02SJlMbg028036; Sat, 28 Mar 2020 19:59:13 GMT X-Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by aserp2120.oracle.com with ESMTP id 301xhkhh0b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 28 Mar 2020 19:59:12 +0000 X-Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 02SJpfFd050786; Sat, 28 Mar 2020 19:59:12 GMT X-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3020.oracle.com with ESMTP id 301xd211cp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 28 Mar 2020 19:59:12 +0000 X-Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 02SJxB9b008998; Sat, 28 Mar 2020 19:59:11 GMT X-Received: from spark.ravello.local (/213.57.127.2) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 28 Mar 2020 12:59:10 -0700 From: "Liran Alon" To: devel@edk2.groups.io, lersek@redhat.com Cc: nikita.leshchenko@oracle.com, aaron.young@oracle.com, jordan.l.justen@intel.com, ard.biesheuvel@linaro.org, Liran Alon Subject: [edk2-devel] [PATCH v3 15/17] OvmfPkg/PvScsiDxe: Support sending SCSI request and receive response Date: Sat, 28 Mar 2020 23:00:58 +0300 Message-Id: <20200328200100.60786-16-liran.alon@oracle.com> In-Reply-To: <20200328200100.60786-1-liran.alon@oracle.com> References: <20200328200100.60786-1-liran.alon@oracle.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,liran.alon@oracle.com X-Gm-Message-State: KipRVKMKDeeb2bo1lImSIpKDx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1585425554; bh=CEnfgxykg2+vGiBjvCNP3qMrBbDpOLExnhfbw6SZqbU=; h=Cc:Date:From:Reply-To:Subject:To; b=qJwBq72BFEP1M8CyRTMRENmtq/vW4Xz9xvWwDBESkHP/2rEA3UFch5qcG1xc5CiALCE gi1774bPUoYgOv681DOH+CMObuGKcFfccXs5x2a59NpVxYpNDYSDvH45Khff/5UAwkAuI 0DZmAEb6M75VTdcUZuM9OJdurFJYJC2417I= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Implement EXT_SCSI_PASS_THRU.PassThru(). Machines should be able to boot after this commit. Tested with Ubuntu 16.04 guest. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2567 Signed-off-by: Liran Alon Reviewed-by: Laszlo Ersek --- OvmfPkg/OvmfPkg.dec | 6 + OvmfPkg/PvScsiDxe/PvScsi.c | 456 +++++++++++++++++++++++++++++++- OvmfPkg/PvScsiDxe/PvScsi.h | 1 + OvmfPkg/PvScsiDxe/PvScsiDxe.inf | 5 +- 4 files changed, 465 insertions(+), 3 deletions(-) diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec index a04aee5c2cd4..ff49ec0e9e6a 100644 --- a/OvmfPkg/OvmfPkg.dec +++ b/OvmfPkg/OvmfPkg.dec @@ -130,6 +130,12 @@ gUefiOvmfPkgTokenSpaceGuid.PcdPvScsiMaxTargetLimit|64|UINT8|0x36 gUefiOvmfPkgTokenSpaceGuid.PcdPvScsiMaxLunLimit|0|UINT8|0x37 =20 + ## After PvScsiDxe sends a SCSI request to the device, it waits for + # the request completion in a polling loop. + # This constant defines how many micro-seconds to wait between each + # polling loop iteration. + gUefiOvmfPkgTokenSpaceGuid.PcdPvScsiWaitForCmpStallInUsecs|5|UINT32|0x38 + gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogBase|0x0|UINT32|= 0x8 gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogSize|0x0|UINT32|= 0x9 gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareFdSize|0x0|UINT32|0xa diff --git a/OvmfPkg/PvScsiDxe/PvScsi.c b/OvmfPkg/PvScsiDxe/PvScsi.c index 6e350bb2d6e0..da3535c75220 100644 --- a/OvmfPkg/PvScsiDxe/PvScsi.c +++ b/OvmfPkg/PvScsiDxe/PvScsi.c @@ -32,6 +32,27 @@ // Ext SCSI Pass Thru utilities // =20 +/** + Reads a 32-bit value into BAR0 using MMIO +**/ +STATIC +EFI_STATUS +PvScsiMmioRead32 ( + IN CONST PVSCSI_DEV *Dev, + IN UINT64 Offset, + OUT UINT32 *Value + ) +{ + return Dev->PciIo->Mem.Read ( + Dev->PciIo, + EfiPciIoWidthUint32, + PCI_BAR_IDX0, + Offset, + 1, // Count + Value + ); +} + /** Writes a 32-bit value into BAR0 using MMIO **/ @@ -133,6 +154,383 @@ PvScsiResetAdapter ( return PvScsiWriteCmdDesc (Dev, PvScsiCmdAdapterReset, NULL, 0); } =20 +/** + Returns if PVSCSI request ring is full +**/ +STATIC +BOOLEAN +PvScsiIsReqRingFull ( + IN CONST PVSCSI_DEV *Dev + ) +{ + PVSCSI_RINGS_STATE *RingsState; + UINT32 ReqNumEntries; + + RingsState =3D Dev->RingDesc.RingState; + ReqNumEntries =3D 1U << RingsState->ReqNumEntriesLog2; + return (RingsState->ReqProdIdx - RingsState->CmpConsIdx) >=3D ReqNumEntr= ies; +} + +/** + Returns pointer to current request descriptor to produce +**/ +STATIC +PVSCSI_RING_REQ_DESC * +PvScsiGetCurrentRequest ( + IN CONST PVSCSI_DEV *Dev + ) +{ + PVSCSI_RINGS_STATE *RingState; + UINT32 ReqNumEntries; + + RingState =3D Dev->RingDesc.RingState; + ReqNumEntries =3D 1U << RingState->ReqNumEntriesLog2; + return Dev->RingDesc.RingReqs + + (RingState->ReqProdIdx & (ReqNumEntries - 1)); +} + +/** + Returns pointer to current completion descriptor to consume +**/ +STATIC +PVSCSI_RING_CMP_DESC * +PvScsiGetCurrentResponse ( + IN CONST PVSCSI_DEV *Dev + ) +{ + PVSCSI_RINGS_STATE *RingState; + UINT32 CmpNumEntries; + + RingState =3D Dev->RingDesc.RingState; + CmpNumEntries =3D 1U << RingState->CmpNumEntriesLog2; + return Dev->RingDesc.RingCmps + + (RingState->CmpConsIdx & (CmpNumEntries - 1)); +} + +/** + Wait for device to signal completion of submitted requests +**/ +STATIC +EFI_STATUS +PvScsiWaitForRequestCompletion ( + IN CONST PVSCSI_DEV *Dev + ) +{ + EFI_STATUS Status; + UINT32 IntrStatus; + + // + // Note: We don't yet support Timeout according to + // EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET.Timeout. + // + // This is consistent with some other Scsi PassThru drivers + // such as VirtioScsi. + // + for (;;) { + Status =3D PvScsiMmioRead32 (Dev, PvScsiRegOffsetIntrStatus, &IntrStat= us); + if (EFI_ERROR (Status)) { + return Status; + } + + // + // PVSCSI_INTR_CMPL_MASK is set if device completed submitted requests + // + if ((IntrStatus & PVSCSI_INTR_CMPL_MASK) !=3D 0) { + break; + } + + gBS->Stall (Dev->WaitForCmpStallInUsecs); + } + + // + // Acknowledge PVSCSI_INTR_CMPL_MASK in device interrupt-status register + // + return PvScsiMmioWrite32 ( + Dev, + PvScsiRegOffsetIntrStatus, + PVSCSI_INTR_CMPL_MASK + ); +} + +/** + Create a fake host adapter error +**/ +STATIC +EFI_STATUS +ReportHostAdapterError ( + OUT EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet + ) +{ + Packet->InTransferLength =3D 0; + Packet->OutTransferLength =3D 0; + Packet->SenseDataLength =3D 0; + Packet->HostAdapterStatus =3D EFI_EXT_SCSI_STATUS_HOST_ADAPTER_OTHER; + Packet->TargetStatus =3D EFI_EXT_SCSI_STATUS_TARGET_GOOD; + return EFI_DEVICE_ERROR; +} + +/** + Create a fake host adapter overrun error +**/ +STATIC +EFI_STATUS +ReportHostAdapterOverrunError ( + OUT EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet + ) +{ + Packet->SenseDataLength =3D 0; + Packet->HostAdapterStatus =3D + EFI_EXT_SCSI_STATUS_HOST_ADAPTER_DATA_OVERRUN_UNDERRUN; + Packet->TargetStatus =3D EFI_EXT_SCSI_STATUS_TARGET_GOOD; + return EFI_BAD_BUFFER_SIZE; +} + +/** + Populate a PVSCSI request descriptor from the Extended SCSI Pass Thru + Protocol packet. +**/ +STATIC +EFI_STATUS +PopulateRequest ( + IN CONST PVSCSI_DEV *Dev, + IN UINT8 *Target, + IN UINT64 Lun, + IN OUT EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet, + OUT PVSCSI_RING_REQ_DESC *Request + ) +{ + UINT8 TargetValue; + + // + // We only use first byte of target identifer + // + TargetValue =3D *Target; + + // + // Check for unsupported requests + // + if ( + // + // Bidirectional transfer was requested + // + (Packet->InTransferLength > 0 && Packet->OutTransferLength > 0) || + (Packet->DataDirection =3D=3D EFI_EXT_SCSI_DATA_DIRECTION_BIDIRECTIO= NAL) || + // + // Command Descriptor Block bigger than this constant should be cons= idered + // out-of-band. We currently don't support these CDBs. + // + (Packet->CdbLength > PVSCSI_CDB_MAX_SIZE) + ) { + + // + // This error code doesn't require updates to the Packet output fields + // + return EFI_UNSUPPORTED; + } + + // + // Check for invalid parameters + // + if ( + // + // Addressed invalid device + // + (TargetValue > Dev->MaxTarget) || (Lun > Dev->MaxLun) || + // + // Invalid direction (there doesn't seem to be a macro for the "no d= ata + // transferred" "direction", eg. for TEST UNIT READY) + // + (Packet->DataDirection > EFI_EXT_SCSI_DATA_DIRECTION_BIDIRECTIONAL) = || + // + // Trying to receive, but destination pointer is NULL, or contradict= ing + // transfer direction + // + ((Packet->InTransferLength > 0) && + ((Packet->InDataBuffer =3D=3D NULL) || + (Packet->DataDirection =3D=3D EFI_EXT_SCSI_DATA_DIRECTION_WRITE) + ) + ) || + // + // Trying to send, but source pointer is NULL, or contradicting + // transfer direction + // + ((Packet->OutTransferLength > 0) && + ((Packet->OutDataBuffer =3D=3D NULL) || + (Packet->DataDirection =3D=3D EFI_EXT_SCSI_DATA_DIRECTION_READ) + ) + ) + ) { + + // + // This error code doesn't require updates to the Packet output fields + // + return EFI_INVALID_PARAMETER; + } + + // + // Check for input/output buffer too large for DMA communication buffer + // + if (Packet->InTransferLength > sizeof (Dev->DmaBuf->Data)) { + Packet->InTransferLength =3D sizeof (Dev->DmaBuf->Data); + return ReportHostAdapterOverrunError (Packet); + } + if (Packet->OutTransferLength > sizeof (Dev->DmaBuf->Data)) { + Packet->OutTransferLength =3D sizeof (Dev->DmaBuf->Data); + return ReportHostAdapterOverrunError (Packet); + } + + // + // Encode PVSCSI request + // + ZeroMem (Request, sizeof (*Request)); + + Request->Bus =3D 0; + Request->Target =3D TargetValue; + // + // This cast is safe as PVSCSI_DEV.MaxLun is defined as UINT8 + // + Request->Lun[1] =3D (UINT8)Lun; + Request->SenseLen =3D Packet->SenseDataLength; + // + // DMA communication buffer SenseData overflow is not possible + // due to Packet->SenseDataLength defined as UINT8 + // + Request->SenseAddr =3D PVSCSI_DMA_BUF_DEV_ADDR (Dev, SenseData); + Request->CdbLen =3D Packet->CdbLength; + CopyMem (Request->Cdb, Packet->Cdb, Packet->CdbLength); + Request->VcpuHint =3D 0; + Request->Tag =3D PVSCSI_SIMPLE_QUEUE_TAG; + if (Packet->DataDirection =3D=3D EFI_EXT_SCSI_DATA_DIRECTION_READ) { + Request->Flags =3D PVSCSI_FLAG_CMD_DIR_TOHOST; + Request->DataLen =3D Packet->InTransferLength; + } else { + Request->Flags =3D PVSCSI_FLAG_CMD_DIR_TODEVICE; + Request->DataLen =3D Packet->OutTransferLength; + CopyMem ( + Dev->DmaBuf->Data, + Packet->OutDataBuffer, + Packet->OutTransferLength + ); + } + Request->DataAddr =3D PVSCSI_DMA_BUF_DEV_ADDR (Dev, Data); + + return EFI_SUCCESS; +} + +/** + Handle the PVSCSI device response: + - Copy returned data from DMA communication buffer. + - Update fields in Extended SCSI Pass Thru Protocol packet as required. + - Translate response code to EFI status code and host adapter status. +**/ +STATIC +EFI_STATUS +HandleResponse ( + IN PVSCSI_DEV *Dev, + IN OUT EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet, + IN CONST PVSCSI_RING_CMP_DESC *Response + ) +{ + // + // Fix SenseDataLength to amount of data returned + // + if (Packet->SenseDataLength > Response->SenseLen) { + Packet->SenseDataLength =3D (UINT8)Response->SenseLen; + } + // + // Copy sense data from DMA communication buffer + // + CopyMem ( + Packet->SenseData, + Dev->DmaBuf->SenseData, + Packet->SenseDataLength + ); + + // + // Copy device output from DMA communication buffer + // + if (Packet->DataDirection =3D=3D EFI_EXT_SCSI_DATA_DIRECTION_READ) { + CopyMem (Packet->InDataBuffer, Dev->DmaBuf->Data, Packet->InTransferLe= ngth); + } + + // + // Report target status + // + Packet->TargetStatus =3D Response->ScsiStatus; + + // + // Host adapter status and function return value depend on + // device response's host status + // + switch (Response->HostStatus) { + case PvScsiBtStatSuccess: + case PvScsiBtStatLinkedCommandCompleted: + case PvScsiBtStatLinkedCommandCompletedWithFlag: + Packet->HostAdapterStatus =3D EFI_EXT_SCSI_STATUS_HOST_ADAPTER_OK; + return EFI_SUCCESS; + + case PvScsiBtStatDataUnderrun: + // + // Report transferred amount in underrun + // + if (Packet->DataDirection =3D=3D EFI_EXT_SCSI_DATA_DIRECTION_READ) { + Packet->InTransferLength =3D (UINT32)Response->DataLen; + } else { + Packet->OutTransferLength =3D (UINT32)Response->DataLen; + } + Packet->HostAdapterStatus =3D + EFI_EXT_SCSI_STATUS_HOST_ADAPTER_DATA_OVERRUN_UNDERRUN; + return EFI_SUCCESS; + + case PvScsiBtStatDatarun: + Packet->HostAdapterStatus =3D + EFI_EXT_SCSI_STATUS_HOST_ADAPTER_DATA_OVERRUN_UNDERRUN; + return EFI_SUCCESS; + + case PvScsiBtStatSelTimeout: + Packet->HostAdapterStatus =3D + EFI_EXT_SCSI_STATUS_HOST_ADAPTER_SELECTION_TIMEOUT; + return EFI_TIMEOUT; + + case PvScsiBtStatBusFree: + Packet->HostAdapterStatus =3D EFI_EXT_SCSI_STATUS_HOST_ADAPTER_BUS_F= REE; + break; + + case PvScsiBtStatInvPhase: + Packet->HostAdapterStatus =3D EFI_EXT_SCSI_STATUS_HOST_ADAPTER_PHASE= _ERROR; + break; + + case PvScsiBtStatSensFailed: + Packet->HostAdapterStatus =3D + EFI_EXT_SCSI_STATUS_HOST_ADAPTER_REQUEST_SENSE_FAILED; + break; + + case PvScsiBtStatTagReject: + case PvScsiBtStatBadMsg: + Packet->HostAdapterStatus =3D + EFI_EXT_SCSI_STATUS_HOST_ADAPTER_MESSAGE_REJECT; + break; + + case PvScsiBtStatBusReset: + Packet->HostAdapterStatus =3D EFI_EXT_SCSI_STATUS_HOST_ADAPTER_BUS_R= ESET; + break; + + case PvScsiBtStatHaTimeout: + Packet->HostAdapterStatus =3D EFI_EXT_SCSI_STATUS_HOST_ADAPTER_TIMEO= UT; + return EFI_TIMEOUT; + + case PvScsiBtStatScsiParity: + Packet->HostAdapterStatus =3D EFI_EXT_SCSI_STATUS_HOST_ADAPTER_PARIT= Y_ERROR; + break; + + default: + Packet->HostAdapterStatus =3D EFI_EXT_SCSI_STATUS_HOST_ADAPTER_OTHER; + break; + } + + return EFI_DEVICE_ERROR; +} + /** Check if Target argument to EXT_SCSI_PASS_THRU.GetNextTarget() and EXT_SCSI_PASS_THRU.GetNextTargetLun() is initialized @@ -168,7 +566,62 @@ PvScsiPassThru ( IN EFI_EVENT Event OPTIONAL ) { - return EFI_UNSUPPORTED; + PVSCSI_DEV *Dev; + EFI_STATUS Status; + PVSCSI_RING_REQ_DESC *Request; + PVSCSI_RING_CMP_DESC *Response; + + Dev =3D PVSCSI_FROM_PASS_THRU (This); + + if (PvScsiIsReqRingFull (Dev)) { + return EFI_NOT_READY; + } + + Request =3D PvScsiGetCurrentRequest (Dev); + + Status =3D PopulateRequest (Dev, Target, Lun, Packet, Request); + if (EFI_ERROR (Status)) { + return Status; + } + + // + // Writes to Request must be globally visible before making request + // available to device + // + MemoryFence (); + Dev->RingDesc.RingState->ReqProdIdx++; + + Status =3D PvScsiMmioWrite32 (Dev, PvScsiRegOffsetKickRwIo, 0); + if (EFI_ERROR (Status)) { + // + // If kicking the host fails, we must fake a host adapter error. + // EFI_NOT_READY would save us the effort, but it would also suggest t= hat + // the caller retry. + // + return ReportHostAdapterError (Packet); + } + + Status =3D PvScsiWaitForRequestCompletion (Dev); + if (EFI_ERROR (Status)) { + // + // If waiting for request completion fails, we must fake a host adapter + // error. EFI_NOT_READY would save us the effort, but it would also su= ggest + // that the caller retry. + // + return ReportHostAdapterError (Packet); + } + + Response =3D PvScsiGetCurrentResponse (Dev); + Status =3D HandleResponse (Dev, Packet, Response); + + // + // Reads from response must complete before releasing completion entry + // to device + // + MemoryFence (); + Dev->RingDesc.RingState->CmpConsIdx++; + + return Status; } =20 STATIC @@ -652,6 +1105,7 @@ PvScsiInit ( // Dev->MaxTarget =3D PcdGet8 (PcdPvScsiMaxTargetLimit); Dev->MaxLun =3D PcdGet8 (PcdPvScsiMaxLunLimit); + Dev->WaitForCmpStallInUsecs =3D PcdGet32 (PcdPvScsiWaitForCmpStallInUsec= s); =20 // // Set PCI Attributes diff --git a/OvmfPkg/PvScsiDxe/PvScsi.h b/OvmfPkg/PvScsiDxe/PvScsi.h index fff12146dc75..02feac734743 100644 --- a/OvmfPkg/PvScsiDxe/PvScsi.h +++ b/OvmfPkg/PvScsiDxe/PvScsi.h @@ -57,6 +57,7 @@ typedef struct { PVSCSI_DMA_DESC DmaBufDmaDesc; UINT8 MaxTarget; UINT8 MaxLun; + UINTN WaitForCmpStallInUsecs; EFI_EXT_SCSI_PASS_THRU_PROTOCOL PassThru; EFI_EXT_SCSI_PASS_THRU_MODE PassThruMode; } PVSCSI_DEV; diff --git a/OvmfPkg/PvScsiDxe/PvScsiDxe.inf b/OvmfPkg/PvScsiDxe/PvScsiDxe.= inf index 6200533698fc..284035fb10d4 100644 --- a/OvmfPkg/PvScsiDxe/PvScsiDxe.inf +++ b/OvmfPkg/PvScsiDxe/PvScsiDxe.inf @@ -39,5 +39,6 @@ gEfiPciIoProtocolGuid ## TO_START =20 [Pcd] - gUefiOvmfPkgTokenSpaceGuid.PcdPvScsiMaxLunLimit ## CONSUMES - gUefiOvmfPkgTokenSpaceGuid.PcdPvScsiMaxTargetLimit ## CONSUMES + gUefiOvmfPkgTokenSpaceGuid.PcdPvScsiMaxLunLimit ## CONSUMES + gUefiOvmfPkgTokenSpaceGuid.PcdPvScsiMaxTargetLimit ## CONSUMES + gUefiOvmfPkgTokenSpaceGuid.PcdPvScsiWaitForCmpStallInUsecs ## CONSUMES --=20 2.20.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#56548): https://edk2.groups.io/g/devel/message/56548 Mute This Topic: https://groups.io/mt/72617153/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-