Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ChocolateLoverRaj opened this issue Nov 16, 2024 · 1 comment

Comments

@ChocolateLoverRaj
Copy link
Contributor

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?

@Freax13
Copy link
Member

Freax13 commented Nov 22, 2024

Sure. We'd have to make sure that the CPU supports it (CPUID leaf 8000_0001, EDX, Page1GB). Feel free to open a PR.

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

No branches or pull requests

2 participants