kernel: comment

This commit is contained in:
janis 2026-08-12 13:45:39 +02:00
parent 2fe6a236ce
commit 3e0698d24e
Signed by: janis
SSH key fingerprint: SHA256:bB1qbbqmDXZNT0KKD5c2Dfjg53JGhj7B3CFcLIzSqq8

View file

@ -99,6 +99,10 @@ impl RootPageTable {
let end = align_up(phy.end.0, PAGE_SIZE as u64);
let size = end - start;
// split the mapping into regions of 1GB, 2MB, and 4KB pages, depending on the alignment of the virtual address and the size of the mapping.
// insert the regions with `flags` into the page table, creating new tables with permissions R/W/X as necessary.
// if any leaf-entries are encountered, undo the mapping and return an error.
match size {
Self::ONE_GB.. if is_aligned(virt.0, Self::ONE_GB) => {}
Self::TWO_MB.. if is_aligned(virt.0, Self::TWO_MB) => {}