diff options
author | Xander <xander@biltopia.org> | 2023-08-20 22:57:07 +0200 |
---|---|---|
committer | Xander <xander@biltopia.org> | 2023-08-20 23:03:17 +0200 |
commit | 70cca66089896730797a71ba545c7f4e87b12975 (patch) | |
tree | 167a22d505b32bf80bd8b432833e12a74a98941b /kernel/memory/paging/page.sats | |
parent | 7fce269442cb37810a14d088ea4a61d040ec3066 (diff) | |
download | ats-os-70cca66089896730797a71ba545c7f4e87b12975.tar.xz ats-os-70cca66089896730797a71ba545c7f4e87b12975.zip |
Diffstat (limited to 'kernel/memory/paging/page.sats')
-rw-r--r-- | kernel/memory/paging/page.sats | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/kernel/memory/paging/page.sats b/kernel/memory/paging/page.sats new file mode 100644 index 0000000..1de50c6 --- /dev/null +++ b/kernel/memory/paging/page.sats @@ -0,0 +1,18 @@ +staload FRAME = "kernel/memory/frame.sats" + +staload "lib/SATS/valid.sats" +staload "./entry.sats" + +typedef vaddr = Ptr0 + +typedef page_t = @{ + num = size_t +} + +fn translate(vaddr) : Valid $FRAME.paddr + +fn containing_address(vaddr) : page_t + +fn map_to{n:nat}(page_t,$FRAME.frame_t,&(@[entry_flag][n]),size : size_t n): void + +fn map{n:nat}(page_t,&(@[entry_flag][n]),size : size_t n) : void |