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 | |
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')
-rw-r--r-- | sys/boot/alpha/Makefile.inc | 6 | ||||
-rw-r--r-- | sys/boot/alpha/boot2/Makefile | 3 | ||||
-rw-r--r-- | sys/boot/alpha/common/main.c | 24 | ||||
-rw-r--r-- | sys/boot/alpha/netboot/Makefile | 3 |
4 files changed, 23 insertions, 13 deletions
diff --git a/sys/boot/alpha/Makefile.inc b/sys/boot/alpha/Makefile.inc index bbbea75..b8f2470 100644 --- a/sys/boot/alpha/Makefile.inc +++ b/sys/boot/alpha/Makefile.inc @@ -1,7 +1,7 @@ # Options used when building app-specific libalpha components -PRIMARY_LOAD_ADDRESS= 20000000 # "Region 1 start" -SECONDARY_LOAD_ADDRESS= 2000c000 # "Region 1 start" + 48k -HEAP_LIMIT= 20040000 # "Region 1 start" + 256k +PRIMARY_LOAD_ADDRESS= 0x20000000 # "Region 1 start" +SECONDARY_LOAD_ADDRESS= 0x2000c000 # "Region 1 start" + 48k +HEAP_LIMIT= 0x20040000 # "Region 1 start" + 256k DPADD+= ${DESTDIR}/${LIBDIR}/libstand.a LIBSTANDDIR= ${.CURDIR}/../../../../lib/libstand LIBSTAND= -lstand diff --git a/sys/boot/alpha/boot2/Makefile b/sys/boot/alpha/boot2/Makefile index edc1c44..5b58e49 100644 --- a/sys/boot/alpha/boot2/Makefile +++ b/sys/boot/alpha/boot2/Makefile @@ -16,6 +16,9 @@ SRCS+= main.c conf.c CFLAGS+= -mno-fp-regs CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR} CFLAGS+= -I${.CURDIR}/../../.. -I. +CFLAGS+= -DLOADER +CFLAGS+= -DPRIMARY_LOAD_ADDRESS=${PRIMARY_LOAD_ADDRESS} \ + -DSECONDARY_LOAD_ADDRESS=${SECONDARY_LOAD_ADDRESS} CLEANFILES+= vers.c vers.o gensetdefs.o gensetdefs setdef0.o setdef1.o \ setdefs.h start.o 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(); diff --git a/sys/boot/alpha/netboot/Makefile b/sys/boot/alpha/netboot/Makefile index bb4a77e..92e1839 100644 --- a/sys/boot/alpha/netboot/Makefile +++ b/sys/boot/alpha/netboot/Makefile @@ -16,8 +16,7 @@ SRCS+= main.c conf.c dev_net.c CFLAGS+= -mno-fp-regs CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR} CFLAGS+= -I${.OBJDIR} -# Verbose ls causes extra heap usage -CFLAGS+= -DVERBOSE_LS +CFLAGS+= -DNETBOOT CLEANFILES+= vers.c vers.o gensetdefs.o gensetdefs setdef0.o setdef1.o \ setdefs.h start.o |