diff options
author | Jian J Wang <jian.j.wang@intel.com> | 2018-09-10 11:13:36 +0800 |
---|---|---|
committer | Jian J Wang <jian.j.wang@intel.com> | 2018-09-17 10:45:52 +0800 |
commit | a95c9cfd18b691d9694b17f032ffefd1e905cc4a (patch) | |
tree | c204e3cae5e975b8704f9a1086d43216cfa7f012 /UefiCpuPkg | |
parent | b06dfd40bb5cf9fdd626a79a300253f193b600ae (diff) | |
download | edk2-a95c9cfd18b691d9694b17f032ffefd1e905cc4a.tar.gz |
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
CpuDeadLoop are added in this patch to warn platform developer
about it.
Cc: Star Zeng <star.zeng@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'UefiCpuPkg')
-rw-r--r-- | UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c b/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c index abd8a5a07b..fcbd56240d 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c @@ -714,7 +714,15 @@ InitSmmS3ResumeState ( }
GuidHob = GetFirstGuidHob (&gEfiAcpiVariableGuid);
- if (GuidHob != NULL) {
+ if (GuidHob == NULL) {
+ DEBUG ((
+ DEBUG_ERROR,
+ "ERROR:%a(): HOB(gEfiAcpiVariableGuid=%g) needed by S3 resume doesn't exist!\n",
+ __FUNCTION__,
+ &gEfiAcpiVariableGuid
+ ));
+ CpuDeadLoop ();
+ } else {
SmramDescriptor = (EFI_SMRAM_DESCRIPTOR *) GET_GUID_HOB_DATA (GuidHob);
DEBUG ((EFI_D_INFO, "SMM S3 SMRAM Structure = %x\n", SmramDescriptor));
|