On Fri, Mar 18, 2022 at 08:45:37AM +0800, Min Xu wrote: > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3863 > > The intention of PlatformInitLib is to extract the common function used > in OvmfPkg/PlatformPei. This lib will be used not only in PEI phase but > also in SEC phase. SEC phase cannot use global variables between > different functions. So PlatformInfoHob is created to hold the > informations shared between functions. For example, HostBridgeDevId > corespond to mHostBridgeDevId in PlatformPei. > > In this patch we will first move below global variables to > PlatformInfoHob. > - mBootMode > - mS3Supported > - mPhysMemAddressWidth > - mMaxCpuCount > - mHostBridgeDevId > - mQ35SmramAtDefaultSmbase > - mQemuUc32Base > - mS3AcpiReservedMemorySize > - mS3AcpiReservedMemoryBase > > PlatformInfoHob also holds other information, for example, > PciIoBase / PciIoSize. This is because in SEC phase, PcdSetxxx > doesn't work. So we will restruct the functions which set PCDs > into two, one for PlatformInfoLib, one for PlatformPei. > > So in this patch we first move global variables and PCDs to > PlatformInfoHob. All the changes are in OvmfPkg/PlatformPei. > > Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org> > Cc: Jordan Justen <jordan.l.jus...@intel.com> > Cc: Brijesh Singh <brijesh.si...@amd.com> > Cc: Erdem Aktas <erdemak...@google.com> > Cc: James Bottomley <j...@linux.ibm.com> > Cc: Jiewen Yao <jiewen....@intel.com> > Cc: Tom Lendacky <thomas.lenda...@amd.com> > Cc: Gerd Hoffmann <kra...@redhat.com> > Cc: Sebastien Boeuf <sebastien.bo...@intel.com> > Signed-off-by: Min Xu <min.m...@intel.com>
Acked-by: Gerd Hoffmann <kra...@redhat.com> -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#87824): https://edk2.groups.io/g/devel/message/87824 Mute This Topic: https://groups.io/mt/89859026/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-