amd64: do not touch low memory in acpi_wakeup_ap() if booted by UEFI
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D31916
This commit is contained in:
parent
45feade38e
commit
e99255c8a6
@ -164,16 +164,22 @@ acpi_wakeup_cpus(struct acpi_softc *sc)
|
|||||||
int cpu;
|
int cpu;
|
||||||
u_char mpbiosreason;
|
u_char mpbiosreason;
|
||||||
|
|
||||||
/* save the current value of the warm-start vector */
|
#ifdef __amd64__
|
||||||
mpbioswarmvec = *((uint32_t *)WARMBOOT_OFF);
|
if (!efi_boot) {
|
||||||
outb(CMOS_REG, BIOS_RESET);
|
#endif
|
||||||
mpbiosreason = inb(CMOS_DATA);
|
/* save the current value of the warm-start vector */
|
||||||
|
mpbioswarmvec = *((uint32_t *)WARMBOOT_OFF);
|
||||||
|
outb(CMOS_REG, BIOS_RESET);
|
||||||
|
mpbiosreason = inb(CMOS_DATA);
|
||||||
|
|
||||||
/* setup a vector to our boot code */
|
/* setup a vector to our boot code */
|
||||||
*((volatile u_short *)WARMBOOT_OFF) = WARMBOOT_TARGET;
|
*((volatile u_short *)WARMBOOT_OFF) = WARMBOOT_TARGET;
|
||||||
*((volatile u_short *)WARMBOOT_SEG) = sc->acpi_wakephys >> 4;
|
*((volatile u_short *)WARMBOOT_SEG) = sc->acpi_wakephys >> 4;
|
||||||
outb(CMOS_REG, BIOS_RESET);
|
outb(CMOS_REG, BIOS_RESET);
|
||||||
outb(CMOS_DATA, BIOS_WARM); /* 'warm-start' */
|
outb(CMOS_DATA, BIOS_WARM); /* 'warm-start' */
|
||||||
|
#ifdef __amd64__
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Wake up each AP. */
|
/* Wake up each AP. */
|
||||||
for (cpu = 1; cpu < mp_ncpus; cpu++) {
|
for (cpu = 1; cpu < mp_ncpus; cpu++) {
|
||||||
@ -197,11 +203,17 @@ acpi_wakeup_cpus(struct acpi_softc *sc)
|
|||||||
pmap_remap_lowptdi(false);
|
pmap_remap_lowptdi(false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* restore the warmstart vector */
|
#ifdef __amd64__
|
||||||
*(uint32_t *)WARMBOOT_OFF = mpbioswarmvec;
|
if (!efi_boot) {
|
||||||
|
#endif
|
||||||
|
/* restore the warmstart vector */
|
||||||
|
*(uint32_t *)WARMBOOT_OFF = mpbioswarmvec;
|
||||||
|
|
||||||
outb(CMOS_REG, BIOS_RESET);
|
outb(CMOS_REG, BIOS_RESET);
|
||||||
outb(CMOS_DATA, mpbiosreason);
|
outb(CMOS_DATA, mpbiosreason);
|
||||||
|
#ifdef __amd64__
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user