public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Wu, Jiaxin" <jiaxin.wu@intel.com>
To: "Ni, Ray" <ray.ni@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Dong, Eric" <eric.dong@intel.com>,
	"Zeng, Star" <star.zeng@intel.com>,
	Laszlo Ersek <lersek@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>,
	"Kumar, Rahul R" <rahul.r.kumar@intel.com>
Subject: Re: [PATCH v2 2/4] UefiCpuPkg/PiSmmCpuDxeSmm: Consume SMM Base Hob for SmBase info
Date: Mon, 16 Jan 2023 05:52:26 +0000	[thread overview]
Message-ID: <MN0PR11MB6158C4356B18B6DC44E8F887FEC19@MN0PR11MB6158.namprd11.prod.outlook.com> (raw)
In-Reply-To: <MN6PR11MB8244A90FA3893E5908B4891F8CC19@MN6PR11MB8244.namprd11.prod.outlook.com>

> 
> >    //
> > -  SmmRelocateBases ();
> > +  mSmmRelocated = (BOOLEAN)(GetFirstGuidHob
> (&gSmmBaseHobGuid) != NULL);
> 
> Do we support the case when the HOB is produced in normal boot but is not
> in S3 boot?
> To keep code flow simple and not to support unnecessary configuration
> combinations, I prefer no.
> Then, since mSmmRelocated is initialized in normal boot already. How about
> only adding
> check here to make sure the HOB existence status is the same between
> normal and s3 boot.
> This also helps to catch platform bugs that the HOB is only produced in
> normal boot.
> 
> ASSERT (mSmmRelocated == (BOOLEAN)(GetFirstGuidHob
> (&gSmmBaseHobGuid) != NULL));
> If (mSmmRelocated != (BOOLEAN)(GetFirstGuidHob
> (&gSmmBaseHobGuid) != NULL)) {
>   DEBUG ((
>     DEBUG_ERROR,
>     "SmmBase HOB %a produced in normal boot but %a in S3 boot",
>     mSmmRelocated ? "is" : "is not",
>     mSmmRelocated ? "is not" : "is"
>     ));
>     CpuDeadLoop ();
> }
> >

Agree, thanks Ray. Will refine the code in next patch.


> >  /**
> > -  Initialize PackageBsp Info. Processor specified by
> mPackageFirstThreadIndex[PackageIndex]
> > -  will do the package-scope register programming. Set default CpuIndex to
> (UINT32)-1, which
> > -  means not specified yet.
> > +  Initialize mPackageFirstThreadIndex Info. Processor specified by
> mPackageFirstThreadIndex[PackageIndex]
> > +  will do the package-scope register programming. Set default CpuIndex to
> (UINT32)-1, which means not
> > +  specified yet.
> 
> The comments update is good. Can you separate in another patch?

Okay,  thanks Ray, I should never add any smuggled items even it's very simple change:).


> 
> > -      if (mIsBsp) {
> > +      } else if (IsBsp) {
> I agree with this change. But it changes the old logic.
> Old logic calls below function even in non-S3 path.
> If we want to change the behavior, can we separate in a new patch?
> 
> > +VOID
> > +EFIAPI
> > +ExecuteFirstSmiInit (
> 
> Can you remove the EFIAPI?
> 

Okay


  reply	other threads:[~2023-01-16  5:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-13 15:30 [PATCH v2 0/4] Simplify SMM Relocated Process Wu, Jiaxin
2023-01-13 15:30 ` [PATCH v2 1/4] UefiCpuPkg/SmmBaseHob.h: Add SMM Base HOB Data Wu, Jiaxin
2023-01-16  1:39   ` Ni, Ray
2023-01-13 15:30 ` [PATCH v2 2/4] UefiCpuPkg/PiSmmCpuDxeSmm: Consume SMM Base Hob for SmBase info Wu, Jiaxin
2023-01-16  5:21   ` Ni, Ray
2023-01-16  5:52     ` Wu, Jiaxin [this message]
2023-01-13 15:30 ` [PATCH v2 3/4] UefiCpuPkg/SmmCpuFeaturesLib: Skip to configure SMBASE Wu, Jiaxin
2023-01-16  5:23   ` [edk2-devel] " Chang, Abner
2023-01-16  5:38     ` Ni, Ray
2023-01-16  5:46       ` Chang, Abner
2023-01-13 15:30 ` [PATCH v2 4/4] OvmfPkg/SmmCpuFeaturesLib: " Wu, Jiaxin
2023-01-16  8:12   ` Gerd Hoffmann

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=MN0PR11MB6158C4356B18B6DC44E8F887FEC19@MN0PR11MB6158.namprd11.prod.outlook.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