diff options
author | jake <jake@FreeBSD.org> | 2002-03-13 05:58:45 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2002-03-13 05:58:45 +0000 |
commit | 31419a58a4100975fff9b19aed50c7806d0e924f (patch) | |
tree | dd146c2683745b019e878c4e3851f142e761d63c /sys/sparc64/pci | |
parent | b767cbaa7aa34db7e0d83b435e4252b35854e23f (diff) | |
download | FreeBSD-src-31419a58a4100975fff9b19aed50c7806d0e924f.zip FreeBSD-src-31419a58a4100975fff9b19aed50c7806d0e924f.tar.gz |
Add a DEBUGGER_ON_POWERFAIL option. This makes the power button on ultra 10s
work like an NMI button.
Diffstat (limited to 'sys/sparc64/pci')
-rw-r--r-- | sys/sparc64/pci/psycho.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/sparc64/pci/psycho.c b/sys/sparc64/pci/psycho.c index d790364..045281e 100644 --- a/sys/sparc64/pci/psycho.c +++ b/sys/sparc64/pci/psycho.c @@ -760,8 +760,15 @@ psycho_powerfail(void *arg) { /* We lost power. Try to shut down NOW. */ +#ifdef DEBUGGER_ON_POWERFAIL + struct psycho_softc *sc = (struct psycho_softc *)arg; + + Debugger("powerfail"); + PSYCHO_WRITE8(sc, PSR_POWER_INT_CLR, 0); +#else printf("Power Failure Detected: Shutting down NOW.\n"); shutdown_nice(0); +#endif } #ifdef PSYCHO_MAP_WAKEUP |