mirror of https://github.com/acidanthera/audk.git
OvmfPkg/PlatformInitLib: enable x2apic mode if needed
Enable x2apic mode in case the number of possible CPUs (including hotplug-able CPus which are not (yet) online) is larger than 255. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
800205678f
commit
8c8e05db24
|
@ -30,6 +30,7 @@
|
|||
#include <Library/QemuFwCfgS3Lib.h>
|
||||
#include <Library/QemuFwCfgSimpleParserLib.h>
|
||||
#include <Library/PciLib.h>
|
||||
#include <Library/LocalApicLib.h>
|
||||
#include <Guid/SystemNvDataGuid.h>
|
||||
#include <Guid/VariableFormat.h>
|
||||
#include <OvmfPlatforms.h>
|
||||
|
@ -720,6 +721,11 @@ PlatformMaxCpuCountInitialization (
|
|||
));
|
||||
ASSERT (BootCpuCount <= MaxCpuCount);
|
||||
|
||||
if (MaxCpuCount > 255) {
|
||||
DEBUG ((DEBUG_INFO, "%a: enable x2apic mode\n", __func__));
|
||||
SetApicMode (LOCAL_APIC_MODE_X2APIC);
|
||||
}
|
||||
|
||||
PlatformInfoHob->PcdCpuMaxLogicalProcessorNumber = MaxCpuCount;
|
||||
PlatformInfoHob->PcdCpuBootLogicalProcessorNumber = BootCpuCount;
|
||||
}
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
HobLib
|
||||
QemuFwCfgLib
|
||||
QemuFwCfgSimpleParserLib
|
||||
LocalApicLib
|
||||
MemEncryptSevLib
|
||||
MemoryAllocationLib
|
||||
MtrrLib
|
||||
|
|
Loading…
Reference in New Issue