Attention is currently required from: Angel Pons. Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/55262 )
Change subject: cpu/x86/lapic: Support switching to X2APIC mode ......................................................................
Patch Set 10:
(2 comments)
Patchset:
PS8:
Looks like it's some serialization issue. […]
Where do you need is_x2apic_mode() to return false? There might be a problem with initial_lapicid() and lapicid() being stashed.
This makes X2APIC_ONLY work?
diff --git a/src/include/cpu/x86/lapic.h b/src/include/cpu/x86/lapic.h index 4fbae88ca5..50417acca5 100644 --- a/src/include/cpu/x86/lapic.h +++ b/src/include/cpu/x86/lapic.h @@ -75,11 +75,12 @@ static inline bool is_x2apic_mode(void) if (CONFIG(XAPIC_ONLY)) return false; + msr_t msr; + msr = rdmsr(LAPIC_BASE_MSR); + if (CONFIG(X2APIC_ONLY)) return true; - msr_t msr; - msr = rdmsr(LAPIC_BASE_MSR); return ((msr.lo & LAPIC_BASE_X2APIC_ENABLED) == LAPIC_BASE_X2APIC_ENABLED); }
File src/cpu/x86/lapic/lapic.c:
https://review.coreboot.org/c/coreboot/+/55262/comment/8ba352a4_3077e4fc PS10, Line 37: ASSERT(CONFIG(X2APIC_RUNTIME) | use_x2apic); Should have been a logical OR here.