git: 17332276a640 - stable/13 - amd64: do not touch low memory in AP startup unless we used legacy boot

Konstantin Belousov kib at FreeBSD.org
Tue Aug 3 09:52:58 UTC 2021


The branch stable/13 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=17332276a640ea822455089a114b74ca9eeadee4

commit 17332276a640ea822455089a114b74ca9eeadee4
Author:     Konstantin Belousov <kib at FreeBSD.org>
AuthorDate: 2021-07-22 16:27:21 +0000
Commit:     Konstantin Belousov <kib at FreeBSD.org>
CommitDate: 2021-08-03 09:52:36 +0000

    amd64: do not touch low memory in AP startup unless we used legacy boot
    
    (cherry picked from commit 48216088b1157a22b95540efea58f70057cd5c06)
---
 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 aa62c2086fa4..237710da349d 100644
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -450,13 +450,16 @@ native_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' */
 


More information about the dev-commits-src-branches mailing list