]> git.proxmox.com Git - mirror_edk2.git/commit - OvmfPkg/PlatformPei/Platform.h
OvmfPkg/PlatformPei: prepare for PcdQ35TsegMbytes becoming dynamic
authorLaszlo Ersek <lersek@redhat.com>
Tue, 4 Jul 2017 10:44:05 +0000 (12:44 +0200)
committerLaszlo Ersek <lersek@redhat.com>
Wed, 5 Jul 2017 20:21:27 +0000 (22:21 +0200)
commit23bfb5c0aab6bda348ac03e160d4a8432031fac1
tree8a8041b87abafc79fa52e52e156b8bc9bdc9b266
parent5b31f660c92c7c8b9cfc727cb6802602e64eee0d
OvmfPkg/PlatformPei: prepare for PcdQ35TsegMbytes becoming dynamic

In one of the next patches we'll turn PcdQ35TsegMbytes into a dynamic PCD,
to be set by PlatformPei. Introduce the Q35TsegMbytesInitialization()
function and the "mQ35TsegMbytes" global variable to support this.

Q35TsegMbytesInitialization() manages the PCD and caches its final value
into "mQ35TsegMbytes". Call Q35TsegMbytesInitialization() from
InitializePlatform() just in time for the current PCD consumers,
PublishPeiMemory(), InitializeRamRegions() and QemuInitializeRam() --
which is called from InitializeRamRegions() -- to be rebased on top of
"mQ35TsegMbytes".

Call Q35TsegMbytesInitialization() only when PcdSmmSmramRequire is TRUE,
given that PcdQ35TsegMbytes is consumed in that case only.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
OvmfPkg/PlatformPei/MemDetect.c
OvmfPkg/PlatformPei/Platform.c
OvmfPkg/PlatformPei/Platform.h