x86/boot: Drop vestigial support for pre-SIPI APICs
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 12 Jun 2019 10:28:05 +0000 (11:28 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 12 Jun 2019 14:54:29 +0000 (15:54 +0100)
commit63dc4209d2420f68ef5783f8405ee7884072fcc0
treec677d39a33ad09164b5919b107a95ab160e1e991
parentbbac4facb676248703cf5708001dcd40c0780add
x86/boot: Drop vestigial support for pre-SIPI APICs

The current code in do_boot_cpu() makes a CMOS write (even in the case of an
FADT reduced hardware configuration) and two writes into the BDA for the
start_eip segment and offset.

BDA 0x67 and 0x69 hail from the days of the DOS and the 286, when IBM put
together the fast way to return from Protected Mode back to Real Mode (via a
deliberate triple fault).  This vector, when set, redirects the early boot
logic back into OS control.

It is also used by early MP systems, before the Startup IPI message became
standard, which in practice was before Local APICs became integrated into CPU
cores.

Support for non-integrated APICs was dropped in c/s 7b0007af "xen/x86: Remove
APIC_INTEGRATED() checks" because there are no 64-bit capable systems without
them.  Therefore, drop smpboot_{setup,restore}_warm_reset_vector().

Dropping smpboot_setup_warm_reset_vector() also lets us drop
TRAMPOLINE_{HIGH,LOW}, which lets us drop mach_wakecpu.h entirely.  The final
function in smpboot_hooks.h is smpboot_setup_io_apic() and has a single
caller, so expand it inline and delete smpboot_hooks.h as well.

This removes all reliance on CMOS and the BDA from the AP boot path, which is
especially of interest on reduced_hardware boots and EFI systems.

This was discovered while investigating Xen's use of the BDA during kexec.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/smpboot.c
xen/include/asm-x86/mach-default/mach_wakecpu.h [deleted file]
xen/include/asm-x86/mach-default/smpboot_hooks.h [deleted file]