Department of Electrical and Computer Engineering The University of Texas at Austin Y. N. Patt, D. N. Armstrong Interrupts and Exceptions for the Project 3 April 2002 * Information on x86 interrupts and exceptions in protected mode can be found in Chapter 6 of Vol. 1, and Chapter 5 of Vol. 3. * You must support at least one external interrupt triggered from an I/O device. * You must support both general protection exceptions and page faults. Note that both instruction and data accesses may throw exceptions. * Page Faults are caused by trying to access a page not in the TLB or a page not present in physical memory. * General protection exceptions are caused by: 1. Writing to a read-only page, or, 2. When computing a memory operand with an effective address outside the CS, DS, ES, FS or GS segment limit. Note that accessing memory outside the SS, stack segment, limit causes a Stack Segment Exception which is not required for this project. * The procedure for transferring control to the interrupt and exception handler is the following: 1. Push EFLAGS. 2. Push CS. 3. Push EIP. 4. Determine the address of the Interrupt Descriptor Table (IDT) entry that contains the far pointer that points to the relevant service routine. 5. Load the new CS and EIP values and begin executing from the new location. * The IRETD instruction will appear at the end of the interrupt service routine and will pop the EIP, CS and EFLAGS registers. * The far pointer pointing to the service routine is found by indexing into the IDT with the interrupt or exception vector. * The IDTR register contains a pointer to the base address of the IDT. The value in the IDTR is a linear address The IDTR register is actually a 6-byte register, where the first 4 bytes are the base address of the IDT and the final 2 bytes are the limit of the base address. You are not required to implement limit checking on the IDT. Therefore the first 4 bytes are all that you need to worry about for this project. * The vector number for the page faults is 14 and the vector number for general protection exceptions is 13. * You are not required to implement anything having to do with changing the priority level for your project.