Subject: Clearing out RAM
To: None <amiga@NetBSD.ORG>
From: Eduardo E. Horvath eeh@btr.com <eeh@btr.btr.com>
List: amiga
Date: 02/08/1995 19:26:55
OK.  Here's my patch to amiga_init (as of last week) that enables the 
clearing out of all fast RAM.  At the moment it sets RAM to $0, but you 
can manually change that value to anything you want, say 0xdeadbeef for 
example.  Test it out and tell me if it improves life or makes things worse.

=========================================================================
Eduardo Horvath				eeh@btr.com
"Cliffs are for climbing.  That's why God invented grappling hooks."
					- Benton Frasier
*** amiga_init.c.orig	Wed Feb  8 18:52:35 1995
--- amiga_init.c	Wed Feb  8 18:53:56 1995
***************
*** 178,189 ****
--- 178,203 ----
  	 * Get ZorroII (16-bit) memory if there is any and it's not where the
  	 * kernel is loaded.
  	 */
+ 	i=0; /* This was never initialized!!! */
  	if (memlist->m_nseg > 0 && memlist->m_nseg < 16 && use_z2_mem) {
  		struct boot_memseg *sp, *esp;
  
  		sp = memlist->m_seg;
  		esp = sp + memlist->m_nseg;
  		for (; sp < esp; i++, sp++) {
+ #define CLEAR_RAM
+ #ifdef CLEAR_RAM
+ 			if(sp->ms_attrib & MEMF_FAST) {
+ 				register long* mptr;
+ 				register long* eptr;
+ 				mptr = (long*)sp->ms_start;
+ 				eptr = (long*)(((long)mptr)+sp->ms_size);
+ 				while(mptr < eptr) { 
+ 					*mptr++ = 0; 
+ 				}
+ 			}
+ 
+ #endif
  			if ((sp->ms_attrib & (MEMF_FAST | MEMF_24BITDMA)) 
  			    != (MEMF_FAST|MEMF_24BITDMA))
  				continue;