Date: Sat, 24 Jul 2021 15:53:10 GMT From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 48216088b115 - main - amd64: do not touch low memory in AP startup unless we used legacy boot Message-ID: <202107241553.16OFrAoX030394@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=48216088b1157a22b95540efea58f70057cd5c06 commit 48216088b1157a22b95540efea58f70057cd5c06 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2021-07-22 16:27:21 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2021-07-24 15:52:45 +0000 amd64: do not touch low memory in AP startup unless we used legacy boot Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D31121 --- sys/amd64/amd64/mp_machdep.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index 1513393a4387..886ea3734a3f 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -450,13 +450,16 @@ start_all_aps(void) } /* save the current value of the warm-start vector */ - mpbioswarmvec = *((u_int32_t *) WARMBOOT_OFF); + if (!efi_boot) + mpbioswarmvec = *((u_int32_t *) WARMBOOT_OFF); outb(CMOS_REG, BIOS_RESET); mpbiosreason = inb(CMOS_DATA); /* setup a vector to our boot code */ - *((volatile u_short *) WARMBOOT_OFF) = WARMBOOT_TARGET; - *((volatile u_short *) WARMBOOT_SEG) = (boot_address >> 4); + if (!efi_boot) { + *((volatile u_short *)WARMBOOT_OFF) = WARMBOOT_TARGET; + *((volatile u_short *)WARMBOOT_SEG) = (boot_address >> 4); + } outb(CMOS_REG, BIOS_RESET); outb(CMOS_DATA, BIOS_WARM); /* 'warm-start' */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107241553.16OFrAoX030394>