The branch main has been updated by vexeduxr:

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

commit e05999a8c5a9bfb2f5c91fbc1dc397d46eed5bbb
Author:     Ahmad Khalifa <vexed...@freebsd.org>
AuthorDate: 2025-07-07 04:07:15 +0000
Commit:     Ahmad Khalifa <vexed...@freebsd.org>
CommitDate: 2025-07-07 04:07:15 +0000

    amd64: move efi_map_regs definition
    
    Since efi_map_regs is used in machdep.c, efirt being compiled as a
    module causes it to be left undefined.
    
    Fixes:          85dcdb7aad85498b3f497b8752e69b8612b27cb7
    Noticed by:     kib
    Reviewed by:    kib, markj
    Approved by:    imp (mentor)
    Differential Revision:  https://reviews.freebsd.org/D51183
---
 sys/amd64/amd64/efirt_machdep.c | 2 --
 sys/amd64/amd64/machdep.c       | 6 ++++++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/sys/amd64/amd64/efirt_machdep.c b/sys/amd64/amd64/efirt_machdep.c
index f70e235a0150..fe5d60c978dd 100644
--- a/sys/amd64/amd64/efirt_machdep.c
+++ b/sys/amd64/amd64/efirt_machdep.c
@@ -63,8 +63,6 @@
     1u << EFI_MD_TYPE_FIRMWARE \
 )
 
-uint32_t efi_map_regs;
-
 static pml5_entry_t *efi_pml5;
 static pml4_entry_t *efi_pml4;
 static vm_object_t obj_1t1_pt;
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index 1e8f9b22bd19..f46462b39fa3 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -188,6 +188,12 @@ struct init_ops init_ops = {
  */
 vm_paddr_t efi_systbl_phys;
 
+/*
+ * Bitmap of extra EFI memory region types that should be preserved and mapped
+ * during runtime services calls.
+ */
+uint32_t efi_map_regs;
+
 /* Intel ICH registers */
 #define ICH_PMBASE     0x400
 #define ICH_SMI_EN     ICH_PMBASE + 0x30

Reply via email to