From nobody Sun Feb 8 03:32:57 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+103726+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+103726+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linux.microsoft.com ARC-Seal: i=1; a=rsa-sha256; t=1682616989; cv=none; d=zohomail.com; s=zohoarc; b=QHjT6Tapz7W5GUwUgkAJB2n0i6acCiue6gqcnyn/1iY5WbXdsTQgc6rKO9UfAbLe3VWHgmWXT0dBQQxa6UaDb9FmfGOknB+/8GMiTnbOLXIa6IEVMIYMgPWKGbkMg2KDF1n7dkR/hOEGPHCYaizCq5zdGjkbd2oNBYmK9Fq8Ooc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1682616989; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=A98w+2AYGwkb5TksnD2j+IYWLCflkjG10mJ7TCwmMRs=; b=ffOesjmld1T3PqdXJmmOzDzGlRHEb7/26XIRAz8/fJZJE4Maamc5L8GWIkMWEER8jMAogwo3AaXxi9TWAbwXWdJneUCtGqW6yeMNpsrP8Fm3wLQmrqtXHOW0p2eltVnB7FXJAYVq7RewurQO3N6u/XBLRfHbCB6Z9CCoaQGSfjI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+103726+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1682616989442367.9005816690053; Thu, 27 Apr 2023 10:36:29 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id H6VeYY1788612xLezYJRudRT; Thu, 27 Apr 2023 10:36:29 -0700 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web11.27509.1682616987179416161 for ; Thu, 27 Apr 2023 10:36:27 -0700 X-Received: from OSD-Desktop.redmond.corp.microsoft.com (unknown [131.107.1.171]) by linux.microsoft.com (Postfix) with ESMTPSA id AB51621C33E1; Thu, 27 Apr 2023 10:36:26 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com AB51621C33E1 From: "Oliver Smith-Denny" To: devel@edk2.groups.io Cc: Hao A Wu , Ray Ni , Jian J Wang , Liming Gao , Michael Kubacki , Sean Brogan Subject: [edk2-devel][PATCH v2 1/2] Add the volatile keyword to NvmExpressDxe's Passthru CQ Date: Thu, 27 Apr 2023 10:36:21 -0700 Message-Id: <20230427173622.10614-2-osde@linux.microsoft.com> In-Reply-To: <20230427173622.10614-1-osde@linux.microsoft.com> References: <20230427173622.10614-1-osde@linux.microsoft.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: 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,osde@linux.microsoft.com X-Gm-Message-State: wsl8AxvuDtRJA6M8BG9so19Bx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1682616989; bh=JIZC6fj6DbIcWlJjuA9f3u5b+m/phrmAdM3VvpaYLwE=; h=Cc:Date:From:Reply-To:Subject:To; b=joLVwo+tG407BZKZCsHfHjPX10rz6v0c++oJkcrt2GE+hIdag23Td9GD4s5Mt5AuerA XVjctrI9Ckt2pTQ/axc7j89EsTGBpBCJI7Z8Msok9ekA5+94fiUvqfunVmrnMjv8d7S4m qL9lIA6VZz/pjOCji9NVhN5tinNQuMan6Kg= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1682616990564100015 Content-Type: text/plain; charset="utf-8" This updates the relevant functions that expect a non-volatile structure to be passed to them to take casts of the CQ now that it is volatile. Cc: Hao A Wu Cc: Ray Ni Cc: Jian J Wang Cc: Liming Gao Cc: Michael Kubacki Cc: Sean Brogan Signed-off-by: Oliver Smith-Denny --- MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c b/MdeM= odulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c index f37baa626a16..2ff2cb0e8d36 100644 --- a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c +++ b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c @@ -460,7 +460,7 @@ NvmExpressPassThru ( EFI_STATUS PreviousStatus; EFI_PCI_IO_PROTOCOL *PciIo; NVME_SQ *Sq; - NVME_CQ *Cq; + volatile NVME_CQ *Cq; UINT16 QueueId; UINT16 QueueSize; UINT32 Bytes; @@ -815,14 +815,14 @@ NvmExpressPassThru ( // Dump every completion entry status for debugging. // DEBUG_CODE_BEGIN (); - NvmeDumpStatus (Cq); + NvmeDumpStatus ((NVME_CQ *)Cq); DEBUG_CODE_END (); } =20 // // Copy the Respose Queue entry for this command to the callers respon= se buffer // - CopyMem (Packet->NvmeCompletion, Cq, sizeof (EFI_NVM_EXPRESS_COMPLETIO= N)); + CopyMem (Packet->NvmeCompletion, (VOID *)Cq, sizeof (EFI_NVM_EXPRESS_C= OMPLETION)); } else { // // Timeout occurs for an NVMe command. Reset the controller to abort t= he --=20 2.40.0 -=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 (#103726): https://edk2.groups.io/g/devel/message/103726 Mute This Topic: https://groups.io/mt/98541928/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-