diff options
-rw-r--r-- | src/paging.zig | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/paging.zig b/src/paging.zig index dfe44cc..1a174aa 100644 --- a/src/paging.zig +++ b/src/paging.zig @@ -354,28 +354,6 @@ pub const Table = struct { } } - pub fn unmapEntry(root: *Table, vaddr: usize) void { - const vpn = virtualPageNumbers(vaddr); - - var v = &root.entries[vpn[2]]; - - for (0..3) |iInv| { - const i = 2 - iInv; - - if (!v.isValid()) { - break; - } else if (v.isLeaf()) { - v.flags.valid = 0; - // IMPORTANT: Flush TLB correctly - // if sfence.vma in process.switchTo is ever optimized. - return; - } - - const entry: *[512]Entry = @ptrFromInt(v.mappingAddr()); - v = &entry[vpn[i - 1]]; - } - } - // Returns the physical address to a virtual address using the provided level 2 page table. // This can be used to access virtual addresses whose page table isn't active // in the MMU / SATP CSR (Control and Status Register), making it possible |