cpu/x86/lapic: Support switching to X2APIC mode
The options X2APIC_ONLY and X2APIC_RUNTIME were already user-visible choices in menuconfig, but the functionality was not actually provided except for platforms where FSP presumably enabled X2APIC. Add the logic and related logging for switching to X2APIC operation. TEST: qemu-system-x86_64 -M Q35 -accel kvm -bios coreboot.rom -serial stdio -smp 2 PARALLEL_MP, and either X2APIC_ONLY or X2APIC_RUNTIME, need to be selected for the build of emulation/qemu-q35. Change-Id: I19a990ba287d21ccddaa64601923f1c4830e95e9 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/55262 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Wonkyu Kim <wonkyu.kim@intel.com>
This commit is contained in:
@@ -59,7 +59,7 @@ static __always_inline void x2apic_send_ipi(uint32_t icrlow, uint32_t apicid)
|
||||
wrmsr(X2APIC_MSR_ICR_ADDRESS, icr);
|
||||
}
|
||||
|
||||
static inline bool is_x2apic_mode(void)
|
||||
static __always_inline bool is_x2apic_mode(void)
|
||||
{
|
||||
if (CONFIG(XAPIC_ONLY))
|
||||
return false;
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#define CPUID_VMX (1 << 5)
|
||||
#define CPUID_SMX (1 << 6)
|
||||
#define CPUID_DCA (1 << 18)
|
||||
#define CPUID_X2APIC (1 << 21)
|
||||
#define CPUID_AES (1 << 25)
|
||||
#define SGX_GLOBAL_ENABLE (1 << 18)
|
||||
#define PLATFORM_INFO_SET_TDP (1 << 29)
|
||||
|
||||
Reference in New Issue
Block a user