amd64: do not touch low memory in AP startup unless we used legacy boot

This fixes several ommisions in 48216088b1

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D31343
This commit is contained in:
Konstantin Belousov 2021-07-29 16:18:19 +03:00
parent b27fe1c3ba
commit 2572376f7f

View File

@ -446,7 +446,8 @@ start_all_aps(void)
/* attempt to start the Application Processor */
if (!start_ap(apic_id, boot_address)) {
/* restore the warmstart vector */
*(u_int32_t *) WARMBOOT_OFF = mpbioswarmvec;
if (!efi_boot)
*(u_int32_t *)WARMBOOT_OFF = mpbioswarmvec;
panic("AP #%d (PHY# %d) failed!", cpu, apic_id);
}
@ -454,7 +455,8 @@ start_all_aps(void)
}
/* restore the warmstart vector */
*(u_int32_t *) WARMBOOT_OFF = mpbioswarmvec;
if (!efi_boot)
*(u_int32_t *)WARMBOOT_OFF = mpbioswarmvec;
outb(CMOS_REG, BIOS_RESET);
outb(CMOS_DATA, mpbiosreason);