diff options
author | Xander <xander@biltopia.org> | 2023-07-21 21:36:54 +0200 |
---|---|---|
committer | Xander <xander@biltopia.org> | 2023-07-21 21:36:54 +0200 |
commit | 1d25d9783127c181f79732eb5c20c680444af414 (patch) | |
tree | 5550f40b25af3e2722b5aaf6194f6df37ca9e092 /kernel/bootinfo/multiboot.sats | |
parent | 9226c8bb581c363a552998663704c483f35f6aae (diff) | |
download | ats-os-1d25d9783127c181f79732eb5c20c680444af414.tar.xz ats-os-1d25d9783127c181f79732eb5c20c680444af414.zip |
Mainly refactoring
Diffstat (limited to 'kernel/bootinfo/multiboot.sats')
-rw-r--r-- | kernel/bootinfo/multiboot.sats | 10 |
1 files changed, 7 insertions, 3 deletions
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 -<lin,prf> 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) + |