summaryrefslogtreecommitdiffstats
path: root/sys/ia64
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2002-11-29 20:10:21 +0000
committermarcel <marcel@FreeBSD.org>2002-11-29 20:10:21 +0000
commite31313a4a8d97e624971a82e1c09f4795dc76f0a (patch)
tree36f41a7db0e8abca14c1274842e1380094d21c2b /sys/ia64
parent78d15991e4a00cb5c49c4ad95d7307b943ed8234 (diff)
downloadFreeBSD-src-e31313a4a8d97e624971a82e1c09f4795dc76f0a.zip
FreeBSD-src-e31313a4a8d97e624971a82e1c09f4795dc76f0a.tar.gz
Better handle sparse physical memory: Don't use the address range
as a measure for available memory to scale the VHPT. Instead, use the previously determined Maxmem. Approved by: re (carte blanc)
Diffstat (limited to 'sys/ia64')
-rw-r--r--sys/ia64/ia64/pmap.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/ia64/ia64/pmap.c b/sys/ia64/ia64/pmap.c
index 3dea505..4165d73 100644
--- a/sys/ia64/ia64/pmap.c
+++ b/sys/ia64/ia64/pmap.c
@@ -360,9 +360,12 @@ pmap_bootstrap()
* physical memory and try to locate a region which is large
* enough to contain the VHPT (which must be a power of two in
* size and aligned to a natural boundary).
+ * Don't use the difference between avail_start and avail_end
+ * as a measure for memory size. The address space is often
+ * enough sparse, causing us to (try to) create a huge VHPT.
*/
vhpt_size = 15;
- while ((1<<vhpt_size) < ia64_btop(avail_end - avail_start) * 32)
+ while ((1<<vhpt_size) < ia64_btop(Maxmem) * 32)
vhpt_size++;
vhpt_base = 0;
@@ -451,13 +454,6 @@ pmap_bootstrap()
*/
ia64_set_rr(IA64_RR_BASE(6), (6 << 8) | (28 << 2));
ia64_set_rr(IA64_RR_BASE(7), (7 << 8) | (28 << 2));
-
- /*
- * Set up proc0's PCB.
- */
-#if 0
- thread0.td_pcb->pcb_hw.apcb_asn = 0;
-#endif
/*
* Reserve some memory for allocating pvs while bootstrapping
OpenPOWER on IntegriCloud