From 70cca66089896730797a71ba545c7f4e87b12975 Mon Sep 17 00:00:00 2001 From: Xander Date: Sun, 20 Aug 2023 22:57:07 +0200 Subject: implement page --- kernel/memory/paging/page.sats | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 kernel/memory/paging/page.sats (limited to 'kernel/memory/paging/page.sats') 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 -- cgit v1.2.3