CS318 Project - PowerPoint PPT Presentation

About This Presentation
Title:

CS318 Project

Description:

Small matter of cascading PICs. 2nd PIC at 0xA0 was a later addition ... EOI for interrupts from PIC2 must be sent to both PICs. The End. Questions? ... – PowerPoint PPT presentation

Number of Views:79
Avg rating:3.0/5.0
Slides: 27
Provided by: csPrin
Category:
Tags: cs318 | pics | project

less

Transcript and Presenter's Notes

Title: CS318 Project


1
CS318 Project 3
  • Interrupts

2
Credits
  • Google
  • http//www.beyondlogic.org/interrupts/interupt.htm

3
On 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

4
How many Interrupts ?
  • 256 total
  • Most of them software interrupts
  • 15 hardware interrupts
  • The Programmable Interrupt Controller (PIC)
    handles hardware interrupts

5
(No Transcript)
6
Hardware Interrupts
  • Two 8259 PIC IC chips
  • Base addresses 0x20h and 0xA0h

7
PIC
8
Control logic
IRQ 0 is asserted
9
Interrupt Mask Register (IMR)
Control logic
Check if IRQ is masked
10
Interrupt Mask Register (IMR)
Interrupt Request Register (IRR)
Control logic
Hold in IRR until processed
11
Interrupt Mask Register (IMR)
Interrupt Request Register (IRR)
Priority Resolver
Control logic
Send INT to processor
12
After finishing current instruction, checks if
interrupts disabled in EFLAGS
13
Interrupt Mask Register (IMR)
Interrupt Request Register (IRR)
Priority Resolver
Control logic
Processor replies with INTA
14
Interrupt Mask Register (IMR)
Interrupt Request Register (IRR)
In Service Register (ISR)
Priority Resolver
Control logic
Store in ISR, reset bit in IRR
15
Interrupt Mask Register (IMR)
Interrupt Request Register (IRR)
In Service Register (ISR)
Priority Resolver
Control logic
Processor asks for data
16
Interrupt Mask Register (IMR)
Interrupt Request Register (IRR)
In Service Register (ISR)
Priority Resolver
Control logic
PIC supplies data
17
Interrupt Mask Register (IMR)
Interrupt Request Register (IRR)
In Service Register (ISR)
Priority Resolver
Control logic
Processor sends EOI
18
Interrupt Mask Register (IMR)
Interrupt Request Register (IRR)
In Service Register (ISR)
Priority Resolver
Control logic
PIC resets ISR
19
Small 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)
21
IRQ 2 routed via IRQ9
22
INT of PIC2 via IRQ2
23
All interrupts from PIC2 routed via PIC1 to
processor
24
EOI for interrupts from PIC2 must be sent to both
PICs
25
The End
  • Questions?

26
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com