Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sparc/stand Initialize the heap (for alloc()) expli...



details:   https://anonhg.NetBSD.org/src/rev/8d2def9e212a
branches:  trunk
changeset: 473650:8d2def9e212a
user:      pk <pk%NetBSD.org@localhost>
date:      Sat Jun 12 12:49:24 1999 +0000

description:
Initialize the heap (for alloc()) explicitly, since the `end' symbol
is not necessarily double-word aligned.

diffstat:

 sys/arch/sparc/stand/Makefile.buildboot |  5 +++--
 sys/arch/sparc/stand/boot/boot.c        |  8 +++++++-
 sys/arch/sparc/stand/bootxx/bootxx.c    |  8 +++++++-
 3 files changed, 17 insertions(+), 4 deletions(-)

diffs (63 lines):

diff -r 18816e59674b -r 8d2def9e212a sys/arch/sparc/stand/Makefile.buildboot
--- a/sys/arch/sparc/stand/Makefile.buildboot   Sat Jun 12 12:10:30 1999 +0000
+++ b/sys/arch/sparc/stand/Makefile.buildboot   Sat Jun 12 12:49:24 1999 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.buildboot,v 1.6 1999/04/28 15:22:25 christos Exp $
+#      $NetBSD: Makefile.buildboot,v 1.7 1999/06/12 12:49:24 pk Exp $
 
 S=     ${.CURDIR}/../../../..
 
@@ -17,7 +17,8 @@
 # Note: a `RELOC' value of 0x340000 seems to work on most machines
 RELOC?=                ${RELOC_SUN4C}
 
-CPPFLAGS+=     -D_STANDALONE -DRELOC=${RELOC} -DSUN4 -DSUN4C -DSUN_BOOTPARAMS
+CPPFLAGS+=     -D_STANDALONE -DRELOC=${RELOC} -DSUN4 -DSUN4C -DSUN_BOOTPARAMS\
+               -DHEAP_VARIABLE
 
 CPPFLAGS+=     -I. -I${.CURDIR}/../../.. -I${.CURDIR}/../../../..
 CFLAGS=                -O2
diff -r 18816e59674b -r 8d2def9e212a sys/arch/sparc/stand/boot/boot.c
--- a/sys/arch/sparc/stand/boot/boot.c  Sat Jun 12 12:10:30 1999 +0000
+++ b/sys/arch/sparc/stand/boot/boot.c  Sat Jun 12 12:49:24 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: boot.c,v 1.7 1999/05/03 16:13:16 christos Exp $ */
+/*     $NetBSD: boot.c,v 1.8 1999/06/12 12:49:24 pk Exp $ */
 
 /*-
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -123,6 +123,12 @@
        struct btinfo_symtab bi_sym;
        void    *arg;
 
+#ifdef HEAP_VARIABLE
+       {
+               extern char end[];
+               setheap((void *)ALIGN(end), (void *)0xffffffff);
+       }
+#endif
        prom_init();
 
        printf(">> %s, Revision %s\n", bootprog_name, bootprog_rev);
diff -r 18816e59674b -r 8d2def9e212a sys/arch/sparc/stand/bootxx/bootxx.c
--- a/sys/arch/sparc/stand/bootxx/bootxx.c      Sat Jun 12 12:10:30 1999 +0000
+++ b/sys/arch/sparc/stand/bootxx/bootxx.c      Sat Jun 12 12:49:24 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bootxx.c,v 1.5 1999/05/03 16:13:16 christos Exp $ */
+/*     $NetBSD: bootxx.c,v 1.6 1999/06/12 12:49:25 pk Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -76,6 +76,12 @@
        void (*entry)__P((void *)) = (void (*)__P((void *)))PROM_LOADADDR;
        void    *arg;
 
+#ifdef HEAP_VARIABLE
+       {
+               extern char end[];
+               setheap((void *)ALIGN(end), (void *)0xffffffff);
+       }
+#endif
        prom_init();
        prom_bootdevice = prom_getbootpath();
        io.f_flags = F_RAW;



Home | Main Index | Thread Index | Old Index