johnsfine |
11-23-2009 07:42 AM |
Quote:
Originally Posted by Quakeboy02
(Post 3766165)
Are you sure?
|
Very.
Quote:
A 64 bit kernel doesn't need any remapping tricks to access the address space above 32 bits.
|
x86 Linux always uses memory mapping. 32 bit non PAE, 32 bit PAE and 64 bit all use similar mapping designs.
The memory mapping translates a virtual address into a physical address. All three use a design that leaves the bottom 12 bits of the virtual address unchanged.
32 bit non PAE has 1024 entries per 4KB mapping table so each mapping level translates ten address bits. There are two mapping levels to translate the top 20 address bits. With the bottom 12 untranslated, a 32 bit virtual address becomes a 32 bit physical address.
There is nothing in the basic design that says a virtual address should be the same size as a physical address. The 32 bit x86 architecture limits the virtual address to 32 bits, but places no such limit on the physical address.
The 32 bit limit on physical address comes from having 1024 entries per 4KB mapping table. The major change from that to both PAE and 64 bit is having only 512 entries per 4KB mapping table.
With 512 entries, each level translates nine address bits. PAE needs three levels (two ordinary and one small) to translate the top 20 bits. 64 bit mode uses four levels to translate 36 bits, so including the 12 untranslated bits it has 48 bit virtual addresses.
I think 52 physical address bits would be possible with 512 x86 format entries per 4KB table. The spec for 32 bit PAE specifies 36 physical address bits. Various x86_64 chip models have various numbers of physical address bits from 36 up.
|