view src/interface/vm.h @ 192:429f0c3cc097

fix
author tobaru
date Wed, 22 Jan 2020 19:41:31 +0900
parents 14aa35b56347
children 1301727600cc
line wrap: on
line source

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;
    unsigned int va;
    void* pp;
    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* pp, unsigned int len, __code next(...));
    __code pagind_int(Impl* vm, unsigned int phy_low, unsigned int phy_hi, __code next(...));
    __code next(...);
} vm;