Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Nov 2000 14:20:55 -0800 (PST)
From:      Matthew Jacob <mjacob@feral.com>
To:        alpha@freebsd.org
Subject:   [4.2] new kern.flp to try
Message-ID:  <Pine.LNX.4.21.0011161416180.9657-200000@zeppo.feral.com>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]

I've backported the larger heap area and stack from -current to the 4.2
loader- it can be picked up from

http://www.people.freebsd.org/~mjacob/kern.flp.fixed

If you'd like to try it. I power-cycled an XP1000 and booted it. Unfortunately
I'm 40 miles away from the machine yesterday that wouldn't boot so I can't yet
confirm it fixes anything.

-matt


[-- Attachment #2 --]
Index: sys/boot/alpha/common/main.c
===================================================================
RCS file: /home/ncvs/src/sys/boot/alpha/common/main.c,v
retrieving revision 1.11.2.1
diff -u -r1.11.2.1 main.c
--- sys/boot/alpha/common/main.c	2000/10/28 01:08:51	1.11.2.1
+++ sys/boot/alpha/common/main.c	2000/11/16 19:53:25
@@ -63,6 +63,8 @@
     return total;
 }
 
+/* #define	XTRA_PAGES	32 */
+#define	XTRA_PAGES	64
 void
 extend_heap(void)
 {
@@ -87,19 +89,18 @@
     }
 
     /*
-     * We want to extend the heap from 256k to 512k.  With 8k pages
-     * (assumed), we need 32 pages.  We take pages from the end of the
-     * last usable memory region, taking care to avoid the memory used
-     * by the kernel's message buffer.  We allow 4 pages for the
-     * message buffer.
+     * We want to extend the heap from 256k up to XTRA_PAGES more pages.
+     * We take pages from the end of the last usable memory region,
+     * taking care to avoid the memory used by the kernel's message
+     * buffer.  We allow 4 pages for the message buffer.
      */
-    startpfn = memc->mddt_pfn + memc->mddt_pg_cnt - 4 - 32;
+    startpfn = memc->mddt_pfn + memc->mddt_pg_cnt - 4 - XTRA_PAGES;
     startva = 0x20040000;
     startpte = 0x40000000
 	+ (((startva >> 23) & 0x3ff) << PAGE_SHIFT)
 	+ (((startva >> 13) & 0x3ff) << 3);
 
-    for (i = 0; i < 32; i++) {
+    for (i = 0; i < XTRA_PAGES; i++) {
 	u_int64_t pte;
 	pte = ((startpfn + i) << 32) | 0x1101;
 	*(u_int64_t *) (startpte + 8 * i) = pte;
@@ -117,9 +118,9 @@
      * alloc() is usable. The stack is buried inside us, so this is
      * safe.
      */
-    setheap((void *)end, (void *)0x20080000);
+    setheap((void *)end, (void *)(0x20040000 + XTRA_PAGES * 8192));
 
-#ifdef LOADER
+#ifdef	LOADER
     /*
      * If this is the two stage disk loader, add the memory used by
      * the first stage to the heap.
Index: sys/boot/alpha/libalpha/start.S
===================================================================
RCS file: /home/ncvs/src/sys/boot/alpha/libalpha/start.S,v
retrieving revision 1.6.2.1
diff -u -r1.6.2.1 start.S
--- sys/boot/alpha/libalpha/start.S	2000/10/28 01:08:52	1.6.2.1
+++ sys/boot/alpha/libalpha/start.S	2000/11/16 19:45:39
@@ -45,7 +45,7 @@
 	.set	noreorder		/* don't reorder instructions */
 
 #define ENTRY_FRAME	32
-#define STACK_SIZE	8192
+#define STACK_SIZE	12288
 
 NESTED(start, 1, ENTRY_FRAME, ra, 0, 0)
 	br	pv,Lstartgp
@@ -55,14 +55,14 @@
 #ifndef BOOT1
 	CALL(extend_heap)
 #endif
-
+	
 	lda	a0,_edata
 	lda	a1,_end
 	subq	a1,a0,a1
 	CALL(bzero)
 
 #ifndef BOOT1
-	lda	sp,stack + STACK_SIZE - ENTRY_FRAME
+	lda	sp,stackbase + STACK_SIZE - ENTRY_FRAME
 #endif
 	
 	CALL(main)			/* transfer to C */
@@ -89,5 +89,5 @@
 END(cpu_number)
 
 #ifndef BOOT1
-BSS(stack, STACK_SIZE)
+BSS(stackbase, STACK_SIZE)
 #endif

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.21.0011161416180.9657-200000>