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

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