From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=jian.j.wang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8585221A07A80 for ; Sun, 9 Sep 2018 22:35:09 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Sep 2018 22:35:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,354,1531810800"; d="scan'208";a="68800515" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga007.fm.intel.com with ESMTP; 09 Sep 2018 22:35:09 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 9 Sep 2018 22:35:08 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.240]) by shsmsx102.ccr.corp.intel.com ([169.254.2.226]) with mapi id 14.03.0319.002; Mon, 10 Sep 2018 13:35:06 +0800 From: "Wang, Jian J" To: "Zeng, Star" , "edk2-devel@lists.01.org" CC: "You, Benjamin" , "Dong, Eric" , Laszlo Ersek Thread-Topic: [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: add message for S3 config error Thread-Index: AQHUSMQ/oS5J0W3/GkiwFpTVsBZBeqTo/hhA Date: Mon, 10 Sep 2018 05:35:06 +0000 Message-ID: References: <20180910032225.10044-1-jian.j.wang@intel.com> <0C09AFA07DD0434D9E2A0C6AEB0483103BBB719C@shsmsx102.ccr.corp.intel.com> In-Reply-To: <0C09AFA07DD0434D9E2A0C6AEB0483103BBB719C@shsmsx102.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZWI3Nzg0YTMtOTZhMi00MWVlLWIzNmItMmUyMzUyOTIwNjA4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiSXFoTHQ3bCtnVm0rclhxVmlSblwvZENzUE9nUGZSUzR6aitnT3ZwZVNuc3d5a2lVSDI1ZWdTYzFhSTdxeFBtZXQifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: add message for S3 config error X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2018 05:35:09 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Make sense to me. Regards, Jian > -----Original Message----- > From: Zeng, Star > Sent: Monday, September 10, 2018 1:08 PM > To: Wang, Jian J ; edk2-devel@lists.01.org > Cc: You, Benjamin ; Dong, Eric > ; Laszlo Ersek ; Zeng, Star > > Subject: RE: [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: add message for S3 > config error >=20 > I agree to add the ASSERT, but even with the ASSERT, I still suggest movi= ng > // > // Patch SmmS3ResumeState->SmmS3Cr3 > // > InitSmmS3Cr3 (); >=20 > into > GuidHob =3D GetFirstGuidHob (&gEfiAcpiVariableGuid); > if (GuidHob !=3D NULL) { > ... > } >=20 > With that, Reviewed-by: Star Zeng >=20 >=20 > Thanks, > Star > -----Original Message----- > From: Wang, Jian J > Sent: Monday, September 10, 2018 11:22 AM > To: edk2-devel@lists.01.org > Cc: Zeng, Star ; You, Benjamin > ; Dong, Eric ; Laszlo Ersek > > Subject: [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: add message for S3 config > error >=20 > BZ#: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1165 >=20 > HOB gEfiAcpiVariableGuid is a must have data for S3 resume if PcdAcpiS3En= able > is set to TRUE. Current code in CpuS3.c doesn't embody this strong bindin= g > between them. An error message and ASSERT is added by this patch to warn > platform developer about it. >=20 > Cc: Star Zeng > Cc: Benjamin You > Cc: Eric Dong > Cc: Laszlo Ersek > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Jian J Wang > --- > UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c | 3 +++ > 1 file changed, 3 insertions(+) >=20 > diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c > b/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c > index abd8a5a07b..f371667c44 100644 > --- a/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c > +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c > @@ -744,6 +744,9 @@ InitSmmS3ResumeState ( > if (sizeof (UINTN) =3D=3D sizeof (UINT32)) { > SmmS3ResumeState->Signature =3D SMM_S3_RESUME_SMM_32; > } > + } else { > + DEBUG ((DEBUG_ERROR, "ERROR: HOB(gEfiAcpiVariableGuid) needed by S3 > resume doesn't exist!\n")); > + ASSERT (FALSE); > } >=20 > // > -- > 2.16.2.windows.1