Title: CS318 Project
1CS318 Project 3
2Credits
- Google
- http//www.beyondlogic.org/interrupts/interupt.htm
3On a Interrupt Request
- Processor finishes current instruction
- Pushes stuff on stack
- Think of only EFLAGS and EIP for now
- Invokes appropriate Interrupt Service Routine
- iret pops stuff off of stack
4How many Interrupts ?
- 256 total
- Most of them software interrupts
- 15 hardware interrupts
- The Programmable Interrupt Controller (PIC)
handles hardware interrupts
5(No Transcript)
6Hardware Interrupts
- Two 8259 PIC IC chips
- Base addresses 0x20h and 0xA0h
7PIC
8Control logic
IRQ 0 is asserted
9Interrupt Mask Register (IMR)
Control logic
Check if IRQ is masked
10Interrupt Mask Register (IMR)
Interrupt Request Register (IRR)
Control logic
Hold in IRR until processed
11Interrupt Mask Register (IMR)
Interrupt Request Register (IRR)
Priority Resolver
Control logic
Send INT to processor
12After finishing current instruction, checks if
interrupts disabled in EFLAGS
13Interrupt Mask Register (IMR)
Interrupt Request Register (IRR)
Priority Resolver
Control logic
Processor replies with INTA
14Interrupt Mask Register (IMR)
Interrupt Request Register (IRR)
In Service Register (ISR)
Priority Resolver
Control logic
Store in ISR, reset bit in IRR
15Interrupt Mask Register (IMR)
Interrupt Request Register (IRR)
In Service Register (ISR)
Priority Resolver
Control logic
Processor asks for data
16Interrupt Mask Register (IMR)
Interrupt Request Register (IRR)
In Service Register (ISR)
Priority Resolver
Control logic
PIC supplies data
17Interrupt Mask Register (IMR)
Interrupt Request Register (IRR)
In Service Register (ISR)
Priority Resolver
Control logic
Processor sends EOI
18Interrupt Mask Register (IMR)
Interrupt Request Register (IRR)
In Service Register (ISR)
Priority Resolver
Control logic
PIC resets ISR
19Small matter of cascading PICs
- 2nd PIC at 0xA0 was a later addition
- Setup in master-slave configuration to preserve
compatibility - You dont need to worry about it
20(No Transcript)
21IRQ 2 routed via IRQ9
22INT of PIC2 via IRQ2
23All interrupts from PIC2 routed via PIC1 to
processor
24EOI for interrupts from PIC2 must be sent to both
PICs
25The End
26(No Transcript)