kern

diff src/vm.h @ 69:b45e2d5f0ae1

ok I *think* i've fixed it now
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 12 Oct 2011 14:39:40 +0300
parents 0a205396e1a0
children 3941e82b07f2
line diff
     1.1 --- a/src/vm.h	Mon Oct 10 04:16:01 2011 +0300
     1.2 +++ b/src/vm.h	Wed Oct 12 14:39:40 2011 +0300
     1.3 @@ -53,6 +53,8 @@
     1.4  	int nref;
     1.5  };
     1.6  
     1.7 +struct process;
     1.8 +
     1.9  void init_vm(void);
    1.10  
    1.11  int map_page(int vpage, int ppage, unsigned int attr);
    1.12 @@ -61,8 +63,11 @@
    1.13  int unmap_page_range(int vpg_start, int pgcount);
    1.14  int map_mem_range(uint32_t vaddr, size_t sz, uint32_t paddr, unsigned int attr);
    1.15  
    1.16 +uint32_t virt_to_phys(uint32_t vaddr);
    1.17  int virt_to_phys_page(int vpg);
    1.18 -uint32_t virt_to_phys(uint32_t vaddr);
    1.19 +
    1.20 +uint32_t virt_to_phys_proc(struct process *p, uint32_t vaddr);
    1.21 +int virt_to_phys_page_proc(struct process *p, int vpg);
    1.22  
    1.23  enum {
    1.24  	MEM_KERNEL,
    1.25 @@ -73,7 +78,7 @@
    1.26  int pgalloc_vrange(int start, int num);
    1.27  void pgfree(int start, int num);
    1.28  
    1.29 -uint32_t clone_vm(int cow);
    1.30 +void clone_vm(struct process *pdest, struct process *psrc, int cow);
    1.31  
    1.32  int get_page_bit(int pgnum, uint32_t bit, int wholepath);
    1.33  void set_page_bit(int pgnum, uint32_t bit, int wholepath);
    1.34 @@ -82,6 +87,9 @@
    1.35  /* construct the vm map for the current user mappings */
    1.36  int cons_vmmap(struct rbtree *vmmap);
    1.37  
    1.38 +struct vm_page *get_vm_page(int vpg);
    1.39 +struct vm_page *get_vm_page_proc(struct process *p, int vpg);
    1.40 +
    1.41  void dbg_print_vm(int area);
    1.42  
    1.43  /* defined in vm-asm.S */