Attention is currently required from: Kyösti Mälkki. Angel Pons 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 8: Code-Review+1
(1 comment)
Patchset:
PS8: Looks like it's some serialization issue. With X2APIC_RUNTIME, `is_x2apic_mode()` never returns false. And if I unconditionally execute the `rdmsr()` call inside `is_x2apic_mode()` by moving it before the `if (CONFIG(X2APIC_ONLY))` check, X2APIC_ONLY suddenly works just fine.
I think it's related to the 2nd note in this part of document 493770 (Haswell BWG): https://imgur.com/osj2JvP.png
Note: The WRMSR instruction serializing semantic is relaxed for writes to the extended xAPIC MSRs. Software must not use WRMSR instructions which access extended xAPIC MSRs as a serializing instruction.