aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimbeer <himbeer@disroot.org>2024-08-02 13:45:17 +0200
committerHimbeer <himbeer@disroot.org>2024-08-02 13:45:17 +0200
commit0ce5e855c058da456c81f541c14cf1c075c6bc95 (patch)
tree328ac4c2553017d188c9c5cdc38308fdce719c06
parent251f6241f2db0c35360961802d002bfe60fd5a09 (diff)
paging: Remove unused unmapEntry method
-rw-r--r--src/paging.zig22
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