Use huge L3 page table entries to offset map the entire physical memory?

Open
#472 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust

Research direction

Start with BOOTLOADER_CONFIG and the Dynamic physical_memory mapping path, then trace how L4-L1 entries are created. Reproduce the 4G QEMU case and compare L3 and L2 huge-page handling; done means the feasibility and expected mapping behavior are established, with implementation scope clearly defined.

Written by the indexing model from the issue text.

Description

Here is my config:

pub static BOOTLOADER_CONFIG: BootloaderConfig = {
    let mut config = BootloaderConfig::new_default();
    config.mappings.physical_memory = Some(Mapping::Dynamic);
    config
};

When I looped through every page table entry (L4, L3, L2, L1) I noticed that there were only huge pages for L2 entries (so only chunks of 2MiB), and no huge pages for L3 entries. Even with I run qemu with 4G of memory, there are still only many huge L2 entries and no huge L3 entries. Wouldn't it be better if huge L3 entries were used instead of huge L2 entries?

Dominant language
Rust
Stars
1.7k
Forks
241
Avg merge
2d 19h
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rust-osdev/bootloader

All issues in rust-osdev/bootloader

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.