From 54435375f29152ddbce1cd362a137280450eba94 Mon Sep 17 00:00:00 2001 From: Xander Date: Thu, 27 Jul 2023 00:46:53 +0200 Subject: migrated frame_allocator to opt. side effects constrains not implemented yet --- kernel/main.dats | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'kernel/main.dats') 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 -- cgit v1.2.3