bzt wrote:linguofreak wrote:Citation needed? I can't find anything in the AMD documentation on the architecture that says that there is an architectural limit
Try the search phrase "architectural limit"
I've looked it up for you, and I remembered incorrectly, it is not 56 bits, just 52 bits in best case.
You cut the sentence off early when you quoted me, what I said was:
Citation needed? I can't find anything in the AMD documentation on the architecture that says that there is an architectural limit on virtual memory short of the 64-bit mark.
(Missing bit in italics, important bit also in bold).
The AMD docs mention the limit on the number of *physical* address bits as an architectural limit, but while it is true that no existing implementations support full 64-bit virtual addresses, and that the page table structure to do so has not yet been specified, they do *not* say anywhere that the limit on *virtual* address width is an *architectural* limit.
Btw, here are the references:
- AMD64 Architecture Programmer's Manual Volume 2: System Programming, section 3.1.2 CR2 and CR3 registers, bits 52-63 reserved and MBZ.
- AMD64 Architecture Programmer's Manual Volume 2: System Programming, section 5.1 Page Translation Overview,
Currently, the AMD64 architecture defines a mechanism for translating 48-bit virtual addresses to 52-bit physical addresses. The mechanism used to translate a full 64-bit virtual addresses is reserved
and it also mentions that a certain implementation may implement fewer bits, requiring minimum 36 bits only (to support legacy PAE).
Once again, you're mixing up physical and virtual addresses. The 36 bits needed to support PAE are bits of *physical* address width, and have nothing to do with virtual addresses. And saying that the mechanism to translate a full 64-bit virtual address is reserved is basically a statement that the current limit to 64-bits is *not* an architectural limit: they're reserving it (and enforcing sign-extension of addresses) for the explicit purpose of being able to expand virtual addresses out later on in a backwards-compatible manner.
[*] Intel64 and IA-32 Architectures Software Developer's Manual, Volume 3A, System Programming Guide, Part 1, section 3.10.4 Enchanced Paging Data Structures (allows up to 39 bits, but bits 52-63 reserved for system programmer, so it can't go above 52 bits).
The format discussed here is exactly identical in the AMD and Intel manuals, except for slight differences in the terminology used to describe it. For the CR3 format, bits 52-63 are *reserved*, not for the system programmer, but for future expansion, and must be zero. For paging structure entries that point at a paging structure one level down, bits 52-62 are Available/Ignored (as stated by the AMD/Intel manuals respectively), and bit 63 is the NX/XD bit. For paging structure entries that designate pages of any size, bits 59-62, instead of being available/ignored/reserved to the system programmer are a protection key if CR4.PKE is set.
Note that CR3 and paging structure entries contain (partial) *physical* addresses (plus flag bits). And all of those XD/PKE/Available bits are *why* the *physical* address width is *architecturally* limited to 52-bits for all future implementations (whatever the physical address width of current implementations), while virtual addresses may, in future implementations, eventually be as long as a full 64-bits (whatever the virtual address width of current implementations). AMD left themselves room to expand virtual addresses out to 64 bits, but they only left room to expand physical addresses out to 52-bits without introducing breaking changes to the PTE format.
[*]ARM DDI0478 ARM Architecture Reference Manual ARMv8 section D4.1.3 VMSA address types and address spaces: with ARMv8-LVA it is 52 bits, otherwise 48 bits, physical address likewise.
ARM manuals are irrelevant to the specification of the x86-64 architecture.[/list]
To sum it up:
AMD: VA 48, PA 52 (however nobody ever build a CPU with more than 39 bits, maybe some research arch use 40-bits, 1T RAM)
Intel: VA 48, PA 39 (as of the first release of the spec) theoretical max 52
Not quite:
AMD: Current VA 48, Current PA 39-ish, Max VA 64, Max PA 52
Intel: Current VA 48, Current PA 39-ish, Max VA 64, Max PA 52
In both cases, the only *architectural* limit on VA size is the word-width of the architecture, but PA size is architecturally limited to 52 bits by the PTE format. Meanwhile, there are no implementations that have address spaces as big as the 64/52 architectural limit, nor have the architectural extensions needed to reach that point been specified yet (but room has been left in the current specifications to draw up such extensions without breaking backward compatibility).