comparison src/interface/vm.h @ 190:14aa35b56347

add page table interface
author tobaru
date Wed, 22 Jan 2020 18:40:15 +0900
parents
children 429f0c3cc097
comparison
equal deleted inserted replaced
189:000e247dc51d 190:14aa35b56347
1 typedef struct vm<Type,Impl> {
2 union Data* vm;
3 unsigned int low;
4 unsigned int hi;
5 struct proc* p;
6 pde_t* pgdir;
7 char* init;
8 unsigned int sz;
9 char* addr;
10 struct inode* ip;
11 unsigned int offset;
12 unsigned int oldsz;
13 unsigned int newsz;
14 char* uva;
15 pde_t *pgdir;
16 unsigned int va;
17 void* p;
18 unsigned int len;
19 unsigned int phy_low;
20 unsigned int phy_hi;
21 __code init_vmm(Impl* vm, __code next(...));
22 __code kpt_freerange(Impl* vm, unsigned int low, unsigned int hi, __code next(...));
23 __code kpt_alloc(Impl* vm ,__code next(...));
24 __code switchuvm(Impl* vm ,struct proc* p, __code next(...));
25 __code init_inituvm(Impl* vm, pde_t* pgdir, char* init, unsigned int sz, __code next(...));
26 __code loaduvm(Impl* vm,pde_t* pgdir, char* addr, struct inode* ip, unsigned int offset, unsigned int sz, __code next(...));
27 __code allocuvm(Impl* vm, pde_t* pgdir, unsigned int oldsz, unsigned int newsz, __code next(...));
28 __code clearpteu(Impl* vm, pde_t* pgdir, char* uva, __code next(...));
29 __code copyuvm(Impl* vm, pde_t* pgdir, unsigned int sz, __code next(...));
30 __code uva2ka(Impl* vm, pde_t* pgdir, char* uva, __code next(...));
31 __code copyout(Impl* vm, pde_t* pgdir, unsigned int va, void* p, unsigned int len, __code next(...));
32 __code pagind_int(Impl* vm, unsigned int phy_low, unsigned int phy_hi, __code next(...));
33 } vm;