Mercurial > hg > Members > menikon > CbC_xv6
changeset 223:90b65036d9a2
paging_init
author | tobaru |
---|---|
date | Fri, 24 Jan 2020 18:33:52 +0900 |
parents | 7a4d299a35be |
children | 37900976db8e |
files | src/impl/vm_impl.cbc src/impl/vm_impl.h src/impl/vm_impl_private.cbc |
diffstat | 3 files changed, 19 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/impl/vm_impl.cbc Fri Jan 24 18:10:26 2020 +0900 +++ b/src/impl/vm_impl.cbc Fri Jan 24 18:33:52 2020 +0900 @@ -32,6 +32,7 @@ vm_impl->copyuvm_loop = C_copyuvm_loopvm_impl; vm_impl->uva2ka_check_pe_types = C_uva2ka_check_pe_types; vm_impl->paging_intvm_impl = C_paging_intvmvm_impl; + vm_impl->copyout_loopvm_impl = C_copyout_loopvm_impl; vm->init_vmm = C_init_vmmvm_impl; vm->kpt_freerange = C_kpt_freerangevm_impl; vm->kpt_alloc = C_kpt_allocvm_impl; @@ -131,8 +132,10 @@ } __code copyoutvm_impl(struct vm_impl* vm, pde_t* pgdir, uint va, void* pp, uint len, __code next(...)) { - - goto next(...); + + vm->buf = (char*) pp; + + goto copyout_loopvm_impl(vm, pgdir, va, pp, len, next(...)); } __code paging_intvm_impl(struct vm_impl* vm, uint phy_low, uint phy_hi, __code next(...)) {
--- a/src/impl/vm_impl.h Fri Jan 24 18:10:26 2020 +0900 +++ b/src/impl/vm_impl.h Fri Jan 24 18:33:52 2020 +0900 @@ -19,6 +19,12 @@ uint ap; uint phy_low; uint phy_hi; + uint va; + void* pp; + uint len; + char* buf; + char* pa0; + uint va0; __code kpt_alloc_check_impl(Type* vm_impl, __code next(...)); __code loaduvm_ptesize_check(Type* vm_impl, __code next(int ret, ...)); @@ -30,8 +36,8 @@ __code clearpteu_check_ptevm_impl(Type* vm_impl, pde_t* pgdir, char* uva, __code next(...)); __code uva2ka_check_pe_types(Type* vm_impl, pde_t* pgdir, char* uva, __code next(...)); __code paging_intvm_impl(Type* vm_impl, uint phy_low, uint phy_hi, __code next(...)); + __code copyout_loopvm_impl(Type* vm_impl, pde_t* pgdir, uint va, void* pp, uint len, __code next(...)); __code next(...); - } vm_impl;
--- a/src/impl/vm_impl_private.cbc Fri Jan 24 18:10:26 2020 +0900 +++ b/src/impl/vm_impl_private.cbc Fri Jan 24 18:33:52 2020 +0900 @@ -327,6 +327,12 @@ mappages (P2V(&_kernel_pgtbl), P2V(phy_low), phy_hi - phy_low, phy_low, AP_KU); flush_tlb (); - goto next(...)); + goto next(...); } +__code copyout_loopvm_impl(struct vm_impl* vm_impl, pde_t* pgdir, uint va, void* pp, uint len, __code next(...)) { + + goto next(...); +} + +