diff options
Diffstat (limited to 'kernel/memory/frame.dats')
-rw-r--r-- | kernel/memory/frame.dats | 6 |
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))) |