diff options
author | dfr <dfr@FreeBSD.org> | 1998-10-19 09:12:41 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1998-10-19 09:12:41 +0000 |
commit | 5e48f3a376c81738d5088bddce52bf3ba5191058 (patch) | |
tree | 87a7f47a4ec1302854660b500475c9b3b2b87cd6 /sys/boot/alpha/common | |
parent | 17c3d6ec9461b24d5a823534f752107e24759cf3 (diff) | |
download | FreeBSD-src-5e48f3a376c81738d5088bddce52bf3ba5191058.zip FreeBSD-src-5e48f3a376c81738d5088bddce52bf3ba5191058.tar.gz |
Reclaim the 48k used by the first bootstrap stage by adding it to the malloc
pool.
Diffstat (limited to 'sys/boot/alpha/common')
-rw-r--r-- | sys/boot/alpha/common/main.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/sys/boot/alpha/common/main.c b/sys/boot/alpha/common/main.c index 365e5c4..f309355 100644 --- a/sys/boot/alpha/common/main.c +++ b/sys/boot/alpha/common/main.c @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: main.c,v 1.4 1998/09/03 02:10:02 msmith Exp $ + * $Id: main.c,v 1.5 1998/09/26 10:51:36 dfr Exp $ */ @@ -70,18 +70,26 @@ main(void) char bootfile[128]; /* - * Initialise the heap as early as possible. Once this is done, alloc() is usable. - * The stack is buried inside us, so this is safe + * Initialise the heap as early as possible. Once this is done, + * alloc() is usable. The stack is buried inside us, so this is + * safe. */ setheap((void *)end, (void *)0x20040000); +#ifdef LOADER + /* + * If this is the two stage disk loader, add the memory used by + * the first stage to the heap. + */ + free_region((void *)PRIMARY_LOAD_ADDRESS, + (void *)SECONDARY_LOAD_ADDRESS); +#endif /* - * XXX Chicken-and-egg problem; we want to have console output early, but some - * console attributes may depend on reading from eg. the boot device, which we - * can't do yet. - * - * We can use printf() etc. once this is done. + * XXX Chicken-and-egg problem; we want to have console output + * early, but some console attributes may depend on reading from + * eg. the boot device, which we can't do yet. We can use + * printf() etc. once this is done. */ cons_probe(); |