Sv32 Megapages

Tonight’s @risc_v Tip:

Sv32 supports a 2-level page table, but any Page Table Entry (PTE) may be a leaf. Page tables are the size of a page, so a leaf level 1 PTE corresponds to a “megapage” (4 MiB).

1 Page = 4 KiB

1 PTE -> 1 Page

1 Page Table -> 1024 PTE

4 KiB * 1024 = 4 MiB

Errata: Small correction to diagram: VPN[0] is used to populate PPN[0], while PPN[1] is populated with PPN in the Level 1 leaf PTE.

21-11-29

Original Tweet