Make sense to me. Regards, Jian
> -----Original Message----- > From: Zeng, Star > Sent: Monday, September 10, 2018 1:08 PM > To: Wang, Jian J <jian.j.w...@intel.com>; edk2-devel@lists.01.org > Cc: You, Benjamin <benjamin....@intel.com>; Dong, Eric > <eric.d...@intel.com>; Laszlo Ersek <ler...@redhat.com>; Zeng, Star > <star.z...@intel.com> > Subject: RE: [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: add message for S3 > config error > > I agree to add the ASSERT, but even with the ASSERT, I still suggest moving > // > // Patch SmmS3ResumeState->SmmS3Cr3 > // > InitSmmS3Cr3 (); > > into > GuidHob = GetFirstGuidHob (&gEfiAcpiVariableGuid); > if (GuidHob != NULL) { > ... > } > > With that, Reviewed-by: Star Zeng <star.z...@intel.com> > > > 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 <star.z...@intel.com>; You, Benjamin > <benjamin....@intel.com>; Dong, Eric <eric.d...@intel.com>; Laszlo Ersek > <ler...@redhat.com> > Subject: [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: add message for S3 config > error > > BZ#: https://bugzilla.tianocore.org/show_bug.cgi?id=1165 > > HOB gEfiAcpiVariableGuid is a must have data for S3 resume if PcdAcpiS3Enable > is set to TRUE. Current code in CpuS3.c doesn't embody this strong binding > between them. An error message and ASSERT is added by this patch to warn > platform developer about it. > > Cc: Star Zeng <star.z...@intel.com> > Cc: Benjamin You <benjamin....@intel.com> > Cc: Eric Dong <eric.d...@intel.com> > Cc: Laszlo Ersek <ler...@redhat.com> > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Jian J Wang <jian.j.w...@intel.com> > --- > UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c | 3 +++ > 1 file changed, 3 insertions(+) > > 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) == sizeof (UINT32)) { > SmmS3ResumeState->Signature = SMM_S3_RESUME_SMM_32; > } > + } else { > + DEBUG ((DEBUG_ERROR, "ERROR: HOB(gEfiAcpiVariableGuid) needed by S3 > resume doesn't exist!\n")); > + ASSERT (FALSE); > } > > // > -- > 2.16.2.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel