diff --git a/stand/kboot/main.c b/stand/kboot/main.c index f81d7b2cead4..1cc4c0531772 100644 --- a/stand/kboot/main.c +++ b/stand/kboot/main.c @@ -86,6 +86,11 @@ memory_limits(void) committed_as <<= 10; /* Units are kB */ } } + } else { + /* Otherwise, on FreeBSD host, for testing 32GB host: */ + mem_avail = 31ul << 30; /* 31GB free */ + commit_limit = mem_avail * 9 / 10; /* 90% comittable */ + committed_as = 20ul << 20; /* 20MB used */ } printf("Commit limit: %lld Committed bytes %lld Available %lld\n", (long long)commit_limit, (long long)committed_as, diff --git a/stand/kboot/seg.c b/stand/kboot/seg.c index 947aa0a2a7a3..4da53e2bc75d 100644 --- a/stand/kboot/seg.c +++ b/stand/kboot/seg.c @@ -286,6 +286,9 @@ populate_avail_from_iomem(void) fd = open("host:/proc/iomem", O_RDONLY); if (fd == -1) { printf("Can't get memory map\n"); + init_avail(); + // Hack: 32G of RAM starting at 4G + add_avail(4ull << 30, 36ull << 30, system_ram); return false; }