From 8974dd1d7dc6b15b522bf4046c664f8524962c49 Mon Sep 17 00:00:00 2001 From: simokawa Date: Thu, 19 Jun 2003 12:14:37 +0000 Subject: Fix direct map page table for 2GB+ physical memory. You may still need to increase NKPT for larger memory. I have successfully booted 8GB system with NKPT=256. --- sys/amd64/amd64/pmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 93bd3ac..30cbbbd 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -404,7 +404,7 @@ create_pagetables(void) /* Now set up the direct map space using 2MB pages */ for (i = 0; i < NPDEPG * ndmpdp; i++) { - ((pd_entry_t *)DMPDphys)[i] = i << PDRSHIFT; + ((pd_entry_t *)DMPDphys)[i] = (vm_paddr_t)i << PDRSHIFT; ((pd_entry_t *)DMPDphys)[i] |= PG_RW | PG_V | PG_PS; } -- cgit v1.1