13.07.2015 Views

iAPX 286 Operating System Writers Guide 1983

iAPX 286 Operating System Writers Guide 1983

iAPX 286 Operating System Writers Guide 1983

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

interHANDLING EXCEPTION CONDITIONSInterrupt 8-Double Fault (OF)This exception occurs when the processor detects an exception while trying to invoke the handler for aprior exception, for example:• The code segment containing the exception handler is marked "not present."• Invoking the exception handler causes a stack to overflow.The processor pushes a null error code onto the stack. If this or any other action while invoking thedouble-fault handler causes an additional fault, the processor shuts down. To avoid the catastophe of ashut-down, the double-fault handler must be a separate task (so that pushing the error code does notcause a stack fault) and must always be present (so that invoking it does not cause a "not present"fatilt).Recovery is sometimes possible by eliminating the cause of the second exception and re-executing thefaulting instruction so that the original fault can be handled appropriately. The greatest difficulty liesin identifying the cause of the second exception. Often, however, a double-fault condition indicates aserious error, and the faulting task should be terminated.Interrupt 9-Processor Extension Segment OverrunThis exception occurs when a memory operand of an 80287 instruction has a segment-limit violation.Since the 80287 executes in parallel with the 80<strong>286</strong>, the occurrence of this exception may not relatedirectly to the instruction stream being executed by the current task. A task switch may have occurredsince the 80287 began executing the instruction. Even if the interrupted task is the correct task, its IPmay have been advanced by several instructions beyond the 80287 instruction. Refer to Chapter 12 formore information about this exception.Interrupt 10-lnvalid TSS (TS)This exception occurs when the processor detects any of the following abnormalities in a TSS:I. The value of the limit field of the descriptor to the TSS is too small (discovered during a taskswitch).2. The LDT indicated in the TSS is invalid or not present (task switch). Note that a null LDTselector does not cause an exception during a task switch.3. One of the segment register fields (SS, CS, DS, or ES) in the TSS is invalid (task switch).4. One of the privileged-stack selectors is invalid (interlevel CALL).5. The back-link selector is invalid (intertask IRET).This exception does not occur when a segment-register field or the back link is marked "not present"but is otherwise valid. A "not present" exception occurs in this case. If, during an interlevel CALL,a privileged-stack selector in the TSS points to a descriptor marked "not present," then a stackexception occurs. .The handler for this exception must be a separate task, invoked via a task gate in the IDT. The processorpushes an error code onto the stack of the handler. The error code either identifies the faultyTSS (case 1) or contains the faulty selector from the TSS (cases 2-5). The instruction causing thefault can be restarted. An IRET at the end of the exception handler causes the faulting instruction toexecute again.7-5 121960·001

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!