diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2002-03-21 05:39:23 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2002-03-21 05:39:23 +0000 |
commit | 2906f8d67e2e821922f5d6d6c61b306158d1e797 (patch) | |
tree | 8a1f549a954ad584879cd90006abbc104c1f92a6 /sys | |
parent | 29b61ae69e02e737aab07f9a2d7fb874f781705c (diff) |
Be more consistant about pted zeroing (the whole structure)
Fix missing 'attr' initialization.
Zero available memory.
Raise available memory limit from 256MB to 1GB. This code has only been
tested up to 512MB, but should be fine to 1GB. Ram modules are not avail
to the developers to test out the machines up to their 1.5GB physical limit.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/powerpc/powerpc/pmap.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/arch/powerpc/powerpc/pmap.c b/sys/arch/powerpc/powerpc/pmap.c index 78756580c06..01716994790 100644 --- a/sys/arch/powerpc/powerpc/pmap.c +++ b/sys/arch/powerpc/powerpc/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.62 2002/03/14 18:43:51 drahn Exp $ */ +/* $OpenBSD: pmap.c,v 1.63 2002/03/21 05:39:22 drahn Exp $ */ /* * Copyright (c) 2001, 2002 Dale Rahn. All rights reserved. @@ -499,7 +499,7 @@ if (pm == pmap_kernel() && stop_on_kernel) /* Do not have pted for this, get one and put it in VP */ if (pted == NULL) { pted = pool_get(&pmap_pted_pool, PR_NOWAIT); - pted->pted_pte.pte_hi = NULL; + bzero(pted, sizeof (*pted)); pmap_vp_enter(pm, va, pted); } @@ -640,6 +640,7 @@ _pmap_kenter_pa(vaddr_t va, paddr_t pa, vm_prot_t prot, int flags, int cache) printf("pted not preallocated in pmap_kernel() va %x pa %x \n", va, pa); pted = pool_get(&pmap_pted_pool, PR_NOWAIT); + bzero(pted, sizeof (*pted)); pmap_vp_enter(pm, va, pted); } @@ -1184,8 +1185,8 @@ pmap_avail_setup(void) physmem += btoc(mp->size); } - /* limit to 256MB available, for now -XXXGRR */ -#define MEMMAX 0x10000000 + /* limit to 1GB available, for now -XXXGRR */ +#define MEMMAX 0x40000000 for (mp = pmap_avail; mp->size !=0 ; /* increment in loop */) { if (mp->start + mp->size > MEMMAX) { int rm_start; @@ -1394,6 +1395,10 @@ pmap_bootstrap(u_int kernelstart, u_int kernelend) msgbuf_addr = pmap_steal_avail(MSGBUFSIZE,4); + for (mp = pmap_avail; mp->size; mp++) { + bzero((void *)mp->start, mp->size); + } + #ifdef HTABENTS pmap_ptab_cnt = HTABENTS; #else /* HTABENTS */ @@ -1958,6 +1963,7 @@ pmap_init() for (i = npgs; i > 0; i--) LIST_INIT(pvh++); pmap_attrib = (char *)pvh; /* attrib was allocated at the end of pv */ + attr = pmap_attrib; bzero(pmap_attrib, npgs); pvh = (struct pted_pv_head *)addr; for (bank = 0; bank < vm_nphysseg; bank++) { |