Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/aarch64/aarch64 add a command to dump the bootconfi...
details: https://anonhg.NetBSD.org/src/rev/210100b9c9e8
branches: trunk
changeset: 979916:210100b9c9e8
user: mrg <mrg%NetBSD.org@localhost>
date: Sun Jan 17 00:23:59 2021 +0000
description:
add a command to dump the bootconfig passed meminfo.
diffstat:
sys/arch/aarch64/aarch64/db_machdep.c | 26 ++++++++++++++++++++++++--
1 files changed, 24 insertions(+), 2 deletions(-)
diffs (58 lines):
diff -r 85875228d6d2 -r 210100b9c9e8 sys/arch/aarch64/aarch64/db_machdep.c
--- a/sys/arch/aarch64/aarch64/db_machdep.c Sun Jan 17 00:23:38 2021 +0000
+++ b/sys/arch/aarch64/aarch64/db_machdep.c Sun Jan 17 00:23:59 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.c,v 1.30 2020/12/11 18:03:33 skrll Exp $ */
+/* $NetBSD: db_machdep.c,v 1.31 2021/01/17 00:23:59 mrg Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.30 2020/12/11 18:03:33 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.31 2021/01/17 00:23:59 mrg Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd32.h"
@@ -79,6 +79,7 @@
#if defined(_KERNEL) && defined(MULTIPROCESSOR)
void db_md_switch_cpu_cmd(db_expr_t, bool, db_expr_t, const char *);
#endif
+static void db_md_meminfo_cmd(db_expr_t, bool, db_expr_t, const char *);
const struct db_command db_machine_command_table[] = {
#if defined(_KERNEL) && defined(MULTIPROCESSOR)
@@ -152,6 +153,12 @@
"\t#: watchpoint number to remove"
"\t/1..8: size of data\n")
},
+ {
+ DDB_ADD_CMD(
+ "meminfo", db_md_meminfo_cmd, 0,
+ "Dump info about memory ranges",
+ NULL, NULL)
+ },
#endif
{
DDB_ADD_CMD(NULL, NULL, 0,
@@ -1075,3 +1082,18 @@
return 1;
}
#endif
+
+static void
+db_md_meminfo_cmd(db_expr_t addr, bool have_addr, db_expr_t count,
+ const char *modif)
+{
+ unsigned blk;
+
+ for (blk = 0; blk < bootconfig.dramblocks; blk++) {
+ db_printf("blk[%u]: start %lx end %lx (pages %x)\n",
+ blk, bootconfig.dram[blk].address,
+ bootconfig.dram[blk].address +
+ (uint64_t)bootconfig.dram[blk].pages * PAGE_SIZE,
+ bootconfig.dram[blk].pages);
+ }
+}
Home |
Main Index |
Thread Index |
Old Index