aboutsummaryrefslogtreecommitdiff
path: root/kernel/memory/frame.dats
diff options
context:
space:
mode:
authorXander <xander@biltopia.org>2023-08-19 15:04:23 +0200
committerXander <xander@biltopia.org>2023-08-19 15:19:25 +0200
commitfcf755d4f03f6fba974d11307659e2e96f9696e7 (patch)
treea58d9b7b24d6ab4b80f854d6d3905246b37494bd /kernel/memory/frame.dats
parentd177285a761de33b86fcbde72fd718137bfa6f86 (diff)
downloadats-os-fcf755d4f03f6fba974d11307659e2e96f9696e7.tar.xz
ats-os-fcf755d4f03f6fba974d11307659e2e96f9696e7.zip
Implemented entry
Diffstat (limited to 'kernel/memory/frame.dats')
-rw-r--r--kernel/memory/frame.dats6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/memory/frame.dats b/kernel/memory/frame.dats
index aa02134..867096a 100644
--- a/kernel/memory/frame.dats
+++ b/kernel/memory/frame.dats
@@ -12,8 +12,10 @@ staload UN = "prelude/SATS/unsafe.sats"
implement containing_address(address) =
@{
- counter = $UN.cast{size_t}(address) / i2sz(PAGE_SIZE)
- }
+ num = $UN.cast{size_t}(address) / i2sz(PAGE_SIZE)
+ }
+
+implement start_address(frame) = sz_to_Ptr0(frame.num * PAGE_SIZE)
fn containing_area(area : $BOOT.memory_area_t) :<> frame_t = containing_address(ptr_add<uint8>(area.base_addr,area.length - i2sz(1)))