Repository navigation
refactor(bootloader): replace RecursivePageTable with identity OffsetPageTable - #15
Merged
Merged
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces
RecursivePageTableinxv7-bootloader-uefiwith an offlineBootPageTablebacked byOffsetPageTable::new(p4, VirtAddr::zero())over UEFI's identity mapping (154 insertions(+), 220 deletions(-)):RecursivePageTable&PML4[511]: Builds 4 KiB and 2 MiB higher-half mappings viaOffsetPageTable(offset = 0) without pollutingPML4[511]or forming an unsound&mut PageTableat0xFFFF_FFFF_FFFF_F000. Also removes the leftovertable[511]recursive entry inAddressSpace::new()and updates the virtual memory map docs inxv7-boot.CR3Only Afterexit_boot_services(): Relocates the PIE kernel viaOffsetPageTable::translate_addrbefore switching page tables, uses.ignore()while constructing the offline table (zeroinvlpgflushes), and loadsCR3once afterexit_boot_services()returns.RESERVED1 TiB Hole: Zeroes newly allocated page-table, kernel-stack, and ELF segment pages (alloc_zeroed_pages), and filters outMemoryType::RESERVEDholes (such as QEMU AMD's[0xfd00000000..=0xffffffffff]1 TiB aperture) while covering all usable/firmware RAM, GOP framebuffer, and< 4 GiBMMIO.Verification
make build(dev&release) +cargo checkwithframe-allocator-buddydebug&release) and verified Ring 3/initinteractive shell execution