Subject: Re: Fun w/ 4GB RAM
To: None <port-i386@netbsd.org>
From: Jason R Thorpe <thorpej@zembu.com>
List: port-i386
Date: 04/21/2000 08:07:46
On Fri, Apr 21, 2000 at 04:53:39AM +0200, Hubert Feyrer wrote:

 >  >> whoever@i-forgot.to.note
 >  >> Memory 630/4093888 k
 >  Use hd1a:netbsd to boot sd0 ...
 >  ...
 >  [no symbol table formats found]
 >  warning: too little memory available; have -102178816 bytes, want 2097152 bytes
 >  running in degraded mode
 >  press a key to confirm
 > 
 > 
 > sounds fun, eh? Note that the ">> Memory" line looks ok - some overrun in
 > the boot loader? After a press on return, the kernel comes up as usual:

Ok, there are some overflow bugs in init386().  I think I've fixed them
and will post a patch as soon as I get into my office.  (Alas, can't run
`cvs diff' while on the train :-)

What happened here is that the BIOS reports the amount of memory in KB
units, so init386() multiplies the values by 1024 in a few places to get
byte counts.  Obviously these were overflowing a signed integer.

-- 
        -- Jason R. Thorpe <thorpej@zembu.com>