From 6da70f16c584ee897a4ac4f51d016a615c84042b Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Fri, 18 Sep 2026 15:46:18 -0400 Subject: cleanup for real hw attempt --- hal/memory.h | 10 ++++++++-- hal/uacpi.c | 46 ---------------------------------------------- hal/uacpi.h | 6 ------ 3 files changed, 8 insertions(+), 54 deletions(-) delete mode 100644 hal/uacpi.c delete mode 100644 hal/uacpi.h (limited to 'hal') diff --git a/hal/memory.h b/hal/memory.h index f1cf9db..7577c17 100644 --- a/hal/memory.h +++ b/hal/memory.h @@ -22,11 +22,17 @@ int untyped_split(jove_owned_obj_t *tgt, jove_owned_obj_t *dst, size_t bytes); int untyped_merge(jove_owned_obj_t *a, jove_owned_obj_t *b); int untyped_retype(jove_owned_obj_t *tgt, uint8_t newtype); -int pagedir_map_frame( +int pagedir_map_untyped_frame( jove_owned_obj_t *tgt, jove_owned_obj_t *untyped_obj, uintptr_t vptr, struct syscall_pagedir_flags flg); -int pagedir_map_table( +int pagedir_map_untyped_table( jove_owned_obj_t *tgt, jove_owned_obj_t *untyped_obj, uintptr_t vptr, struct syscall_pagedir_flags flg); +int pagedir_unmap_untyped_frame( + jove_owned_obj_t *tgt, jove_owned_obj_t *dst, uintptr_t vptr); +int pagedir_unmap_untyped_table( + jove_owned_obj_t *tgt, jove_owned_obj_t *dst, uintptr_t vptr); + + #endif diff --git a/hal/uacpi.c b/hal/uacpi.c deleted file mode 100644 index 5aea792..0000000 --- a/hal/uacpi.c +++ /dev/null @@ -1,46 +0,0 @@ -#include "arch/x86_64/hal/obj.h" -#include "init.h" -#include "uacpi/uacpi.h" -#include "lib/printf.h" -#include "uacpi/tables.h" -#include - -jove_objdir_t s_acpi_objdir = { 0 }; - -void uacpi_kernel_log(uacpi_log_level lvl, const uacpi_char* fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - - kvprintf(fmt, ap); - - va_end(ap); -} - -void -uacpi_kernel_init(void) -{ - uint8_t uacpi_buffer[1024]; - uacpi_setup_early_table_access(uacpi_buffer, 1024); - - jove_owned_obj_t *acpi_objdir_obj = objdir_getlocal(_rootdir_obj, ROOTDIR_ACPI_I); - obj_settype(acpi_objdir_obj, JOVE_OBJ_OBJDIR); - obj_setvalue(acpi_objdir_obj, (uintptr_t)&s_acpi_objdir); - - size_t num_tables = uacpi_table_count(); - for(size_t i = 0; i < num_tables; i++) { - uacpi_table table; - uacpi_status get_res = uacpi_table_get_by_index(i, &table); - - if(get_res != UACPI_STATUS_OK) { - kprintf("uacpi: Failed to get table %i with code %s\n", i, uacpi_status_to_string(get_res)); - continue; - } - - jove_owned_obj_t *table_obj = objdir_getlocal(acpi_objdir_obj, i); - obj_settype(table_obj, JOVE_OBJ_ACPI_TABLE); - obj_setvalue(table_obj, table.virt_addr); - obj_release(table_obj); - } - obj_release(acpi_objdir_obj); -} diff --git a/hal/uacpi.h b/hal/uacpi.h deleted file mode 100644 index a3790c0..0000000 --- a/hal/uacpi.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _JOVE_UACPI_H -#define _JOVE_UACPI_H 1 - -void uacpi_kernel_init(void); - -#endif -- cgit v1.2.3