]> git.proxmox.com Git - mirror_edk2.git/commit - OvmfPkg/OvmfPkgIa32X64.dsc
OvmfPkg/PlatformPei: take VCPU count from QEMU and configure MpInitLib
authorLaszlo Ersek <lersek@redhat.com>
Thu, 24 Nov 2016 14:18:44 +0000 (15:18 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Tue, 29 Nov 2016 09:05:54 +0000 (10:05 +0100)
commit45a70db3c3a59b64e0f517870415963fbfacf507
tree4ae301a45d01c74e558c21958dfffcde8f14c820
parent6e1987f19af720aa9991f3f9994370383f43222d
OvmfPkg/PlatformPei: take VCPU count from QEMU and configure MpInitLib

These settings will allow CpuMpPei and CpuDxe to wait for the initial AP
check-ins exactly as long as necessary.

It is safe to set PcdCpuMaxLogicalProcessorNumber and
PcdCpuApInitTimeOutInMicroSeconds in OvmfPkg/PlatformPei.
OvmfPkg/PlatformPei installs the permanent PEI RAM, producing
gEfiPeiMemoryDiscoveredPpiGuid, and UefiCpuPkg/CpuMpPei has a depex on
gEfiPeiMemoryDiscoveredPpiGuid.

It is safe to read the fw_cfg item QemuFwCfgItemSmpCpuCount (0x0005). It
was added to QEMU in 2008 as key FW_CFG_NB_CPUS, in commit 905fdcb5264c
("Add common keys to firmware configuration"). Even if the key is
unavailable (or if fw_cfg is entirely unavailable, for example on Xen),
QemuFwCfgRead16() will return 0, and then we stick with the current
behavior.

Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Michael Kinney <michael.d.kinney@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/OvmfPkgIa32.dsc
OvmfPkg/OvmfPkgIa32X64.dsc
OvmfPkg/OvmfPkgX64.dsc
OvmfPkg/PlatformPei/MemDetect.c
OvmfPkg/PlatformPei/Platform.c
OvmfPkg/PlatformPei/Platform.h
OvmfPkg/PlatformPei/PlatformPei.inf