public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: add message for S3 config error
@ 2018-09-10  3:22 Jian J Wang
  2018-09-10  5:07 ` Zeng, Star
  2018-09-11 14:00 ` Laszlo Ersek
  0 siblings, 2 replies; 10+ messages in thread
From: Jian J Wang @ 2018-09-10  3:22 UTC (permalink / raw)
  To: edk2-devel; +Cc: Star Zeng, Benjamin You, Eric Dong, Laszlo Ersek

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.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>
---
 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



^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-09-13 11:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-10  3:22 [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: add message for S3 config error Jian J Wang
2018-09-10  5:07 ` Zeng, Star
2018-09-10  5:35   ` Wang, Jian J
2018-09-11 13:52   ` Laszlo Ersek
2018-09-12  0:32     ` Wang, Jian J
2018-09-12 10:03       ` Laszlo Ersek
2018-09-13 11:03         ` Wang, Jian J
2018-09-11 14:00 ` Laszlo Ersek
2018-09-12  0:49   ` Wang, Jian J
2018-09-12 10:04     ` Laszlo Ersek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox