From 1d25d9783127c181f79732eb5c20c680444af414 Mon Sep 17 00:00:00 2001 From: Xander Date: Fri, 21 Jul 2023 21:36:54 +0200 Subject: Mainly refactoring --- kernel/bootinfo/multiboot.sats | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'kernel/bootinfo/multiboot.sats') diff --git a/kernel/bootinfo/multiboot.sats b/kernel/bootinfo/multiboot.sats index 3909fdd..963e2e6 100644 --- a/kernel/bootinfo/multiboot.sats +++ b/kernel/bootinfo/multiboot.sats @@ -5,7 +5,7 @@ typedef tag_t = @{ } typedef memory_area_t = @{ - base_addr = Ptr1, // Start of physical address + base_addr = Ptr, // Start of physical address length = [n : nat | n > 0 ] size_t n , // Size of memory region in bytes (64 bits) type = uint, // Variety of address range represented. 1: available RAM, 3: usable memory holding ACPI information, // 4: reserved memory (preserved on hibernation), Other: reserved area @@ -50,10 +50,14 @@ vtypedef bootptr = [l : agz] (boot_info_t@l , boot_info_t@l - void | p fun boot_info_init(p : Ptr1) : bootptr -fn get_memory_mappings_n (p : !bootptr) : [n:nat] size_t n -fn get_memory_mapping (p : !bootptr, n : size_t) : memory_area_t +fn get_memory_mappings_n {l : agz} (pf : !boot_info_t@l | p : ptr l) : [n:nat] size_t n +fn get_memory_mapping {l:agz} (pf : !boot_info_t @ l | p : ptr l, n : size_t) : memory_area_t fn print_memory_mappings (p : !bootptr) : void fn get_elf_headers_n (p : !bootptr) : [n:nat] size_t n fn get_elf_header (p : !bootptr, n : size_t) : elf64_shdr_t fn print_elf_headers (p : !bootptr) : void + +fn get_kernel_ranges (p : !bootptr) : (Ptr,Ptr) // (kernel start, kernel end) +fn get_bootinfo_ranges (p : !bootptr) : (ptr,ptr) // (bootinfo start, bootinfo end) + -- cgit v1.2.3