aboutsummaryrefslogtreecommitdiff
path: root/kernel/main.dats
diff options
context:
space:
mode:
authorXander <xander@biltopia.org>2023-07-27 00:46:53 +0200
committerXander <xander@biltopia.org>2023-07-27 00:46:53 +0200
commit54435375f29152ddbce1cd362a137280450eba94 (patch)
treebed15b05a43d77d87977d35e337252577b46c92c /kernel/main.dats
parent6cacc45cdf11ca0e605bb7c6356c569c8aed760b (diff)
downloadats-os-54435375f29152ddbce1cd362a137280450eba94.tar.xz
ats-os-54435375f29152ddbce1cd362a137280450eba94.zip
migrated frame_allocator to opt. side effects constrains not implemented yet
Diffstat (limited to 'kernel/main.dats')
-rw-r--r--kernel/main.dats26
1 files changed, 13 insertions, 13 deletions
diff --git a/kernel/main.dats b/kernel/main.dats
index 48bff24..dadcd2d 100644
--- a/kernel/main.dats
+++ b/kernel/main.dats
@@ -25,11 +25,11 @@ in
i2sz(0)
end
-fn test(allocptr : !allocptr, bootptr : !bootptr) : void = let
- fun loop(i : int) : void = if (i < 160) then( let val _ = allocate_frame(allocptr.0, bootptr.0 | allocptr.2, bootptr.2) in end; loop(succ(i)))
-in
- loop(0)
-end
+(* fn test(allocptr : !allocptr, bootptr : !bootptr) : void = let *)
+(* fun loop(i : int) : void = if (i < 160) then( let val _ = allocate_frame(allocptr.0, bootptr.0 | allocptr.2, bootptr.2) in end; loop(succ(i))) *)
+(* in *)
+(* loop(0) *)
+(* end *)
extern fun breakpoint() :void = "mac#"
@@ -43,19 +43,19 @@ implement entry(p) = let
val bootptr = boot_info_init(p)
val (kernel_start,kernel_end) = get_kernel_ranges(bootptr)
val (multiboot_start,multiboot_end) = get_multiboot_ranges(bootptr)
- val allocptr = frame_allocator_init(kernel_start,kernel_end,multiboot_start,multiboot_end,bootptr)
+ (* val allocptr = frame_allocator_init(kernel_start,kernel_end,multiboot_start,multiboot_end,bootptr) *)
in
print_memory_mappings(bootptr);
print_elf_headers(bootptr);
println!("Kernel Size: ", kernel_size(kernel_start,kernel_end));
- test(allocptr,bootptr);
- let
- val frame = allocate_frame(allocptr.0, bootptr.0 | allocptr.2, bootptr.2)
- in
- println!(frame.num)
- end;
+ (* test(allocptr,bootptr); *)
+ (* let *)
+ (* val frame = allocate_frame(allocptr.0, bootptr.0 | allocptr.2, bootptr.2) *)
+ (* in *)
+ (* println!(frame.num) *)
+ (* end; *)
// Initialize interrupt table
idt_init();
@@ -68,7 +68,7 @@ in
let
prval () = bootptr.1(bootptr.0)
- prval () = allocptr.1(allocptr.0)
+ (* prval () = allocptr.1(allocptr.0) *)
in end