summaryrefslogtreecommitdiff
path: root/sys/src/9/pc64/mmu.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2014-06-01 03:13:58 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2014-06-01 03:13:58 +0200
commitc9f91d50154015ef31b6e63131847742893ffc91 (patch)
tree8a94dce9adbe9ca224c6112d9080296ef57ba7e6 /sys/src/9/pc64/mmu.c
parent8061f30e559569943324a666ee2fcc74048785cd (diff)
pc64: allocate palloc.pages from upages
the palloc.pages array takes arround 5% of the upages which gives us: 16GB = ~0.8GB 32GB = ~1.6GB 64GB = ~3.2GB we only have 2GB of address space above KZERO so this will not work for long. instead, pageinit() was altered to accept a preallocated memory in palloc.pages. and preallocpages() in pc64/main.c allocates the in upages memory, mapping it in the VMAP area (which has 512GB). the drawback is that we cannot poke at Page structures now from /proc/n/mem as the VMAP area is not accessible from it.
Diffstat (limited to 'sys/src/9/pc64/mmu.c')
-rw-r--r--sys/src/9/pc64/mmu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/src/9/pc64/mmu.c b/sys/src/9/pc64/mmu.c
index c89dbf861..8081eb7d6 100644
--- a/sys/src/9/pc64/mmu.c
+++ b/sys/src/9/pc64/mmu.c
@@ -282,13 +282,13 @@ ptecount(uintptr va, int level)
}
void
-pmap(uintptr *pml4, uintptr pa, uintptr va, int size)
+pmap(uintptr *pml4, uintptr pa, uintptr va, vlong size)
{
uintptr *pte, *ptee, flags;
int z, l;
if((size <= 0) || va < VMAP)
- panic("pmap: pa=%#p va=%#p size=%d", pa, va, size);
+ panic("pmap: pa=%#p va=%#p size=%lld", pa, va, size);
flags = pa;
pa = PPN(pa);
flags -= pa;
@@ -310,7 +310,7 @@ pmap(uintptr *pml4, uintptr pa, uintptr va, int size)
size += z;
continue;
}
- panic("pmap: pa=%#p va=%#p size=%d", pa, va, size);
+ panic("pmap: pa=%#p va=%#p size=%lld", pa, va, size);
}
ptee = pte + ptecount(va, l);
while(size > 0 && pte < ptee){