diff options
author | Ian Moffett <ian@osmora.org> | 2025-09-17 01:44:55 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-09-17 01:44:55 -0400 |
commit | 7f71ee15dfca8cd3e6ba4309ed768015ffbe8644 (patch) | |
tree | d147dd9ebfe80c606f16fc35e9cdf4d22b1cd33b /src/sys/vm/vm_seg.c | |
parent | b6983be0368bb39e3a8cbd919235b14504f1d995 (diff) |
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 <ian@osmora.org>
Diffstat (limited to 'src/sys/vm/vm_seg.c')
-rw-r--r-- | src/sys/vm/vm_seg.c | 13 |
1 files changed, 12 insertions, 1 deletions
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 <limine.h> #include <string.h> +/* 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; |