Mercurial > hg > CbC > CbC_xv6
diff src/interface/vm.h @ 190:14aa35b56347
add page table interface
author | tobaru |
---|---|
date | Wed, 22 Jan 2020 18:40:15 +0900 |
parents | |
children | 429f0c3cc097 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/interface/vm.h Wed Jan 22 18:40:15 2020 +0900 @@ -0,0 +1,33 @@ +typedef struct vm<Type,Impl> { + union Data* vm; + unsigned int low; + unsigned int hi; + struct proc* p; + pde_t* pgdir; + char* init; + unsigned int sz; + char* addr; + struct inode* ip; + unsigned int offset; + unsigned int oldsz; + unsigned int newsz; + char* uva; + pde_t *pgdir; + unsigned int va; + void* p; + unsigned int len; + unsigned int phy_low; + unsigned int phy_hi; + __code init_vmm(Impl* vm, __code next(...)); + __code kpt_freerange(Impl* vm, unsigned int low, unsigned int hi, __code next(...)); + __code kpt_alloc(Impl* vm ,__code next(...)); + __code switchuvm(Impl* vm ,struct proc* p, __code next(...)); + __code init_inituvm(Impl* vm, pde_t* pgdir, char* init, unsigned int sz, __code next(...)); + __code loaduvm(Impl* vm,pde_t* pgdir, char* addr, struct inode* ip, unsigned int offset, unsigned int sz, __code next(...)); + __code allocuvm(Impl* vm, pde_t* pgdir, unsigned int oldsz, unsigned int newsz, __code next(...)); + __code clearpteu(Impl* vm, pde_t* pgdir, char* uva, __code next(...)); + __code copyuvm(Impl* vm, pde_t* pgdir, unsigned int sz, __code next(...)); + __code uva2ka(Impl* vm, pde_t* pgdir, char* uva, __code next(...)); + __code copyout(Impl* vm, pde_t* pgdir, unsigned int va, void* p, unsigned int len, __code next(...)); + __code pagind_int(Impl* vm, unsigned int phy_low, unsigned int phy_hi, __code next(...)); +} vm;