diff options
Diffstat (limited to 'sys/boot/pc98/libpc98/biosmem.c')
-rw-r--r-- | sys/boot/pc98/libpc98/biosmem.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/sys/boot/pc98/libpc98/biosmem.c b/sys/boot/pc98/libpc98/biosmem.c index aec3cbb..a25d8c2 100644 --- a/sys/boot/pc98/libpc98/biosmem.c +++ b/sys/boot/pc98/libpc98/biosmem.c @@ -34,8 +34,13 @@ __FBSDID("$FreeBSD$"); #include "libi386.h" #include "btxv86.h" -vm_offset_t memtop, memtop_copyin; -uint32_t bios_basemem, bios_extmem; +vm_offset_t memtop, memtop_copyin, high_heap_base; +uint32_t bios_basemem, bios_extmem, high_heap_size; + +/* + * The minimum amount of memory to reserve in bios_extmem for the heap. + */ +#define HEAP_MIN (3 * 1024 * 1024) void bios_getmem(void) @@ -48,4 +53,12 @@ bios_getmem(void) /* Set memtop to actual top of memory */ memtop = memtop_copyin = 0x100000 + bios_extmem; + /* + * If we have extended memory, use the last 3MB of 'extended' memory + * as a high heap candidate. + */ + if (bios_extmem >= HEAP_MIN) { + high_heap_size = HEAP_MIN; + high_heap_base = memtop - HEAP_MIN; + } } |