12.07.2015 Views

Geode GXLV Processor Series Low Power Integrated x86 Solutions

Geode GXLV Processor Series Low Power Integrated x86 Solutions

Geode GXLV Processor Series Low Power Integrated x86 Solutions

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.

<strong>Processor</strong> Programming (Continued)3.6 INTERRUPTS AND EXCEPTIONSThe processing of either an interrupt or an exceptionchanges the normal sequential flow of a program by transferringprogram control to a selected service routine.Except for SMM interrupts, the location of the selectedservice routine is determined by one of the interrupt vectorsstored in the interrupt descriptor table.True interrupts are hardware interrupts and are generatedby signal sources external to the CPU. All exceptions(including so-called software interrupts) are produced internallyby the CPU.3.6.1 InterruptsExternal events can interrupt normal program executionby using one of the three interrupt pins on the <strong>GXLV</strong> processor:• Non-maskable Interrupt (No pin, see note)• Maskable Interrupt (INTR pin)• SMM Interrupt (SMI# pin)Note: There is not an NMI pin on the <strong>GXLV</strong> processor.Generation of an NMI interrupt is not possible. However,software can generate an NMI by setting bit 2 of CCR7.(See the CCR7 register on page 53.)For most interrupts, program transfer to the interrupt routineoccurs after the current instruction has been completed.When the execution returns to the originalprogram, it begins immediately following the interruptedinstruction.The NMI interrupt cannot be masked by software andalways uses interrupt vector two to locate its service routine.Since the interrupt vector is fixed and is suppliedinternally, no interrupt acknowledge bus cycles are performed.This interrupt is normally reserved for unusual situationssuch as parity errors and has priority over INTRinterrupts.Once NMI processing has started, no additional NMIs areprocessed until an IRET instruction is executed, typicallyat the end of the NMI service routine. If the NMI is reassertedbefore execution of the IRET instruction, oneand only one NMI rising edge is stored and then processedafter execution of the next IRET.During the NMI service routine, maskable interrupts maybe enabled. If an unmasked INTR occurs during the NMIservice routine, the INTR is serviced and executionreturns to the NMI service routine following the next IRET.If a HALT instruction is executed within the NMI serviceroutine, the CPU restarts execution only in response toRESET, an unmasked INTR or a System ManagementMode (SMM) interrupt. NMI does not restart CPU executionunder this condition.The INTR interrupt is unmasked when the InterruptEnable Flag (IF, bit 9) in the EFLAGS register is set to 1(See the EFLAGS Register in Table 3-4 on page 46).Except for string operations, INTR interrupts are acknowledgedbetween instructions. Long string operations haveinterrupt windows between memory moves that allowINTR interrupts to be acknowledged.When an INTR interrupt occurs, the CPU performs aninterrupt-acknowledge bus cycle. During this cycle, theCPU reads an 8-bit vector that is supplied by an externalinterrupt controller. This vector selects which of the 256possible interrupt handlers will be executed in response tothe interrupt.The SMM interrupt has higher priority than either INTR orNMI. After SMI# is asserted, program execution is passedto an SMM service routine that runs in SMM addressspace reserved for this purpose. The remainder of thissection does not apply to the SMM interrupts. SMM interruptsare described in greater detail later in Section 3.7“System Management Mode” on page 83.3.6.2 ExceptionsExceptions are generated by an interrupt instruction or aprogram error. Exceptions are classified as traps, faults oraborts depending on the mechanism used to report themand the restartability of the instruction which first causedthe exception.A Trap exception is reported immediately following theinstruction that generated the trap exception. Trap exceptionsare generated by execution of a software interruptinstruction (INTO, INT3, INTn, BOUND), by a single-stepoperation or by a data breakpoint.Software interrupts can be used to simulate hardwareinterrupts. For example, an INTn instruction causes theprocessor to execute the interrupt service routine pointedto by the nth vector in the interrupt table. Execution of theinterrupt service routine occurs regardless of the state ofthe IF flag (bit 9) in the EFLAGS register.The one byte INT3, or breakpoint interrupt (vector 3), is aparticular case of the INTn instruction. By inserting thisone byte instruction in a program, the user can set breakpointsin the code that can be used during debug.<strong>Geode</strong> <strong>GXLV</strong> <strong>Processor</strong> <strong>Series</strong>Revision 1.3 79 www.national.com

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

Saved successfully!

Ooh no, something went wrong!