Jiaxin, Thanks for fixing the bug. Reviewed-by: Ray Ni <ray...@intel.com>
> -----Original Message----- > From: Wu, Jiaxin <jiaxin...@intel.com> > Sent: Monday, March 13, 2023 3:04 PM > To: devel@edk2.groups.io > Cc: Dong, Eric <eric.d...@intel.com>; Ni, Ray <ray...@intel.com>; Zeng, Star > <star.z...@intel.com>; Laszlo Ersek <ler...@redhat.com>; Gerd Hoffmann > <kra...@redhat.com> > Subject: [PATCH v1] UefiCpuPkg/PiSmmCpuDxeSmm: Fix S3 failure in > SmmRestoreCpu > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4368 > > This issue is caused by the commit: > ec07fd0e35d90dbcc36be300a9ceeac29c5de2ad > > GetFirstGuidHob() should not be used after exit boot service. > > Cc: Eric Dong <eric.d...@intel.com> > Cc: Ray Ni <ray...@intel.com> > Cc: Zeng Star <star.z...@intel.com> > Cc: Laszlo Ersek <ler...@redhat.com> > Cc: Gerd Hoffmann <kra...@redhat.com> > Signed-off-by: Jiaxin Wu <jiaxin...@intel.com> > --- > UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c | 14 +------------- > 1 file changed, 1 insertion(+), 13 deletions(-) > > diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c > b/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c > index d408b3f9f7..240eee6a7d 100644 > --- a/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c > +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c > @@ -821,23 +821,11 @@ SmmRestoreCpu ( > // First time microcode load and restore MTRRs > // > InitializeCpuBeforeRebase (); > } > > - // > - // Make sure the gSmmBaseHobGuid existence status is the same > between normal and S3 boot. > - // > - ASSERT (mSmmRelocated == (BOOLEAN)(GetFirstGuidHob > (&gSmmBaseHobGuid) != NULL)); > - if (mSmmRelocated != (BOOLEAN)(GetFirstGuidHob > (&gSmmBaseHobGuid) != NULL)) { > - DEBUG (( > - DEBUG_ERROR, > - "gSmmBaseHobGuid %a produced in normal boot but %a in S3 boot!", > - mSmmRelocated ? "is" : "is not", > - mSmmRelocated ? "is not" : "is" > - )); > - CpuDeadLoop (); > - } > + DEBUG ((DEBUG_INFO, "SmmRestoreCpu: mSmmRelocated is %d\n", > mSmmRelocated)); > > // > // Check whether Smm Relocation is done or not. > // If not, will do the SmmBases Relocation here!!! > // > -- > 2.16.2.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#101085): https://edk2.groups.io/g/devel/message/101085 Mute This Topic: https://groups.io/mt/97575696/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-