summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>2000-10-25 23:36:01 +0000
committerdfr <dfr@FreeBSD.org>2000-10-25 23:36:01 +0000
commitc10c0d316a45c9730a7105518cf4a331ac748faa (patch)
treea39b32ec406165673a139d683dbddd060e68798e /sys
parent0b955e26d95238968001c8596448df61b6206c9a (diff)
downloadFreeBSD-src-c10c0d316a45c9730a7105518cf4a331ac748faa.zip
FreeBSD-src-c10c0d316a45c9730a7105518cf4a331ac748faa.tar.gz
Move the call to extend_heap() from main to start so that if our BSS
expands beyond the limit we will extend the address space before trying to zero the BSS. This should give us plenty of headroom for modest expansion of the loader.
Diffstat (limited to 'sys')
-rw-r--r--sys/boot/alpha/common/main.c5
-rw-r--r--sys/boot/alpha/libalpha/start.S4
2 files changed, 6 insertions, 3 deletions
diff --git a/sys/boot/alpha/common/main.c b/sys/boot/alpha/common/main.c
index 778ce82..8b5fcff 100644
--- a/sys/boot/alpha/common/main.c
+++ b/sys/boot/alpha/common/main.c
@@ -66,8 +66,8 @@ memsize()
/* #define XTRA_PAGES 32 */
#define XTRA_PAGES 64
-static void
-extend_heap()
+void
+extend_heap(void)
{
struct rpb *hwrpb = (struct rpb *)HWRPB_ADDR;
struct mddt *mddtp;
@@ -119,7 +119,6 @@ main(void)
* alloc() is usable. The stack is buried inside us, so this is
* safe.
*/
- extend_heap();
setheap((void *)end, (void *)(0x20040000 + XTRA_PAGES * 8192));
#ifdef LOADER
diff --git a/sys/boot/alpha/libalpha/start.S b/sys/boot/alpha/libalpha/start.S
index 1830baf..6cf30a3 100644
--- a/sys/boot/alpha/libalpha/start.S
+++ b/sys/boot/alpha/libalpha/start.S
@@ -52,6 +52,10 @@ NESTED(start, 1, ENTRY_FRAME, ra, 0, 0)
Lstartgp:
LDGP(pv)
+#ifndef BOOT1
+ CALL(extend_heap)
+#endif
+
lda a0,_edata
lda a1,_end
subq a1,a0,a1
OpenPOWER on IntegriCloud