Subject: Re: SPARCengine Ultra AXi bogus power failure
To: Francis Devereux <francis@devrx.org>
From: Eduardo Horvath <eeh@NetBSD.ORG>
List: port-sparc64
Date: 02/27/2003 10:37:27
On Thu, Feb 27, 2003 at 03:13:21PM +0000, Francis Devereux wrote:
> I have a Sunray workstation based on the SPARCengine Ultra AXi board.  When I
> boot NetBSD (1.6) I get the message "Power Failure Detected: Shutting down
> NOW." and the machine powers off.  Here are the messages I get:
> 
> Executing last command: boot disk1
> Boot device: /pci@1f,0/pci@1/scsi@1/disk@1,0  File and args:
> NetBSD IEEE 1275 Bootblock
> ..>> NetBSD/sparc64 OpenFirmware Boot, Revision 1.5
> >> (autobuild@cs20.apochromatic.org, Sun Sep  8 11:34:12 UTC 2002)
> loadfile: reading header
> elf64_exec: Booting /pci@1f,0/pci@1/scsi@1/disk@1,0:a/netbsd
> 3718088@0x1000000+144808@0x1800000+4049496@0x18235a8
> symbols @ 0xfee3e300 74+290352+153040 start=0x1000000
> chain: calling OF_chain(800000, e478, 1000000, fffa5a80, 18)
> [ using 444240 bytes of netbsd ELF symbol table ]
> consinit()
> setting up stdin
> chosen = f002d974, stdin @ 0x1817b90
> stdin instance = fff73f48
> stdin node = f0069860
> setting up stdout
> stdout instance = fff99e50
> stdout package = f0069860
> buffer @ 0x1c09d90
> console is /pci@1f,0/pci@1,1/ebus@1/se@14,400000:a
> Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002
>     The NetBSD Foundation, Inc.  All rights reserved.
> Copyright (c) 1982, 1986, 1989, 1991, 1993
>     The Regents of the University of California.  All rights reserved.
> 
> NetBSD 1.6 (KRAKEN) #0: Thu Feb 27 00:35:16 GMT 2003
>     francis@cepre.repton.int:/usr/src/sys/arch/sparc64/compile/KRAKEN
> total memory = 512 MB
> avail memory = 466 MB
> using 3289 buffers containing 26312 KB of memory
> bootpath: /pci@1f,0/pci@1,0/scsi@1,0/disk@1,0
> mainbus0 (root): SUNW,UltraSPARC-IIi-Engine
> cpu0 at mainbus0: SUNW,UltraSPARC-IIi @ 440.048 MHz, version 0 FPU
> cpu0: physical 32K instruction (32 b/l), 16K data (32 b/l), 2048K external (64 b
> /l)
> psycho0 at mainbus0 addr 0xfffc0000
> SUNW,sabre: impl 0, version 0: ign 7c0 bus range 0 to 128; PCI bus 0
> Power Failure Detected: Shutting down NOW.

I'd speculate that the firmware does interesting things to the bus
controller that generates or fails to clear the power fail interrupt 
during the reset sequece.  One thing to try is to clear the interrupt
(store 0LL in the power fail interrupt clear register) just before
installing the interrupt handler.  An interesting question that 
should be answered is whether doing this will prevent the interrupt
from being delivered later if there is a real power failure.  You
could try that fix, then boot into single user mode and power off
the machine and see if it manages to print anything.

Eduardo