From e2f3bfc0973c151951531b1715c53d14e8656d92 Mon Sep 17 00:00:00 2001 From: Xander Date: Sat, 15 Jul 2023 18:04:00 +0200 Subject: Print memory mappings --- kernel/main.dats | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'kernel/main.dats') diff --git a/kernel/main.dats b/kernel/main.dats index 7e6bfe7..67afb7c 100644 --- a/kernel/main.dats +++ b/kernel/main.dats @@ -3,14 +3,11 @@ #define ATS_DYNLOADFLAG 0 staload "kernel/interrupts/idt.sats" -staload "kernel/multiboot.sats" +staload "kernel/bootinfo/multiboot.sats" staload "lib/SATS/writer.sats" staload UN = "prelude/SATS/unsafe.sats" -extern praxi c (p : ptr) : [l : agz] strptr l -extern prfun eat(p : strptr) : void - %{^ void breakpoint(){ __asm__("int3"); @@ -23,16 +20,13 @@ extern fun breakpoint() :void = "mac#" extern fun main(p : Ptr1) : void = "ext#" implement main(p) = let -in - - clear_screen(); - println!("Start"); + val () = clear_screen() // Initialize boot info struct - let - val bootptr = boot_info_init(p) - prval () = bootptr.1(bootptr.0) - in end; + val bootptr = boot_info_init(p) +in + + print_memory_mappings(bootptr); // Initialize interrupt table idt_init(); @@ -40,6 +34,12 @@ in // Throws breakpoint exception breakpoint(); + println!("End"); + let + prval () = bootptr.1(bootptr.0) + in end + + end -- cgit v1.2.3