summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/PlatformPei/Platform.h
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2016-11-24 15:18:44 +0100
committerLaszlo Ersek <lersek@redhat.com>2016-11-29 10:05:54 +0100
commit45a70db3c3a59b64e0f517870415963fbfacf507 (patch)
tree4ae301a45d01c74e558c21958dfffcde8f14c820 /OvmfPkg/PlatformPei/Platform.h
parent6e1987f19af720aa9991f3f9994370383f43222d (diff)
downloadedk2-45a70db3c3a59b64e0f517870415963fbfacf507.tar.gz
edk2-45a70db3c3a59b64e0f517870415963fbfacf507.tar.bz2
edk2-45a70db3c3a59b64e0f517870415963fbfacf507.zip
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>
Diffstat (limited to 'OvmfPkg/PlatformPei/Platform.h')
-rw-r--r--OvmfPkg/PlatformPei/Platform.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/OvmfPkg/PlatformPei/Platform.h b/OvmfPkg/PlatformPei/Platform.h
index eda765be30..18f42c3f0e 100644
--- a/OvmfPkg/PlatformPei/Platform.h
+++ b/OvmfPkg/PlatformPei/Platform.h
@@ -101,4 +101,6 @@ extern BOOLEAN mS3Supported;
extern UINT8 mPhysMemAddressWidth;
+extern UINT32 mMaxCpuCount;
+
#endif // _PLATFORM_PEI_H_INCLUDED_