background image

Vol. 3A 6-29

INTERRUPT AND EXCEPTION HANDLING

A segment or page fault may be encountered while prefetching instructions; however, this behavior is outside the 
domain of Table 6-5. Any further faults generated while the processor is attempting to transfer control to the 
appropriate fault handler could still lead to a double-fault sequence.

If another contributory or page fault exception occurs while attempting to call the double-fault handler, the 
processor 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 informa-
tion, 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# inter-
rupts).
If a shutdown occurs while the processor is executing an NMI interrupt handler, then only a hardware reset can 
restart the processor. Likewise, if the shutdown occurs while executing in SMM, a hardware reset must be used to 
restart the processor.

Exception Error Code

Zero. The processor always pushes an error code of 0 onto the stack of the double-fault handler. 

Saved Instruction Pointer

The saved contents of CS and EIP registers are undefined.

Program State Change

A program-state following a double-fault exception is undefined. The program or task cannot be resumed or 
restarted. The only available action of the double-fault exception handler is to collect all possible context informa-
tion for use in diagnostics and then close the application and/or shut down or reset the processor.
If the double fault occurs when any portion of the exception handling machine state is corrupted, the handler 
cannot be invoked and the processor must be reset.

Table 6-5.  Conditions for Generating a Double Fault 

Second Exception

First Exception

Benign

Contributory

Page Fault

Benign

Handle Exceptions Serially

Handle Exceptions Serially

Handle Exceptions Serially

Contributory

Handle Exceptions Serially

Generate a Double Fault

Handle Exceptions Serially

Page Fault

Handle Exceptions Serially

Generate a Double Fault

Generate a Double Fault

Double Fault

Handle Exceptions Serially

Enter Shutdown Mode

Enter Shutdown Mode