public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Wang, Jian J" <jian.j.wang@intel.com>
To: "Zeng, Star" <star.zeng@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "You, Benjamin" <benjamin.you@intel.com>,
	"Dong, Eric" <eric.dong@intel.com>,
	Laszlo Ersek <lersek@redhat.com>
Subject: Re: [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: add message for S3 config error
Date: Mon, 10 Sep 2018 05:35:06 +0000	[thread overview]
Message-ID: <D827630B58408649ACB04F44C510003624E2E3EB@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <0C09AFA07DD0434D9E2A0C6AEB0483103BBB719C@shsmsx102.ccr.corp.intel.com>

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.wang@intel.com>; edk2-devel@lists.01.org
> Cc: You, Benjamin <benjamin.you@intel.com>; Dong, Eric
> <eric.dong@intel.com>; Laszlo Ersek <lersek@redhat.com>; Zeng, Star
> <star.zeng@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.zeng@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.zeng@intel.com>; You, Benjamin
> <benjamin.you@intel.com>; Dong, Eric <eric.dong@intel.com>; Laszlo Ersek
> <lersek@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.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



  reply	other threads:[~2018-09-10  5:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D827630B58408649ACB04F44C510003624E2E3EB@SHSMSX103.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox