#ifndef AMD64_MEM_VMAP_H #define AMD64_MEM_VMAP_H #include #include /* 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