UNIX xv6 (rev8, 9/1/15)
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Data Structures | Functions | Variables
vm.c File Reference
#include "param.h"
#include "types.h"
#include "defs.h"
#include "x86.h"
#include "memlayout.h"
#include "mmu.h"
#include "proc.h"
#include "elf.h"

Go to the source code of this file.

Data Structures

struct  kmap
 

Functions

void seginit (void)
 
pde_tsetupkvm (void)
 
void kvmalloc (void)
 
void switchkvm (void)
 
void switchuvm (struct proc *p)
 
void inituvm (pde_t *pgdir, char *init, uint sz)
 
int loaduvm (pde_t *pgdir, char *addr, struct inode *ip, uint offset, uint sz)
 
int allocuvm (pde_t *pgdir, uint oldsz, uint newsz)
 
int deallocuvm (pde_t *pgdir, uint oldsz, uint newsz)
 
void freevm (pde_t *pgdir)
 
void clearpteu (pde_t *pgdir, char *uva)
 
pde_tcopyuvm (pde_t *pgdir, uint sz)
 
char * uva2ka (pde_t *pgdir, char *uva)
 
int copyout (pde_t *pgdir, uint va, void *p, uint len)
 

Variables

char data []
 
pde_tkpgdir
 
struct segdesc gdt [NSEGS]
 

Function Documentation

int allocuvm ( pde_t pgdir,
uint  oldsz,
uint  newsz 
)

Definition at line 221 of file vm.c.

void clearpteu ( pde_t pgdir,
char *  uva 
)

Definition at line 297 of file vm.c.

int copyout ( pde_t pgdir,
uint  va,
void *  p,
uint  len 
)

Definition at line 358 of file vm.c.

pde_t* copyuvm ( pde_t pgdir,
uint  sz 
)

Definition at line 310 of file vm.c.

int deallocuvm ( pde_t pgdir,
uint  oldsz,
uint  newsz 
)

Definition at line 250 of file vm.c.

void freevm ( pde_t pgdir)

Definition at line 278 of file vm.c.

void inituvm ( pde_t pgdir,
char *  init,
uint  sz 
)

Definition at line 182 of file vm.c.

void kvmalloc ( void  )

Definition at line 149 of file vm.c.

int loaduvm ( pde_t pgdir,
char *  addr,
struct inode ip,
uint  offset,
uint  sz 
)

Definition at line 197 of file vm.c.

void seginit ( void  )

Definition at line 17 of file vm.c.

pde_t* setupkvm ( void  )

Definition at line 129 of file vm.c.

void switchkvm ( void  )

Definition at line 158 of file vm.c.

void switchuvm ( struct proc p)

Definition at line 165 of file vm.c.

char* uva2ka ( pde_t pgdir,
char *  uva 
)

Definition at line 342 of file vm.c.

Variable Documentation

char data[]
struct segdesc gdt[NSEGS]

Definition at line 12 of file vm.c.

pde_t* kpgdir

Definition at line 11 of file vm.c.