blob: b7b436484a3dfc6bb6cab2dd046a46f3753dcc1d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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
|