[edk2-devel] [PATCH 1/1] UefiCpuPkg/MpInitLib: Reduce reset vector memory pressure

Laszlo Ersek lersek at redhat.com
Wed Sep 23 08:31:10 UTC 2020


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



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#65514): https://edk2.groups.io/g/devel/message/65514
Mute This Topic: https://groups.io/mt/77021282/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list