diff options
author | Anton Kling <anton@kling.gg> | 2023-11-12 20:55:33 +0100 |
---|---|---|
committer | Anton Kling <anton@kling.gg> | 2023-11-12 20:58:08 +0100 |
commit | 23b8815e8ca1bc8fbc745fc3073be21f5a813c9e (patch) | |
tree | 0499342477c7df1452907851ce29ec1ff6135f6c /kernel/includes | |
parent | 4e34a5f97786b3bab82f08297ead63e1618744ec (diff) |
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.
Diffstat (limited to 'kernel/includes')
-rw-r--r-- | kernel/includes/mmu.h | 7 |
1 files changed, 7 insertions, 0 deletions
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 |