git: 2c7315c09a2b - 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:59 UTC 2021


The branch stable/13 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=2c7315c09a2b228f544c5c94b29f4d55701792f8

commit 2c7315c09a2b228f544c5c94b29f4d55701792f8
Author:     Konstantin Belousov <kib at FreeBSD.org>
AuthorDate: 2021-07-29 13:18:19 +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 2572376f7f6412bc69bd6138e9ac9a6efd7642af)
---
 sys/amd64/amd64/mp_machdep.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c
index 237710da349d..74f1af919b66 100644
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -502,7 +502,8 @@ native_start_all_aps(void)
 		/* attempt to start the Application Processor */
 		if (!start_ap(apic_id)) {
 			/* 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);
 		}
 
@@ -510,7 +511,8 @@ native_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);


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