Subject: Re: More PowerMac changes
To: None <mycroft@mit.edu>
From: Kazuki Sakamoto <sakamoto@cec.co.jp>
List: port-powerpc
Date: 02/25/1998 11:54:57
<199802240847.DAA06353@zygorthian-space-raiders.mit.edu>
mycroft@mit.edu wrote:

 > I forgot to copy part of the DDB goop, and I got tired of the page size
 > warning.

Incidentally let's change it to MACHINE_NEW_NONCONTIG.

I don't have a good idea about good value to define
VM_PHYSSEG_MAX(is related to OFMEM_REGIONS) and VM_PHYSSEG_STRAT.

Any ideas?

Kazuki Sakamoto
sakamoto@cec.co.jp

Index: include/vmparam.h
===================================================================
RCS file: /cvsroot/src/sys/arch/powerpc/include/vmparam.h,v
retrieving revision 1.4
diff -c -r1.4 vmparam.h
*** vmparam.h	1998/02/18 11:10:08	1.4
--- vmparam.h	1998/02/25 02:42:36
***************
*** 89,95 ****
--- 89,111 ----
  #define	VM_MBUF_SIZE		(NMBCLUSTERS * CLBYTES)
  #define	VM_PHYS_SIZE		(USRIOSIZE * CLBYTES)
  
+ #if 0
  /*
   * MACHINE_NONCONTIG is necessary for NetBSD/powerpc.
   */
  #define	MACHINE_NONCONTIG
+ #else
+ 
+ #define	MACHINE_NEW_NONCONTIG
+ #define	VM_PHYSSEG_MAX		32
+ #define	VM_PHYSSEG_STRAT	VM_PSTRAT_RANDOM
+ #define	VM_PHYSSEG_NOADD
+ 
+ /*
+  * pmap specific data stored in the vm_physmem[] array
+  */
+ 
+ struct pmap_physseg {
+ 	/* NULL */
+ };
+ #endif
Index: powerpc/pmap.c
===================================================================
RCS file: /cvsroot/src/sys/arch/powerpc/powerpc/pmap.c,v
retrieving revision 1.3
diff -c -r1.3 pmap.c
*** pmap.c	1998/01/02 22:17:20	1.3
--- pmap.c	1998/02/25 02:42:39
***************
*** 440,445 ****
--- 440,449 ----
  		      :: "r"((u_int)ptable | (ptab_mask >> 10)));
  	tlbia();
  	nextavail = avail->start;
+ 
+ 	for (mp = avail; mp->size; mp++)
+ 		vm_page_physload(atop(mp->start), atop(mp->start + mp->size),
+ 				 atop(mp->start), atop(mp->start + mp->size));
  }
  
  /*