The branch main has been updated by kib:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=2572376f7f6412bc69bd6138e9ac9a6efd7642af

commit 2572376f7f6412bc69bd6138e9ac9a6efd7642af
Author:     Konstantin Belousov <[email protected]>
AuthorDate: 2021-07-29 13:18:19 +0000
Commit:     Konstantin Belousov <[email protected]>
CommitDate: 2021-07-29 22:20:45 +0000

    amd64: do not touch low memory in AP startup unless we used legacy boot
    
    This fixes several ommisions in 48216088b1157a22b955
    
    Reviewed by:    markj
    Sponsored by:   The FreeBSD Foundation
    MFC after:      2 weeks
    Differential revision:  https://reviews.freebsd.org/D31343
---
 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 62f715fd6ed3..6c66bd622855 100644
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -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);
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to