From 23b8815e8ca1bc8fbc745fc3073be21f5a813c9e Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Sun, 12 Nov 2023 20:55:33 +0100 Subject: AHCI: Add very basic AHCI and some additional helper functions to mmu.c Currently certain parts of the code are taken from osdev wiki as there seems to be very little documentation that I can find on how H2D FIS is structured. Those parts, especially some of the uglier parts of the example code will be rewritten/changed. --- kernel/includes/mmu.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'kernel/includes') diff --git a/kernel/includes/mmu.h b/kernel/includes/mmu.h index c9b682f..8990bdf 100644 --- a/kernel/includes/mmu.h +++ b/kernel/includes/mmu.h @@ -56,7 +56,14 @@ void *virtual_to_physical(void *address, PageDirectory *directory); void *is_valid_userpointer(const void *const p, size_t s); void *is_valid_user_c_string(const char *ptr, size_t *size); void *ksbrk(size_t s); +void *ksbrk_physical(size_t s, void **physical); Page *get_page(void *ptr, PageDirectory *directory, int create_new_page, int set_user); + +void create_physical_to_virtual_mapping(void *physical, void *virtual, + u32 length); +// This can only be used on addreses that be been mapped using: +// create_physical_to_virtual_mapping +void *physical_to_virtual(void *address); #endif -- cgit v1.2.3