NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-mac68k/54942: Random kernel panic on Quadra 660AV and 840AV



>Number:         54942
>Category:       port-mac68k
>Synopsis:       Random kernel panic on Quadra 660AV and 840AV
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    port-mac68k-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 06 09:20:00 +0000 2020
>Originator:     Rin Okuyama
>Release:        -HEAD and at least netbsd-9
>Organization:
Department of Physics, Meiji University
>Environment:
Sorry, I cannot physically access my 840AV at the moment.
>Description:
Kernel panics during boot have been reported for AV Macs sometimes in
port-mac68k. For my cases of 840AV, different kinds of panics, e.g.,
illegal instruction, MMU fault, FPU trap, etc., take place randomly
depending on kernel configuration and date of source code. DDB shows
that kernel text around the fault address becomes corrupted when panic
occurs.

I'm almost sure that this is due to DMA. Currently, we halt DMA
controller in kernel driver:

  https://nxr.netbsd.org/xref/src/sys/arch/mac68k/mac68k/psc.c#psc_kill_dma

However, this is too late; we should halt it in Booter. Otherwise,
DMA controller can transfer data to somewhere in low physical address
after Booter copied kernel image there.

Penguin booter for Linux halts DMA controller before copying kernel
image to low physical address.
>How-To-Repeat:
Boot kernel on Quadra 660AV or 840AV.
>Fix:
I've never observed this kind of panics if I use patched version of
Booter, by which DMA engine is halted before copying kernel image:

  http://www.netbsd.org/~rin/BSD_Mac68k_Booter.AV.20190818.bin
  (CAUTION: this version should not work on non-AV Macs)

  Some unorganized notes what I did for Booter:
  http://www.netbsd.org/~rin/Booter/

Unfortunately, this version of Booter is binary-patched and not working
for non-AV Macs; currently I do not have an environment to build Booter
from C codes. I will try to install CodeWarrior to My 840AV, but it may
take some time...



Home | Main Index | Thread Index | Old Index