summaryrefslogtreecommitdiffstats
path: root/sys/boot
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>2005-12-21 06:10:42 +0000
committernyan <nyan@FreeBSD.org>2005-12-21 06:10:42 +0000
commita70a67d8a8e4221124a0e3f853c8ed103b200c16 (patch)
tree9f4f7d10d363ff45e249ae70460ca78ab6bc27e3 /sys/boot
parentc3407b9b23ac3affa68fbcf7c28bbf8c98c6221f (diff)
downloadFreeBSD-src-a70a67d8a8e4221124a0e3f853c8ed103b200c16.zip
FreeBSD-src-a70a67d8a8e4221124a0e3f853c8ed103b200c16.tar.gz
MFi386: revisions 1.34 and 1.36.
Diffstat (limited to 'sys/boot')
-rw-r--r--sys/boot/pc98/loader/main.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/sys/boot/pc98/loader/main.c b/sys/boot/pc98/loader/main.c
index 60a1c9f..f51096b 100644
--- a/sys/boot/pc98/loader/main.c
+++ b/sys/boot/pc98/loader/main.c
@@ -72,6 +72,9 @@ extern char bootprog_name[], bootprog_rev[], bootprog_date[], bootprog_maker[];
/* XXX debugging */
extern char end[];
+static void *heap_top;
+static void *heap_bottom;
+
int
main(void)
{
@@ -88,7 +91,15 @@ main(void)
*/
bios_getmem();
- setheap((void *)end, (void *)bios_basemem);
+#ifdef LOADER_BZIP2_SUPPORT
+ heap_top = PTOV(memtop_copyin);
+ memtop_copyin -= 0x300000;
+ heap_bottom = PTOV(memtop_copyin);
+#else
+ heap_top = (void *)bios_basemem;
+ heap_bottom = (void *)end;
+#endif
+ setheap(heap_bottom, heap_top);
/*
* XXX Chicken-and-egg problem; we want to have console output early, but some
@@ -265,7 +276,8 @@ static int
command_heap(int argc, char *argv[])
{
mallocstats();
- printf("heap base at %p, top at %p\n", end, sbrk(0));
+ printf("heap base at %p, top at %p, upper limit at %p\n", heap_bottom,
+ sbrk(0), heap_top);
return(CMD_OK);
}
OpenPOWER on IntegriCloud