Add a DEBUGGER_ON_POWERFAIL option. This makes the power button on ultra 10s
work like an NMI button.
This commit is contained in:
parent
064d9e8af4
commit
76cf1369d7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=92212
@ -8,6 +8,7 @@ PANIC_REBOOT_WAIT_TIME opt_panic.h
|
||||
EBUS_DEBUG opt_ebus.h
|
||||
PSYCHO_DEBUG opt_psycho.h
|
||||
PSYCHO_STRAY opt_psycho.h
|
||||
DEBUGGER_ON_POWERFAIL opt_psycho.h
|
||||
OFW_PCI_DEBUG opt_ofw_pci.h
|
||||
# Normal IOMMU debugging
|
||||
IOMMU_DEBUG opt_iommu.h
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user