Add full UEFI memory map to the /chosen node.
This commit is contained in:
parent
51aa580bee
commit
5b55ec2572
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: efiacpi.c,v 1.3 2018/10/28 10:17:47 jmcneill Exp $ */
|
||||
/* $NetBSD: efiacpi.c,v 1.4 2019/08/01 13:11:16 jmcneill Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2018 The NetBSD Foundation, Inc.
|
||||
@ -35,7 +35,7 @@
|
||||
|
||||
#include <libfdt.h>
|
||||
|
||||
#define ACPI_FDT_SIZE (64 * 1024)
|
||||
#define ACPI_FDT_SIZE (128 * 1024)
|
||||
|
||||
static EFI_GUID Acpi20TableGuid = ACPI_20_TABLE_GUID;
|
||||
static EFI_GUID Smbios3TableGuid = SMBIOS3_TABLE_GUID;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: efifdt.c,v 1.17 2019/07/25 11:44:14 skrll Exp $ */
|
||||
/* $NetBSD: efifdt.c,v 1.18 2019/08/01 13:11:16 jmcneill Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2019 Jason R. Thorpe
|
||||
@ -206,14 +206,14 @@ efi_fdt_memory_map(void)
|
||||
|
||||
memmap = LibMemoryMap(&nentries, &mapkey, &descsize, &descver);
|
||||
for (n = 0, md = memmap; n < nentries; n++, md = NextMemoryDescriptor(md, descsize)) {
|
||||
fdt_appendprop_u32(fdt_data, fdt_path_offset(fdt_data, FDT_CHOSEN_NODE_PATH), "netbsd,uefi-memmap", md->Type);
|
||||
fdt_appendprop_u64(fdt_data, fdt_path_offset(fdt_data, FDT_CHOSEN_NODE_PATH), "netbsd,uefi-memmap", md->PhysicalStart);
|
||||
fdt_appendprop_u64(fdt_data, fdt_path_offset(fdt_data, FDT_CHOSEN_NODE_PATH), "netbsd,uefi-memmap", md->NumberOfPages);
|
||||
fdt_appendprop_u64(fdt_data, fdt_path_offset(fdt_data, FDT_CHOSEN_NODE_PATH), "netbsd,uefi-memmap", md->Attribute);
|
||||
|
||||
if ((md->Attribute & EFI_MEMORY_RUNTIME) != 0)
|
||||
continue;
|
||||
|
||||
fdt_appendprop_u32(fdt_data, chosen, "netbsd,uefi-memory-map", md->Type);
|
||||
fdt_appendprop_u64(fdt_data, chosen, "netbsd,uefi-memory-map", md->PhysicalStart);
|
||||
fdt_appendprop_u64(fdt_data, chosen, "netbsd,uefi-memory-map", md->NumberOfPages);
|
||||
fdt_appendprop_u64(fdt_data, chosen, "netbsd,uefi-memory-map", md->Attribute);
|
||||
|
||||
if ((md->Attribute & EFI_MEMORY_WB) == 0)
|
||||
continue;
|
||||
if (!FDT_MEMORY_USABLE(md))
|
||||
|
@ -1,4 +1,4 @@
|
||||
$NetBSD: version,v 1.11 2019/07/24 11:40:36 jmcneill Exp $
|
||||
$NetBSD: version,v 1.12 2019/08/01 13:11:16 jmcneill Exp $
|
||||
|
||||
NOTE ANY CHANGES YOU MAKE TO THE EFI BOOTLOADER HERE. The format of this
|
||||
file is important - make sure the entries are appended on end, last item
|
||||
@ -15,3 +15,4 @@ is taken as the current.
|
||||
1.8: Add support for "bootargs" environment variable.
|
||||
1.9: Add support for efiboot.plist and loading device tree overlays.
|
||||
1.10: Add support for EFI GOP framebuffers in ACPI mode.
|
||||
1.11: Add full UEFI memory map to /chosen node.
|
||||
|
Loading…
Reference in New Issue
Block a user