Subject: How do I get NetBSD to recognize 128MB of memory?
To: None <port-i386@NetBSD.ORG>
From: Duncan McEwan <duncan@Comp.VUW.AC.NZ>
List: port-i386
Date: 01/22/1997 14:07:38
We have a Pentium that currently has 64MB of memory.  We would like to add
another 64MB.

When we initially did this, the numbers printed out by the kernel on boot
indicated that the extra memory wasn't being seen.  We figured the PC bios was
probably one of those that didn't correctly return the amount of physical
memory, so we set the EXTMEM_SIZE define in the kernel config file.

The kernel now printed more reasonable looking values, but after the autoconfig
of the hardware and before running init, I got the "famous" ptdi panic.  So,
following the advice in section 2 of the *BSD FAQ, I increased the variable
NKPDE in i386/include/pmap.h (I bumped it up from 12 to 24).

Now, the kernel gets further, but part the way into running the rc script
I get a

    fatal pagefault in supervisor mode
    trap type 4 code 0 eip f81a03o0 cs 8 eflags 10247 cr2 ffc004 cpl e0001cda
    panic: trap

One possibility is that the number we set EXTMEM_SIZE to is incorrect.
Unfortunately this machine is quite busy so it's inconvenient to experiment on
by rebooting it frequently.  We currently have EXTMEM_SIZE set to 130432, which
is (128MB - 640KB)/1024.  Should this perhaps be set to 130048 (ie, changing
the 640KB to 1MB, to allow for the I/O hole in the i386 address space)?  If so,
could this overstating of the amount of physical memory we have be the cause of
the fatal pagefault panic?

Any other suggestions will be gratefully accepted.

Thanks in advance...

Duncan