Subject: port-amiga/1487: Kernel panics from uninitialized data
To: None <gnats-bugs@NetBSD.ORG>
From: Eduardo Horvath <eeh@btr.com>
List: netbsd-bugs
Date: 09/20/1995 11:55:38
>Number: 1487
>Category: port-amiga
>Synopsis: Kernel panics from uninitialized data
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: gnats-admin (GNATS administrator)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Sep 20 19:50:01 1995
>Last-Modified:
>Originator: Eduardo Horvath
>Organization:
Mud
>Release: Sept 16 1995
>Environment:
System: NetBSD home 1.0A NetBSD 1.0A (DEBUG) #398: Sat Sep 16 06:23:58 PDT 1995 toor@home:/home2/src/sys/arch/amiga/compile/DEBUG amiga
>Description:
The kernel panics on 4MB machines if fast RAM is not initialized to zero
before the kernel is copied out of chip RAM.
>How-To-Repeat:
Run the kernel on a 4MB machine for a while and watch it crash randomly.
>Fix:
Clear out all of fast RAM before copying the kernel:
*** src/sys/arch/amiga/amiga/amiga_init.c.orig Sat Aug 19 00:11:39 1995
--- src/sys/arch/amiga/amiga/amiga_init.c Sat Sep 16 06:11:21 1995
***************
*** 216,221 ****
--- 216,229 ----
sp = memlist->m_seg;
esp = sp + memlist->m_nseg;
for (; sp < esp; i++, sp++) {
+ register long* bp;
+ register long* ep;
+
+ if (sp->ms_attrib & MEMF_FAST) {
+ bp = (long*)sp->ms_start;
+ ep = (long*)(sp->ms_start + sp->ms_size);
+ while( bp < ep ) *bp++ = 0x0;
+ }
if ((sp->ms_attrib & (MEMF_FAST | MEMF_24BITDMA))
!= (MEMF_FAST|MEMF_24BITDMA))
continue;
>Audit-Trail:
>Unformatted: