git: 5b651b501a46 - main - Map the ACPI tables into the DMAP

From: Andrew Turner <andrew_at_FreeBSD.org>
Date: Fri, 29 Apr 2022 12:11:16 UTC
The branch main has been updated by andrew:

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

commit 5b651b501a466a0c2a8ec6b5afaae348c410f116
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2022-04-29 12:02:15 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2022-04-29 12:11:02 +0000

    Map the ACPI tables into the DMAP
    
    When we try to load these tables via acpidump(8) we need them to be in
    the DMAP for /dev/mem to access. Add the EFI ACPI reclaim memory type
    to the list of memory we map into DMAP but not used by the kernel as
    this is the recommended place to put these.
    
    Sponsored by:   The FreeBSD Foundation
---
 sys/arm64/arm64/machdep.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c
index 4568f3752938..58136981c1a4 100644
--- a/sys/arm64/arm64/machdep.c
+++ b/sys/arm64/arm64/machdep.c
@@ -486,6 +486,11 @@ add_efi_map_entry(struct efi_md *p)
 {
 
 	switch (p->md_type) {
+	case EFI_MD_TYPE_RECLAIM:
+		/*
+		 * The recomended location for ACPI tables. Map into the
+		 * DMAP so we can access them from userspace via /dev/mem.
+		 */
 	case EFI_MD_TYPE_RT_CODE:
 		/*
 		 * Some UEFI implementations put the system table in the