From 76ea83e70c5c852de9efdf857f6ee95be7d6e6c8 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Tue, 8 Apr 2025 11:49:51 -0400 Subject: acpi --- kernel/include/comus/drivers/acpi.h | 21 +++++++++++++++++++++ kernel/include/comus/mboot.h | 15 ++++++++++++++- kernel/include/comus/memory.h | 2 +- 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 kernel/include/comus/drivers/acpi.h (limited to 'kernel/include') diff --git a/kernel/include/comus/drivers/acpi.h b/kernel/include/comus/drivers/acpi.h new file mode 100644 index 0000000..b28633c --- /dev/null +++ b/kernel/include/comus/drivers/acpi.h @@ -0,0 +1,21 @@ +/** + * @file acpi.h + * + * @author Freya Murphy + * + * ACPI definitions + */ + +/** + * Loads the ACPI tables + * https://en.wikipedia.org/wiki/ACPI + * @param rsdp - pointer to the Root System Description Pointer + * usually passed from the bootloader + */ +void acpi_init(void *rsdp); + +/** + * Shutdowns down the system + */ +__attribute__((noreturn)) +void acpi_shutdown(void); diff --git a/kernel/include/comus/mboot.h b/kernel/include/comus/mboot.h index f89427e..ebd5dad 100644 --- a/kernel/include/comus/mboot.h +++ b/kernel/include/comus/mboot.h @@ -11,6 +11,19 @@ #include -void mboot_load_mmap(volatile void *mboot, struct memory_map *map); +/** + * Load the multiboot information passed from the bootloader + */ +void mboot_init(long magic, volatile void *mboot); + +/** + * Get the memory map from multiboot + */ +int mboot_get_mmap(struct memory_map *map); + +/** + * Get the ACPI rsdp addr from multiboot + */ +void *mboot_get_rsdp(void); #endif /* mboot.h */ diff --git a/kernel/include/comus/memory.h b/kernel/include/comus/memory.h index 294c795..77d64ff 100644 --- a/kernel/include/comus/memory.h +++ b/kernel/include/comus/memory.h @@ -28,7 +28,7 @@ struct memory_map { /** * Initalize system memory allocator */ -void memory_init(struct memory_map *map); +void memory_init(void); /** * @returns how much memory the system has -- cgit v1.2.3-freya