Skip to content

feat(x86_64): const identity map first 1 GiB in Rust#523

Merged
mkroening merged 7 commits intomainfrom
paging
Feb 17, 2026
Merged

feat(x86_64): const identity map first 1 GiB in Rust#523
mkroening merged 7 commits intomainfrom
paging

Conversation

@mkroening
Copy link
Member

@mkroening mkroening commented Jan 7, 2026

This PR

  1. removes the unused second level-1 page table,
  2. avoids panicking when a page is mapped that is already mapped,
  3. identity-maps the first 2 MiB of memory using 4 KiB pages at assembly time, avoiding runtime page table initialization,
  4. makes the paging code use identity-mapped page tables,
  5. removes the recursive page table entry,
  6. identity-maps the first 1 GiB of memory using 2 MiB pages at assembly time, which is supported by all x86-64 CPUs,
  7. migrates the page table structures and definitions to Rust.

This depends on:

@mkroening mkroening self-assigned this Jan 7, 2026
@mkroening mkroening changed the title fix(x86_64/paging): use identity-mapped page tables feat(x86_64/paging): const identity map 512 giant pages Feb 16, 2026
@mkroening mkroening changed the title feat(x86_64/paging): const identity map 512 giant pages fix(x86_64/entry): const identity map 512 2-MiB pages Feb 17, 2026
@mkroening mkroening force-pushed the paging branch 6 times, most recently from 1884f2a to db24e3e Compare February 17, 2026 12:19
@mkroening mkroening marked this pull request as ready for review February 17, 2026 12:47
@mkroening mkroening changed the title fix(x86_64/entry): const identity map 512 2-MiB pages fix(x86_64): const identity map first 1 GiB in Rust Feb 17, 2026
@mkroening mkroening changed the title fix(x86_64): const identity map first 1 GiB in Rust feat(x86_64): const identity map first 1 GiB in Rust Feb 17, 2026
@mkroening mkroening added this pull request to the merge queue Feb 17, 2026
Merged via the queue into main with commit f0a706c Feb 17, 2026
6 checks passed
@mkroening mkroening deleted the paging branch February 17, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant