diff options
Diffstat (limited to 'arch/amd64/mem/vmap.h')
| -rw-r--r-- | arch/amd64/mem/vmap.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/arch/amd64/mem/vmap.h b/arch/amd64/mem/vmap.h index c13b887..b7b4364 100644 --- a/arch/amd64/mem/vmap.h +++ b/arch/amd64/mem/vmap.h @@ -1,12 +1,26 @@ #ifndef AMD64_MEM_VMAP_H #define AMD64_MEM_VMAP_H +#include <rt.h> #include <mem/vmap.h> +/* Implementation of MemVmap for AMD64 */ typedef struct amd64_mem_vmap { MemVmap vmap; - - + + /* Used to store the decoded indices + from the translation addresses */ + u32 idx[8]; + + /* Used to store the addresses of the + different pages being hit by a + translation */ + u64 *addrs[8]; } Amd64MemVmap; +void amd64_mem_vmap_init(Amd64MemVmap *self, void *base); +usize amd64_mem_vmap_translate(MemVmap *inner, usize virt); +int amd64_mem_vmap_map(MemVmap *inner, usize phys, usize virt, usize len); +void amd64_mem_vmap_unmap(MemVmap *inner, usize virt, usize len); + #endif
\ No newline at end of file |
