public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Laszlo Ersek" <lersek@redhat.com>
To: Tom Lendacky <thomas.lendacky@amd.com>, devel@edk2.groups.io
Cc: Eric Dong <eric.dong@intel.com>, Ray Ni <ray.ni@intel.com>,
	Rahul Kumar <rahul1.kumar@intel.com>,
	Brijesh Singh <brijesh.singh@amd.com>,
	Garrett Kirkendall <garrett.kirkendall@amd.com>
Subject: Re: [PATCH 1/1] UefiCpuPkg/MpInitLib: Reduce reset vector memory pressure
Date: Wed, 23 Sep 2020 10:31:10 +0200	[thread overview]
Message-ID: <58ed06b7-dc6e-61ab-1e82-ec14d10a700e@redhat.com> (raw)
In-Reply-To: <22eb2625-6ece-6f1d-43b2-4ca6aad54b9c@redhat.com>

On 09/23/20 10:14, Laszlo Ersek wrote:

> (3) Even better... can you modify GetApResetVectorSize() to take
> &CpuMpData rather than &CpuMpData->AddressMap, and then check
> CpuMpData->SevEsIsEnabled?
> 
> Hmmm, wait, that's not really simple, as we call GetApResetVectorSize()
> from MpInitLibInitialize() too, way before we set
> CpuMpData->SevEsIsEnabled from the PCD.
> 
> So I guess we should pass a dedicated BOOLEAN parameter to
> GetApResetVectorSize(), called "SevEsIsEnabled". At the call site in
> MpInitLibInitialize(), we should pass in the PCD's value. At the call
> site in AllocateResetVector(), we should pass in
> CpuMpData->SevEsIsEnabled.
> 
> The reason I'm suggesting (3) is that I don't feel comfortable with
> checking dynamic PCDs outside of entry point functions / initialization
> functions.

You know what, never mind (3) -- I've just realized that
PcdCpuMaxLogicalProcessorNumber may be a dynamic PCD too. It might
require a lot of work to restrict all dynamic PCD accesses to the init
function only, and I couldn't necessarily justify all that work at the
moment (for myself or for anyone else).

So please consider (1), (2) and (4).

Thanks!
Laszlo


  parent reply	other threads:[~2020-09-23  8:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-22 19:59 [PATCH 1/1] UefiCpuPkg/MpInitLib: Reduce reset vector memory pressure Lendacky, Thomas
2020-09-23  3:08 ` Ni, Ray
2020-09-23  8:14 ` Laszlo Ersek
2020-09-23  8:28   ` Laszlo Ersek
2020-09-23  8:31   ` Laszlo Ersek [this message]
2020-09-23 13:58     ` Lendacky, Thomas
2020-09-23 15:50       ` Lendacky, Thomas

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=58ed06b7-dc6e-61ab-1e82-ec14d10a700e@redhat.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