Subject: port-i386/17494: Bootblocks print error regarding heap
To: None <gnats-bugs@gnats.netbsd.org>
From: None <scotte@warped.com>
List: netbsd-bugs
Date: 07/06/2002 17:39:16
>Number:         17494
>Category:       port-i386
>Synopsis:       Accessing disk from bootloader causes system to hang
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-i386-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 06 10:40:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Scott Ellis
>Release:        NetBSD 1.6A
>Organization:
   //////////////////////////////////////////////////////////////////////
  //    Scott Ellis     //             scotte@warped.com              //
 //////////////////////////////////////////////////////////////////////
// WARNING: This signature warps  time and space in its vicinity    //
>Environment:
	
	
System: NetBSD intrepid 1.6A NetBSD 1.6A (INTREPID) #0: Sun Jun 2 10:03:49 PDT 2002 scotte@intrepid:/misc/localsrc/netbsd/netbsd_cvs_src/src/sys/arch/i386/compile/INTREPID i386
Architecture: i386
Machine: i386
>Description:
	
After upgrading the bootblocks to what came with 1.6A (from 1.5ZA?..somewhere
around there), attempting to "ls" or "boot" from the bootblocks caused the
system to print an error regarding heap (sorry, the exact error has been lost,
but referenced something to the effect of "heap exceeded at 49152").
This also coincided with the replacement of a 4G disk with a 120G disk, so that
may be where the problem is.  Ramdonly editing the HEAP_LIMIT in the Makefile
solved the problem (I've no real idea WHY it fixed it, but it did!).

Disks look at follows:

# /dev/rwd0d:
type: ESDI
disk: WDC WD1200JB-75C
label: fictitious
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 16383
total sectors: 234375000
rpm: 7200
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0 

6 partitions:
#        size    offset     fstype  [fsize bsize cpg/sgs]
 a:   6144768         0     4.2BSD   8192 65536  4272   # (Cyl.    0 - 6095)
 b:    525168   6144768       swap                      # (Cyl. 6096 - 6616)
 d: 234375000         0     unused      0     0         # (Cyl.    0 - 232514*)
 e:   2048256   6669936     4.2BSD   4096  8192   181   # (Cyl. 6617 - 8648)
 f: 225656808   8718192     4.2BSD   8192 65536  4128   # (Cyl. 8649 - 232514*)

>How-To-Repeat:
	
Attempt to boot with 1.6A bootblocks on my system with a 120G disk.
>Fix:
	
[intrepid(2)]stand/biosboot> diff -u Makefile.orig Makefile
--- Makefile.orig       Sun May  5 11:47:13 2002
+++ Makefile    Sun May  5 11:48:02 2002
@@ -54,7 +54,8 @@
 #CFLAGS= -O2 -fomit-frame-pointer -fno-defer-pop
 CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-main
 
-SAMISCCPPFLAGS+= -DHEAP_START=0x20000 -DHEAP_LIMIT=0x50000
+#SAMISCCPPFLAGS+= -DHEAP_START=0x20000 -DHEAP_LIMIT=0x50000
+SAMISCCPPFLAGS+= -DHEAP_START=0x20000 -DHEAP_LIMIT=0x100000
 SAMISCMAKEFLAGS+= SA_USE_CREAD=yes     # Read compressed kernels
 SAMISCMAKEFLAGS+= SA_INCLUDE_NET=no    # Netboot via TFTP, NFS

>Release-Note:
>Audit-Trail:
>Unformatted: