mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Merge pull request #732 from phil-opp/phil-opp-patch-1
Mention in "Paging Introduction" that a CPU with 5-level paging is available now
This commit is contained in:
@@ -143,7 +143,7 @@ The page table index for level is derived directly from the virtual address:
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
We see that each table index consists of 9 bits, which makes sense because each table has 2^9 = 512 entries. The lowest 12 bits are the offset in the 4KiB page (2^12 bytes = 4KiB). Bits 48 to 64 are discarded, which means that x86_64 is not really 64-bit since it only supports 48-bit addresses. There are plans to extend the address size to 57 bits through a [5-level page table], but no processor that supports this feature exists yet.
|
We see that each table index consists of 9 bits, which makes sense because each table has 2^9 = 512 entries. The lowest 12 bits are the offset in the 4KiB page (2^12 bytes = 4KiB). Bits 48 to 64 are discarded, which means that x86_64 is not really 64-bit since it only supports 48-bit addresses.
|
||||||
|
|
||||||
[5-level page table]: https://en.wikipedia.org/wiki/Intel_5-level_paging
|
[5-level page table]: https://en.wikipedia.org/wiki/Intel_5-level_paging
|
||||||
|
|
||||||
@@ -151,6 +151,10 @@ Even though bits 48 to 64 are discarded, they can't be set to arbitrary values.
|
|||||||
|
|
||||||
[sign extension in two's complement]: https://en.wikipedia.org/wiki/Two's_complement#Sign_extension
|
[sign extension in two's complement]: https://en.wikipedia.org/wiki/Two's_complement#Sign_extension
|
||||||
|
|
||||||
|
It's worth noting that the recent "Ice Lake" Intel CPUs optionally support [5-level page tables] to extends virtual addresses from 48-bit to 57-bit. Given that optimizing our kernel for a specific CPU does not make sense at this stage, we will only work with standard 4-level page tables in this post.
|
||||||
|
|
||||||
|
[5-level page tables]: https://en.wikipedia.org/wiki/Intel_5-level_paging
|
||||||
|
|
||||||
### Example Translation
|
### Example Translation
|
||||||
|
|
||||||
Let's go through an example to understand how the translation process works in detail:
|
Let's go through an example to understand how the translation process works in detail:
|
||||||
|
|||||||
Reference in New Issue
Block a user