bootloader
bootloader copied to clipboard
Use huge L3 page table entries to offset map the entire physical memory?
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?
Sure. We'd have to make sure that the CPU supports it (CPUID leaf 8000_0001, EDX, Page1GB). Feel free to open a PR.