Is there an AMD64 compatible processor that doesn't support 2M pages?

After reviewing my bare code that switches to long mode after being loaded by a multi-load bootloader, I realized that some processors do not support 1G pages, so I cannot just use the PML4 + 1 PDP table of tables to map 1: 1 the first 1G page ... Can I be sure that code that uses PML4 + PDP tables + 1 PD record to map the first 1M page 1: 1 will work on EVERY AMD64 processor?

In other words, are 2-M pages supported by all AMD64 processors? Thank.

+3


source to share


2 answers


Yes.

Long mode requires (or rather is an extension) PAE, so it can map 64-bit physical addresses, and PAE always supports PS bit to convert short to create a 2MiB page. (As you noticed, Intel processors do not support this short circuit for 1GiB page generation.)

You might be thinking of the PSE described at https://en.wikipedia.org/wiki/Page_Size_Extension which, as you can see, refers to the Pentium.In the 2000s, embedded processors based on Pentium projects also lack support PSE. None of these processors support x86-64 extensions.



No simple chapter and verse quote, but all of Chapter 4 in Volume 3A of the Intel® 64 and IA-32 Architectures Software Developers Guide covers swap pages and all the various flags in depth. AMD has a similar link, but a superset of Intel can be considered here (e.g. with 1GiB page support).

A hypothetical perverse processor might provide a long mode, but not PSE, but the lack of PSE will only affect the interpretation of PS bits in 32-bit page tables, which simply means that it is not possible to create a 4MiB page in 32-bit mode, but can create a 2MiB page in a long mode.

+2


source


Support for 2MB pages is indicated by CPUID Fn0000_0001_EDX bit 3 (Page Size Extensions). It seems that an AMD64 compatible processor may not support this, because this kind of check exists.

In fact, it is found that 2 MB pages are automatically maintained in long mode. PSE support refers only to 4MB page support in 32-bit mode. From AMD64 Volume 2 Architecture Programming Guide :



Page Size Extensions (PSE) . Page Size Extensions (CR4.PSE) are ignored in long mode. Long mode does not support 4MB page size by page size extension. However, continuous mode supports 4 KB and 2 MB pages.

+1


source







All Articles