Subject: 32-bit+ addressing (was Re: savecore_flags="-z")
To: Jonathan Stone <jonathan@DSG.Stanford.EDU>
From: Colin Wood <cwood@ichips.intel.com>
List: tech-kern
Date: 12/02/1999 16:23:52
Jonathan Stone wrote:
> In message <199912022235.OAA14076@lestat.nas.nasa.gov>,
> Jason Thorpe writes:
> 
> >The i386 port does not assume it can map all of physical memory at once.
> 
> 
> So if i had a Xeon motherboard with >4 gigs of memory, or even >2gigs,
> what'd be needed to get NetBSD to use it all?  I know some Lisp users
> who're currrently using L**** who'd really like that.

read section 3.8 of vol 3 of the intel architecture software developer's
manual.  it explains the physical address extensions that allow 36-bit
addressing.  some of the changes are:

o pages can be either 4kB or 2MB in size
o PTE's are now 64 bits wide (although only 36 bits are used)
o there is now a page directory pointer table (which contains pointers 
  to page directories) whose address is stored in CR3 instead of the PDE
  base

for 4kB pages, a linear address is then broken up like so:

31-30: entry in the page-directory pointer table (yields the base address
       of the page directory)
29-21: entry in the page directory (yields the base address of the page
       table)
20-12: entry in the page table (yields the base address of the page)
11-0:  offset in the page


i have no idea how the i386 pmap works, so i don't know what would need to
be changed to support the above extensions.

later.

colin