From nobody Wed May 15 17:27:34 2024 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+87899+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+87899+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1648030965; cv=none; d=zohomail.com; s=zohoarc; b=XOnkyEgB2No8C2de8MID9XcN1mmCUxrs3UXmzAUHpZzs7i+5bmcHzwJIECGuL8wiqhwq2GBa2Eo0fe6ukOw6VAJ31XHq3TtfARMGxh+mPHI07hBOtknxeiCNywNpE13uaTbbeyD8fL9LgaUsThqFky/a8/cZSs7wsrlGGBuhdcY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1648030965; 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=1pGSIn5dn95TrYc7gY3Xg735eP1zLiJTaO23XwZth7I=; b=HLK2tOn49O29NL1/Fy+cEGVbWq+MZAYrZld5jv1q4+fsA/hVl4LFntW6SHBezmWphx04f4vnrdhRR8eY5Fk7TpB3CYxEvYsMPoCEOF7FqK4Mh6SUjVbxpjINQ5ciagnNTEJCtVpgIThA8adsvc5qTpKqn4QRAk2SsNCLqlcL3Xs= 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+87899+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1648030965949234.3026139170961; Wed, 23 Mar 2022 03:22:45 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id z75WYY1788612xa6GXO53snX; Wed, 23 Mar 2022 03:22:45 -0700 X-Received: from rondra.lf-net.org (rondra.lf-net.org [188.68.36.203]) by mx.groups.io with SMTP id smtpd.web11.7463.1648030964124596709 for ; Wed, 23 Mar 2022 03:22:45 -0700 X-Received: from localhost (localhost [127.0.0.1]) by rondra.lf-net.org (Postfix) with ESMTP id A7DD85FDB6; Wed, 23 Mar 2022 10:22:42 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at rondra.lf-net.org X-Received: from rondra.lf-net.org ([127.0.0.1]) by localhost (rondra.lf-net.org [127.0.0.1]) (amavisd-new, port 10026) with LMTP id eoEcp7woUb7r; Wed, 23 Mar 2022 10:22:42 +0000 (UTC) X-Received: from LF-T470.home.lf-net.dn42 (unknown [IPv6:2001:16b8:5549:3f01:4a51:c5ff:fe7a:408b]) by rondra.lf-net.org (Postfix) with ESMTPSA id E1B4C5FDB2; Wed, 23 Mar 2022 10:22:41 +0000 (UTC) From: "Mara Sophie Grosch via groups.io" To: devel@edk2.groups.io Cc: hao.a.wu@intel.com, Mara Sophie Grosch Subject: [edk2-devel] [PATCH v2 1/2] MdeModulePkg/NvmExpressDxe: fix check for Cap.Css Date: Wed, 23 Mar 2022 11:22:33 +0100 Message-Id: <5cae05f846015b8316e47c500ce8650b92365411.1648029370.git.littlefox@lf-net.org> In-Reply-To: References: <16DE909798871558.18232@groups.io> 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,littlefox@lf-net.org X-Gm-Message-State: ywWz9nvXaU75daGR408a6H29x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1648030965; bh=gaJmVgbxXK1Vr+svQAlVB/EHwDQlZftN+mG2K0zWoO4=; h=Cc:Date:From:Reply-To:Subject:To; b=Olo2LDM5DkO50HLcQWcAW5O2s6I8FWP0cUBKuDpvRIj4nROfSLjltOzJFar0A4FkKJp S490EeY0enxUyoSMRzT4eeUIguduVzNNwAPh2pL9r5iI6op7iGIgobTX7zlFxznqX6oXk jpdyc/95pbxWceqVGHUT5VYiBVGmHBjANsE= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1648030967555100006 Content-Type: text/plain; charset="utf-8" Fix the check for NVMe command set being supported by the controller. Was problematic with qemu (6.2.0, Debian 1:6.2+dfsg-3), which sets 0xC1 in that register, making the OVMF think the NVMe controller does not support NVMe. Uncovered by commit 9dd14fc91c174eae87fd122c7ac70073a363527f, which changed the number of bits included in the Css register from 4 to 8. Signed-off-by: Mara Sophie Grosch Reviewed-by: Hao A Wu --- MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c b/MdeModule= Pkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c index d87212ffb2..b90c48731c 100644 --- a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c +++ b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c @@ -761,7 +761,7 @@ NvmeControllerInit ( return Status; } =20 - if (Private->Cap.Css !=3D 0x01) { + if ((Private->Cap.Css & BIT0) =3D=3D 0) { DEBUG ((DEBUG_INFO, "NvmeControllerInit: the controller doesn't suppor= t NVMe command set\n")); return EFI_UNSUPPORTED; } --=20 2.35.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 (#87899): https://edk2.groups.io/g/devel/message/87899 Mute This Topic: https://groups.io/mt/89972394/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- From nobody Wed May 15 17:27:34 2024 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+87900+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+87900+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1648030968; cv=none; d=zohomail.com; s=zohoarc; b=e9EF3zqgJUCteDlDtTekLcgm60i08xBBz1JD3lIpYJTw8Wwu9SSEK/57bKC8VOQ9JDKu9i+9UNCfzuB2TnEuyF+mSD60bElI9lJjS3R9kqugxl0HJuqv60QE+Xaxk/2pQehLa3N5hstaKFoL8HiRZwjXy9rgKvtrGBjjlF9ABfo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1648030968; 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=LSSFP4Eahiq7VzrkQ7YlJ5PXvtoc5toDpPJOkxNnQ5A=; b=OscsX9dEJOjd5JmLpyuKjRY7fKToW/ZjAA03si2XM3HRiLxJAHPQI8GyjzDOINzqeSyyeg+9joZ5XRiSIyyddqQMINyGJ/yaog86gVdzTZSL6uoLhkXq+gTbEQ2JPtiZxjlwgibeYq8wwGhgtA3c0iBlO7eyJXpljv8/+EhpHhU= 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+87900+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1648030968083199.88497337642752; Wed, 23 Mar 2022 03:22:48 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id jgVvYY1788612xOjq1dvvms1; Wed, 23 Mar 2022 03:22:47 -0700 X-Received: from rondra.lf-net.org (rondra.lf-net.org [188.68.36.203]) by mx.groups.io with SMTP id smtpd.web12.7466.1648030966480069961 for ; Wed, 23 Mar 2022 03:22:47 -0700 X-Received: from localhost (localhost [127.0.0.1]) by rondra.lf-net.org (Postfix) with ESMTP id 40EAF5FDB7; Wed, 23 Mar 2022 10:22:44 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at rondra.lf-net.org X-Received: from rondra.lf-net.org ([127.0.0.1]) by localhost (rondra.lf-net.org [127.0.0.1]) (amavisd-new, port 10026) with LMTP id c8w4fud-QHxn; Wed, 23 Mar 2022 10:22:44 +0000 (UTC) X-Received: from LF-T470.home.lf-net.dn42 (unknown [IPv6:2001:16b8:5549:3f01:4a51:c5ff:fe7a:408b]) by rondra.lf-net.org (Postfix) with ESMTPSA id 077925FDB2; Wed, 23 Mar 2022 10:22:44 +0000 (UTC) From: "Mara Sophie Grosch via groups.io" To: devel@edk2.groups.io Cc: hao.a.wu@intel.com, Mara Sophie Grosch Subject: [edk2-devel] [PATCH v2 2/2] MdeModulePkg/NvmExpressPei: fix check for NVM command set Date: Wed, 23 Mar 2022 11:22:34 +0100 Message-Id: <372688a6aef1874fb3b933ba2a0b0a31772391ce.1648029370.git.littlefox@lf-net.org> In-Reply-To: References: <16DE909798871558.18232@groups.io> 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,littlefox@lf-net.org X-Gm-Message-State: AA9CyRVmKppO3WJFXZJim3s3x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1648030967; bh=HE3Zp/8NmkEzOlA9dtspjJoeJuv56XH43lyFVkBXvkE=; h=Cc:Date:From:Reply-To:Subject:To; b=XfXjAPj5wQeydxXHxjSiHfYYv8FdkCLhqrbx5BgtQjsJ5DeziJGGBmlrSwUbwxFoHWb /GGjFVhEQ7eVWMMYR+9xzowOejocoImGCLEib1K+PfJwMNI1TF2cpprPbm000QHrqi63p hb7dN4XOgCyBqDLx8i/9sUgsn9emmugNncA= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1648030969555100010 Content-Type: text/plain; charset="utf-8" Previous commit fixed that check in DXE, this one now for PEI. Signed-off-by: Mara Sophie Grosch Reviewed-by: Hao A Wu --- MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiHci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiHci.c b/MdeMod= ulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiHci.c index ac956bdce4..bff5cfd0d5 100644 --- a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiHci.c +++ b/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiHci.c @@ -571,7 +571,7 @@ NvmeControllerInit ( // Read the controller Capabilities register and verify that the NVM com= mand set is supported // NVME_GET_CAP (Private, &Private->Cap); - if (Private->Cap.Css !=3D 0x01) { + if ((Private->Cap.Css & BIT0) =3D=3D 0) { DEBUG ((DEBUG_ERROR, "%a: The NVME controller doesn't support NVMe com= mand set.\n", __FUNCTION__)); return EFI_UNSUPPORTED; } --=20 2.35.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 (#87900): https://edk2.groups.io/g/devel/message/87900 Mute This Topic: https://groups.io/mt/89972395/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-