# HG changeset patch # User tobaru # Date 1579689691 -32400 # Node ID 429f0c3cc09754c645839f476f18acc33116bed8 # Parent fe271d48215175ef312c098f5e39b40930791d59 fix diff -r fe271d482151 -r 429f0c3cc097 src/CMakeLists.txt --- a/src/CMakeLists.txt Wed Jan 22 18:47:46 2020 +0900 +++ b/src/CMakeLists.txt Wed Jan 22 19:41:31 2020 +0900 @@ -126,7 +126,7 @@ SOURCES string.c arm.c asm.S bio.c buddy.c console.cbc exec.c file.cbc fs.c log.c main.c memide.c pipe.cbc proc.cbc spinlock.cbc start.c swtch.S syscall.cbc sysfile.cbc sysproc.c trap_asm.S trap.c vm.c device/picirq.c device/timer.c device/uart.c - SingleLinkedStack.cbc entry.S + SingleLinkedStack.cbc entry.S impl/vm_impl.cbc ) # sys_read_impl.cbc diff -r fe271d482151 -r 429f0c3cc097 src/gearsTools/lib/Gears/Context/Template/XV6.pm --- a/src/gearsTools/lib/Gears/Context/Template/XV6.pm Wed Jan 22 18:47:46 2020 +0900 +++ b/src/gearsTools/lib/Gears/Context/Template/XV6.pm Wed Jan 22 19:41:31 2020 +0900 @@ -161,6 +161,8 @@ #ifndef USE_CUDAWorker typedef unsigned long long CUdeviceptr; #endif +typedef uint32 pte_t; +typedef uint32 pde_t; EOFEOF print $out $str; } diff -r fe271d482151 -r 429f0c3cc097 src/impl/vm_impl.cbc --- a/src/impl/vm_impl.cbc Wed Jan 22 18:47:46 2020 +0900 +++ b/src/impl/vm_impl.cbc Wed Jan 22 19:41:31 2020 +0900 @@ -1,4 +1,4 @@ -#include "../context.h" +#include "../../context.h" #interface "vm.h" // ---- @@ -19,9 +19,7 @@ struct vm_impl* vm_impl = new vm_impl(); vm->vm = (union Data*)vm_impl; vm_impl->i = 0; - vm_impl->int = 0; vm_impl->sz = 0; - vm_impl->int = 0; vm->low = 0; vm->hi = 0; vm->p = NULL; @@ -55,12 +53,12 @@ vm->pagind_int = C_pagind_intvm_impl; return vm; } -__code loaduvm_ptesize_checkvm_impl(Impl* vm_impl, __code next(...)) { +__code loaduvm_ptesize_checkvm_impl(struct vm_impl* vm, __code next(...)) { goto next(...); } -__code loaduvm_loopvm_impl(Impl* vm_impl, unsigned int i, pte_t *pte, unsigned int sz, __code next(...)) { +__code loaduvm_loopvm_impl(struct vm_impl* vm, unsigned int i, pte_t *pte, unsigned int sz, __code next(...)) { goto next(...); } @@ -80,12 +78,12 @@ goto next(...); } -__code switchuvmvm_impl(struct vm_impl* vm ,struct proc* p, __code next(...)) { +__code switchuvmvm_impl(struct vm_impl* vm ,struct proc* p, __code next(...)) {//:skip goto next(...); } -__code init_inituvmvm_impl(struct vm_impl* vm, pde_t* pgdir, char* init, unsigned int sz, __code next(...)) { +__code init_inituvmvm_impl(struct vm_impl* vm, pde_t* pgdir, char* init, unsigned int sz, __code next(...)) {//:skip goto next(...); } diff -r fe271d482151 -r 429f0c3cc097 src/impl/vm_impl.h --- a/src/impl/vm_impl.h Wed Jan 22 18:47:46 2020 +0900 +++ b/src/impl/vm_impl.h Wed Jan 22 19:41:31 2020 +0900 @@ -3,8 +3,8 @@ pte_t *pte; unsigned int sz; - __code loaduvm_ptesize_check(Impl* vm_impl, __code next(...)); - __code loaduvm_loop(Impl* vm_impl, unsigned int i, pte_t *pte, unsigned int sz, __code next(...)); + __code loaduvm_ptesize_check(Type* vm_impl, __code next(...)); + __code loaduvm_loop(Type* vm_impl, unsigned int i, pte_t *pte, unsigned int sz, __code next(...)); } vm_impl; diff -r fe271d482151 -r 429f0c3cc097 src/interface/vm.h --- a/src/interface/vm.h Wed Jan 22 18:47:46 2020 +0900 +++ b/src/interface/vm.h Wed Jan 22 19:41:31 2020 +0900 @@ -12,9 +12,8 @@ unsigned int oldsz; unsigned int newsz; char* uva; - pde_t *pgdir; unsigned int va; - void* p; + void* pp; unsigned int len; unsigned int phy_low; unsigned int phy_hi; @@ -28,6 +27,7 @@ __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 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;