From fcf755d4f03f6fba974d11307659e2e96f9696e7 Mon Sep 17 00:00:00 2001 From: Xander Date: Sat, 19 Aug 2023 15:04:23 +0200 Subject: Implemented entry --- kernel/memory/frame.dats | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'kernel/memory/frame.dats') 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(area.base_addr,area.length - i2sz(1))) -- cgit v1.2.3