From 7f71ee15dfca8cd3e6ba4309ed768015ffbe8644 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Wed, 17 Sep 2025 01:44:55 -0400 Subject: kern: Make memmap dump configurable via kconf Use the OSMORA kernel configuration framework to add options for L5Lunos to parse during early startup. Signed-off-by: Ian Moffett --- src/sys/vm/vm_seg.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/sys/vm') diff --git a/src/sys/vm/vm_seg.c b/src/sys/vm/vm_seg.c index d4db468..682a61c 100644 --- a/src/sys/vm/vm_seg.c +++ b/src/sys/vm/vm_seg.c @@ -37,6 +37,13 @@ #include #include +/* From kconf */ +#if defined(__DUMP_MEMMAP) +#define DUMP_MEMMAP __DUMP_MEMMAP +#else +#define DUMP_MEMMAP 0 +#endif + #define BYTES_PER_MIB 8388608 static size_t pages_free = 0; @@ -147,7 +154,11 @@ physmem_init_bitmap(void) start = ent->base; end = ent->base + ent->length; - printf("sysmem: [%p -> %p]: %s\n", start, end, typestr); + + /* Should we dump the memory map? */ + if (DUMP_MEMMAP) { + printf("sysmem: [%p -> %p]: %s\n", start, end, typestr); + } if (ent->type != LIMINE_MEMMAP_USABLE) { continue; -- cgit v1.2.3