summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorFrans Kaashoek <[email protected]>2016-08-25 09:13:00 -0400
committerFrans Kaashoek <[email protected]>2016-08-25 09:13:00 -0400
commit7894fcd21732dd2ddfbb9beca52d037a62ed11f4 (patch)
treeeabcfc4f08613dcf7c35e58d9425f02c4c65224f /vm.c
parent6de6a3c952dc8786619bd052e26e6bc1c97be2e6 (diff)
downloadxv6-labs-7894fcd21732dd2ddfbb9beca52d037a62ed11f4.tar.gz
xv6-labs-7894fcd21732dd2ddfbb9beca52d037a62ed11f4.tar.bz2
xv6-labs-7894fcd21732dd2ddfbb9beca52d037a62ed11f4.zip
Remove trailing white space with:
for f in *.{h,c}; do sed -i .sed 's/[[:blank:]]*$//' $f; done (Thanks to Nicolás Wolovick)
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/vm.c b/vm.c
index 6c42ae5..16fb03b 100644
--- a/vm.c
+++ b/vm.c
@@ -32,7 +32,7 @@ seginit(void)
lgdt(c->gdt, sizeof(c->gdt));
loadgs(SEG_KCPU << 3);
-
+
// Initialize cpu-local storage.
cpu = c;
proc = 0;
@@ -56,7 +56,7 @@ walkpgdir(pde_t *pgdir, const void *va, int alloc)
// Make sure all those PTE_P bits are zero.
memset(pgtab, 0, PGSIZE);
// The permissions here are overly generous, but they can
- // be further restricted by the permissions in the page table
+ // be further restricted by the permissions in the page table
// entries, if necessary.
*pde = V2P(pgtab) | PTE_P | PTE_W | PTE_U;
}
@@ -71,7 +71,7 @@ mappages(pde_t *pgdir, void *va, uint size, uint pa, int perm)
{
char *a, *last;
pte_t *pte;
-
+
a = (char*)PGROUNDDOWN((uint)va);
last = (char*)PGROUNDDOWN(((uint)va) + size - 1);
for(;;){
@@ -93,7 +93,7 @@ mappages(pde_t *pgdir, void *va, uint size, uint pa, int perm)
// current process's page table during system calls and interrupts;
// page protection bits prevent user code from using the kernel's
// mappings.
-//
+//
// setupkvm() and exec() set up every page table like this:
//
// 0..KERNBASE: user memory (text+data+stack+heap), mapped to
@@ -101,7 +101,7 @@ mappages(pde_t *pgdir, void *va, uint size, uint pa, int perm)
// KERNBASE..KERNBASE+EXTMEM: mapped to 0..EXTMEM (for I/O space)
// KERNBASE+EXTMEM..data: mapped to EXTMEM..V2P(data)
// for the kernel's instructions and r/o data
-// data..KERNBASE+PHYSTOP: mapped to V2P(data)..PHYSTOP,
+// data..KERNBASE+PHYSTOP: mapped to V2P(data)..PHYSTOP,
// rw data + free physical memory
// 0xfe000000..0: mapped direct (devices such as ioapic)
//
@@ -136,7 +136,7 @@ setupkvm(void)
if (P2V(PHYSTOP) > (void*)DEVSPACE)
panic("PHYSTOP too high");
for(k = kmap; k < &kmap[NELEM(kmap)]; k++)
- if(mappages(pgdir, k->virt, k->phys_end - k->phys_start,
+ if(mappages(pgdir, k->virt, k->phys_end - k->phys_start,
(uint)k->phys_start, k->perm) < 0)
return 0;
return pgdir;
@@ -181,7 +181,7 @@ void
inituvm(pde_t *pgdir, char *init, uint sz)
{
char *mem;
-
+
if(sz >= PGSIZE)
panic("inituvm: more than a page");
mem = kalloc();