Hi,
Pype.Clicker wrote:I'd say that 3xfaulting one CPU should reset the whole computer. If things have been going *that* bad on one CPU, there are little chance the environment is still reliable on the other CPUs.
On my OS something as simple as messing up kernel's ESP can cause a triple fault, but it's not something that'd be fatal. If the other CPU/s detected the triple fault they could terminate the thread/process that was running and try to continue (or at least attempt to do a soft shutdown - flushing data to disk, etc).
Pype.Clicker wrote:If that's not the way things happen, i'd expect the local APIC of other CPUs to receive an Inter-Processor Interrupt to notify it of the other CPU's death, so the final answer would be in the local APIC datasheets ...
...or the motherboard's NMI connections, or in the machine check MSRs after a machine check exception, or buried deep within motherboard-specific firmware/ACPI code, or BIOS code invoked via the system management interrupt.
Due to lack of available facts, I'm mostly using Intel's System Programmer's Guide as a basis for my guesses. Most specifically, the paragraph in section 5.14, "EXCEPTION AND INTERRUPT REFERENCE" in the part that discusses double faults:
If another exception occurs while attempting to call the double-fault handler, the process enters shutdown mode. This mode is similar to the state following execution of an HLT instruction. In this mode the processor stops executing instructions until an NMI interrupt, SMI interrupt, hardware reset, or INIT# is received. The processor generates a special bus cycle to indicate that it has entered shutdown mode. Software designers may need to be aware of the response of hardware when it goes into shutdown mode. For example, hardware may turn on an indicator light on the front panel, generate an NMI interrupt to record diagnostic information, invoke reset initialization, generate an INIT initialization, or generate an SMI. If any events are pending during shutdown, they will be handled after an wake event from shutdown is processed (for example, A20M# interrupts).
IMHO for the purpose of resetting the computer it's safer to just use the 8042 reset.
I'm more interested in finding out if there's any computers/motherboards that don't reset all CPUs when one triple faults, and what I'd need to do to detect it.
Cheers,
Brendan