Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/stand/efiboot Dump memory map if EFI_MEMORY_DEBUG is def...
details: https://anonhg.NetBSD.org/src/rev/32a690f77ac0
branches: trunk
changeset: 366567:32a690f77ac0
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sun Sep 02 23:54:25 2018 +0000
description:
Dump memory map if EFI_MEMORY_DEBUG is defined
diffstat:
sys/stand/efiboot/efifdt.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diffs (22 lines):
diff -r 804a7ecd9162 -r 32a690f77ac0 sys/stand/efiboot/efifdt.c
--- a/sys/stand/efiboot/efifdt.c Sun Sep 02 23:50:23 2018 +0000
+++ b/sys/stand/efiboot/efifdt.c Sun Sep 02 23:54:25 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: efifdt.c,v 1.5 2018/08/28 01:24:39 jmcneill Exp $ */
+/* $NetBSD: efifdt.c,v 1.6 2018/09/02 23:54:25 jmcneill Exp $ */
/*-
* Copyright (c) 2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -103,6 +103,12 @@
memmap = LibMemoryMap(&nentries, &mapkey, &descsize, &descver);
for (n = 0, md = memmap; n < nentries; n++, md = NextMemoryDescriptor(md, descsize)) {
+#ifdef EFI_MEMORY_DEBUG
+ printf("MEM: %u: Type 0x%x Attr 0x%lx Phys 0x%lx Virt 0x%lx Size 0x%lx\n",
+ n, md->Type, md->Attribute,
+ md->PhysicalStart, md->VirtualStart,
+ (u_long)md->NumberOfPages * EFI_PAGE_SIZE);
+#endif
if ((md->Attribute & EFI_MEMORY_WB) == 0)
continue;
if (!FDT_MEMORY_USABLE(md))
Home |
Main Index |
Thread Index |
Old Index