Subject: Re: "large" ram on mac68k
To: gabriel rosenkoetter <gr@eclipsed.net>
From: Allen Briggs <briggs@wasabisystems.com>
List: port-mac68k
Date: 04/29/2001 13:00:30
On Sun, Apr 29, 2001 at 11:11:42AM -0400, gabriel rosenkoetter wrote:
> > > total memory = 65536 KB
> > > avail memory = 88444 KB
> Nothing personal, Allen, but did you look closely at the lines I've
> requoted above?

No, I didn't notice that.  Sorry...  Did you read mine, though?  My
system is reporting the 100 MB, not 65536 KB.

The MAXMEM setting is probably just left over from the 4.4 hp300 port
(which is what we used as a template ages and ages ago).  Hmmm...  Or
not.  It shows as last being modified in revision 1.240 of the file
(ragge 04-Dec-99), and the initialization last modified by scottr
(1.183 24-Feb-98).  According to the changelog:
1.240 was removing constants based on CLBYTES, et al.
1.183 was
	"The code compiled in by the MADHATTER option is now standard issue.
	 While here, do a bunch of KNF, particularly whitespace issues."

So, before revision 1.183...  MAXMEM was defined to be 64*1024*CLSIZE (from
revision 1.1 of machdep.c and the initialization of physmem is the same
in revision 1.1, modulo whitespace).  AFAIK, the static initialization
can be removed and the #defined MAXMEM removed entirely.

So, I don't know why the total memory is being reported as 64MB.  It
shouldn't be.  Hmmm...  Unless it's missing a memory range somehow.
physmem is initialized in pmap_bootstrap() as the sum of the memory
ranges stored in the high/low arrays.  Those arrays are initialized
in get_mapping().  That's called if the MMU is enabled upon boot.
Otherwise, the value that's set in the booter is used.

If it's getting the values via get_mapping(), with a diagnostic/verbose
boot, you'll see "Getting mapping from MMU." and "Done.".  If it's
getting it from the booter, you'll see "Faked ramge to byte XXX."

So: Make sure that the booter's not trying to override the amount of RAM
or that it's set to the correct amount of RAM.

-allen

-- 
 Allen Briggs                     briggs@wasabisystems.com
 http://www.wasabisystems.com/    Quality NetBSD CDs, Sales, Support, Service
NetBSD dev. for _your_ Alpha, ARM, M68K, MIPS, PowerPC, SH3, Sparc, x86, etc...