From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web11.4066.1572394965479713975 for ; Tue, 29 Oct 2019 17:22:45 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: hao.a.wu@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Oct 2019 17:22:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,245,1569308400"; d="scan'208";a="190115497" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga007.jf.intel.com with ESMTP; 29 Oct 2019 17:22:44 -0700 Received: from fmsmsx152.amr.corp.intel.com (10.18.125.5) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 29 Oct 2019 17:22:44 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX152.amr.corp.intel.com (10.18.125.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 29 Oct 2019 17:22:43 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.127]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.60]) with mapi id 14.03.0439.000; Wed, 30 Oct 2019 08:22:41 +0800 From: "Wu, Hao A" To: "devel@edk2.groups.io" , "Wu, Hao A" , "Chu, Maggie" CC: "Wang, Jian J" , "Ni, Ray" , "Zeng, Star" , "Dong, Eric" Subject: Re: [edk2-devel] [PATCH] MdeModulePkg/NvmExpressPei: Fix Opal S3 unlock issue Thread-Topic: [edk2-devel] [PATCH] MdeModulePkg/NvmExpressPei: Fix Opal S3 unlock issue Thread-Index: AQHVjU2y88Q9t/QIG0iQSCJ6Pquo76dviV6QgALMHuA= Date: Wed, 30 Oct 2019 00:22:40 +0000 Message-ID: References: <20191028050802.856-1-maggie.chu@intel.com> In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: hao.a.wu@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Wu= , > Hao A > Sent: Monday, October 28, 2019 1:43 PM > To: Chu, Maggie; devel@edk2.groups.io > Cc: Wang, Jian J; Ni, Ray; Zeng, Star; Dong, Eric > Subject: Re: [edk2-devel] [PATCH] MdeModulePkg/NvmExpressPei: Fix Opal S= 3 > unlock issue >=20 > > -----Original Message----- > > From: Chu, Maggie > > Sent: Monday, October 28, 2019 1:08 PM > > To: devel@edk2.groups.io > > Cc: Wu, Hao A; Wang, Jian J; Ni, Ray; Zeng, Star; Dong, Eric > > Subject: [PATCH] MdeModulePkg/NvmExpressPei: Fix Opal S3 unlock issue > > > > https://bugzilla.tianocore.org/show_bug.cgi?id=3D2312 > > > > This patch is for fixing unexpected system hang during S3 unlock proce= ss. > > FatPei driver maintained and updated internal BlockIo devices list > > when there is new BlockIo PPI has installed, and it relied on BlockIo = PPI > service > > to get data from devices. Because BlockIo Ppi leverage NvmExpressPei P= pi to > > transit > > Nvm command to device, we should make sure NvmePassThruPpi installed > > before BlockIo PPI. >=20 >=20 > The change is good to me, > Reviewed-by: Hao A Wu >=20 > If no other comment, I will adjust the length of some commit log message= lines > when pushing this patch, since the PatchCheck.py script is complaining: >=20 > The commit message format is not valid: > * Line 7 of commit message is too long. > * Line 8 of commit message is too long. > * Line 9 of commit message is too long. Patch has been pushed via commit dc254af6a4. Best Regards, Hao Wu >=20 > Best Regards, > Hao Wu >=20 >=20 > > > > Signed-off-by: Maggie Chu > > Cc: Hao A Wu > > Cc: Jian J Wang > > Cc: Ray Ni > > Cc: Star Zeng > > Cc: Eric Dong > > --- > > MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c | 43 > ++++++++++++- > > --------- > > 1 file changed, 23 insertions(+), 20 deletions(-) > > > > diff --git a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c > > b/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c > > index 987eed420e..a8cb7f3a67 100644 > > --- a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c > > +++ b/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c > > @@ -376,6 +376,29 @@ NvmExpressPeimEntry ( > > continue; > > > > } > > > > > > > > + // > > > > + // Nvm Express Pass Thru PPI > > > > + // > > > > + Private->PassThruMode.Attributes =3D > > EFI_NVM_EXPRESS_PASS_THRU_ATTRIBUTES_PHYSICAL | > > > > + > > EFI_NVM_EXPRESS_PASS_THRU_ATTRIBUTES_LOGICAL | > > > > + > > EFI_NVM_EXPRESS_PASS_THRU_ATTRIBUTES_CMD_SET_NVM; > > > > + Private->PassThruMode.IoAlign =3D sizeof (UINTN); > > > > + Private->PassThruMode.NvmeVersion =3D > > EDKII_PEI_NVM_EXPRESS_PASS_THRU_PPI_REVISION; > > > > + Private->NvmePassThruPpi.Mode =3D &Private->PassThr= uMode; > > > > + Private->NvmePassThruPpi.GetDevicePath =3D > > NvmePassThruGetDevicePath; > > > > + Private->NvmePassThruPpi.GetNextNameSpace =3D > > NvmePassThruGetNextNameSpace; > > > > + Private->NvmePassThruPpi.PassThru =3D NvmePassThru; > > > > + CopyMem ( > > > > + &Private->NvmePassThruPpiList, > > > > + &mNvmePassThruPpiListTemplate, > > > > + sizeof (EFI_PEI_PPI_DESCRIPTOR) > > > > + ); > > > > + Private->NvmePassThruPpiList.Ppi =3D &Private->NvmePas= sThruPpi; > > > > + PeiServicesInstallPpi (&Private->NvmePassThruPpiList); > > > > + > > > > + // > > > > + // Block Io PPI > > > > + // > > > > Private->BlkIoPpi.GetNumberOfBlockDevices =3D > > NvmeBlockIoPeimGetDeviceNo; > > > > Private->BlkIoPpi.GetBlockDeviceMediaInfo =3D > > NvmeBlockIoPeimGetMediaInfo; > > > > Private->BlkIoPpi.ReadBlocks =3D NvmeBlockIoPeimRea= dBlocks; > > > > @@ -398,26 +421,6 @@ NvmExpressPeimEntry ( > > Private->BlkIo2PpiList.Ppi =3D &Private->BlkIo2Pp= i; > > > > PeiServicesInstallPpi (&Private->BlkIoPpiList); > > > > > > > > - // > > > > - // Nvm Express Pass Thru PPI > > > > - // > > > > - Private->PassThruMode.Attributes =3D > > EFI_NVM_EXPRESS_PASS_THRU_ATTRIBUTES_PHYSICAL | > > > > - > > EFI_NVM_EXPRESS_PASS_THRU_ATTRIBUTES_LOGICAL | > > > > - > > EFI_NVM_EXPRESS_PASS_THRU_ATTRIBUTES_CMD_SET_NVM; > > > > - Private->PassThruMode.IoAlign =3D sizeof (UINTN); > > > > - Private->PassThruMode.NvmeVersion =3D > > EDKII_PEI_NVM_EXPRESS_PASS_THRU_PPI_REVISION; > > > > - Private->NvmePassThruPpi.Mode =3D &Private->PassThr= uMode; > > > > - Private->NvmePassThruPpi.GetDevicePath =3D > > NvmePassThruGetDevicePath; > > > > - Private->NvmePassThruPpi.GetNextNameSpace =3D > > NvmePassThruGetNextNameSpace; > > > > - Private->NvmePassThruPpi.PassThru =3D NvmePassThru; > > > > - CopyMem ( > > > > - &Private->NvmePassThruPpiList, > > > > - &mNvmePassThruPpiListTemplate, > > > > - sizeof (EFI_PEI_PPI_DESCRIPTOR) > > > > - ); > > > > - Private->NvmePassThruPpiList.Ppi =3D &Private->NvmePas= sThruPpi; > > > > - PeiServicesInstallPpi (&Private->NvmePassThruPpiList); > > > > - > > > > // > > > > // Check if the NVME controller supports the Security Receive/Sen= d > > commands > > > > // > > > > -- > > 2.16.2.windows.1 >=20 >=20 >=20