SlideShare a Scribd company logo
1 of 16
Interrupts and exceptions
1
Interrupts and exceptions
• Exceptions: Result from unexpected situations
(from within the CPU)
• Interrupts: Result from external events, e.g.
keyboard.
• Similar effect. Need to:
- Save current CPU state
- Execute some appropriate set of instructions
- Resume normal execution (sometimes)
2
3
Interrupt and exception
Type of event MIPS terminology From Where ?
Interrupt External I/O device request
------------------------------------------------------------------------------------
Invoke Operation system Internal Exception
From user program
-------------------------------------------------------------------------------------
Arithmetic Overflow Internal Exception
-------------------------------------------------------------------------------------
Using an undefined
Instruction Internal Exception
--------------------------------------------------------------------------------------
Hardware malfunctions Either Exception or
interrupt
4
Handling
exceptions
Address 40000040:
Fixed location of
exception
Handling procedure
5
Handling
exceptions
Exception Handling procedure
• Save on the stack all register values and internal CPU
state (taken from the most recent pipeline register)
• Lookup the value written in the cause register
• Call the appropriate exception handling subroutine.
• When subroutine returns:
– Upload back all the registers and inernal CPU state
– Return to execute interrupted program
Faults
• Instruction would be illegal to execute
• Examples:
– Writing to a memory segment marked ‘read-only’
– Reading from an unavailable memory segment (on disk)
– Executing a ‘privileged’ instruction
• Detected before incrementing the PC
• The causes of ‘faults’ can often be ‘fixed’
• If a ‘problem’ can be remedied, then the CPU can just
resume its execution-cycle
Error Exceptions
• Most error exceptions — divide by zero, invalid
operation, illegal memory reference, etc. — translate
directly into CPU signals
• Exceptions are handled by the operating system.
Usually the job is fairly simple: send the appropriate
signal to the current process
– force_sig(sig_number, current);
• That will probably kill the process, but that’s not the
concern of the exception handler
• One important exception: page fault
• An exception can (infrequently) happen in the kernel
– die(); // kernel oops
Traps
• A CPU might have been programmed to
automatically switch control to a ‘debugger’
program after it has executed a specific
instruction
• That type of situation is known as a ‘trap’
• It is activated after incrementing the PC
Interrupts
Motivation:
• Utility of a general-purpose computer depends on its
ability to interact with I/O devices attached to it (e.g.,
keyboard, display, disk-drives, network, etc.)
• Devices require a prompt response from the CPU
when various events occur, even when the CPU is
busy running a program
• Need a mechanism for a device to “gain CPU’s
attention”
• Interrupts provide a way doing this
Simplified Architecture Diagram
Central
Processing
Unit
Main
Memory
I/O
device
I/O
device
I/O
device
I/O
device
system bus
Interrupt Hardware
x86
CPU
Master
PIC
(8259)
Slave
PIC
(8259) INTR
Programmable Interval-Timer
Keyboard Controller
Real-Time Clock
SCSI Disk
Ethernet
 I/O devices have (unique or shared) Interrupt Request
Lines (IRQs)
 IRQs are mapped by special hardware to interrupt
vectors, and passed to the CPU
 This hardware is called a Programmable Interrupt
Controller (PIC)
IRQs
The `Interrupt Controller’
• Responsible for telling the CPU when a specific external
device wishes to ‘interrupt’
– Needs to tell the CPU which one among several devices
is the one needing service
• PIC translates IRQ to vector
– Raises interrupt to CPU
– Vector available in register
– Waits for ack from CPU
• Interrupts can have varying priorities
– PIC also needs to prioritize multiple requests
• Possible to “mask” (disable) interrupts at PIC or CPU
CPU’s ‘fetch-execute’ cycle
Fetch instruction at PC
Advance PC to next instruction
Decode the fetched instruction
Execute the decoded instruction
Interrupt?
no
Save context
Get INTR ID
Lookup ISR
Execute ISR
yes IRET
User
Program
PC
ld
add
st
mul
ld
sub
bne
add
jmp
…
Handling interrupts
Similar to exception handling, except:
• Interrupt information are held in two registers:
Interrupt Cause and Interrupt Status
• Interrupts have priorities
– During execution of handling code for interrupt of
level L, only interrupts of level > L can create new
interrupt
Putting It All Together
PIC CPU
Memory Bus
INTR
0
N
IRQs
IDT
0
255
handler
idtr
Mask points
cause

More Related Content

Similar to 12879591.ppt

Block diagram of a computer
Block diagram of a computerBlock diagram of a computer
Block diagram of a computerQsrealm
 
Basic computer in detail with pictures created by creativeness
Basic computer in detail with pictures created by creativenessBasic computer in detail with pictures created by creativeness
Basic computer in detail with pictures created by creativenessAparna Samal
 
Wk 4 top_level_view_of_computer_function_and_interconnection
Wk 4 top_level_view_of_computer_function_and_interconnectionWk 4 top_level_view_of_computer_function_and_interconnection
Wk 4 top_level_view_of_computer_function_and_interconnectionlimyamahgoub
 
Functions of the Operating System
Functions of the Operating SystemFunctions of the Operating System
Functions of the Operating Systemandyr91
 
Unit-I - Introduction to Computer Fundamentals-AWI-.pptx
Unit-I - Introduction to Computer Fundamentals-AWI-.pptxUnit-I - Introduction to Computer Fundamentals-AWI-.pptx
Unit-I - Introduction to Computer Fundamentals-AWI-.pptxMrNikhilMohanShinde
 
The central processing unit by group 5 2015
The central processing unit by group 5 2015The central processing unit by group 5 2015
The central processing unit by group 5 2015Tendai Karuma
 
Computer system architecture
Computer system architectureComputer system architecture
Computer system architecturejeetesh036
 
EMBEDDED SYSTEMS
EMBEDDED SYSTEMSEMBEDDED SYSTEMS
EMBEDDED SYSTEMSkarthikas82
 
AOS Lab 8: Interrupts and Device Drivers
AOS Lab 8: Interrupts and Device DriversAOS Lab 8: Interrupts and Device Drivers
AOS Lab 8: Interrupts and Device DriversZubair Nabi
 
Embedded Systems - Training ppt
Embedded Systems - Training pptEmbedded Systems - Training ppt
Embedded Systems - Training pptNishant Kayal
 
Embedded systems 101 final
Embedded systems 101 finalEmbedded systems 101 final
Embedded systems 101 finalKhalid Elmeadawy
 
Interrupt in real time system
Interrupt in real time system Interrupt in real time system
Interrupt in real time system ali jawad
 
For students wk4_computer_function_and_interconnection
For students wk4_computer_function_and_interconnectionFor students wk4_computer_function_and_interconnection
For students wk4_computer_function_and_interconnectionlimyamahgoub
 
KL1034 Lect1 Computer assembly.pdf
KL1034 Lect1 Computer assembly.pdfKL1034 Lect1 Computer assembly.pdf
KL1034 Lect1 Computer assembly.pdfSysteDesig
 
Components of Computer
Components of ComputerComponents of Computer
Components of ComputerMdEmonRabbani
 
EMBEDDED SYSTEMS - MSc Sem III (Final).ppt
EMBEDDED SYSTEMS - MSc Sem III (Final).pptEMBEDDED SYSTEMS - MSc Sem III (Final).ppt
EMBEDDED SYSTEMS - MSc Sem III (Final).pptNamrata Ajwani
 

Similar to 12879591.ppt (20)

Block diagram of a computer
Block diagram of a computerBlock diagram of a computer
Block diagram of a computer
 
Basic computer in detail with pictures created by creativeness
Basic computer in detail with pictures created by creativenessBasic computer in detail with pictures created by creativeness
Basic computer in detail with pictures created by creativeness
 
Wk 4 top_level_view_of_computer_function_and_interconnection
Wk 4 top_level_view_of_computer_function_and_interconnectionWk 4 top_level_view_of_computer_function_and_interconnection
Wk 4 top_level_view_of_computer_function_and_interconnection
 
Functions of the Operating System
Functions of the Operating SystemFunctions of the Operating System
Functions of the Operating System
 
Unit-I - Introduction to Computer Fundamentals-AWI-.pptx
Unit-I - Introduction to Computer Fundamentals-AWI-.pptxUnit-I - Introduction to Computer Fundamentals-AWI-.pptx
Unit-I - Introduction to Computer Fundamentals-AWI-.pptx
 
The central processing unit by group 5 2015
The central processing unit by group 5 2015The central processing unit by group 5 2015
The central processing unit by group 5 2015
 
Computer system architecture
Computer system architectureComputer system architecture
Computer system architecture
 
EMBEDDED SYSTEMS
EMBEDDED SYSTEMSEMBEDDED SYSTEMS
EMBEDDED SYSTEMS
 
5120224.ppt
5120224.ppt5120224.ppt
5120224.ppt
 
AOS Lab 8: Interrupts and Device Drivers
AOS Lab 8: Interrupts and Device DriversAOS Lab 8: Interrupts and Device Drivers
AOS Lab 8: Interrupts and Device Drivers
 
Embedded Systems - Training ppt
Embedded Systems - Training pptEmbedded Systems - Training ppt
Embedded Systems - Training ppt
 
Embedded systems 101 final
Embedded systems 101 finalEmbedded systems 101 final
Embedded systems 101 final
 
ITE7_Chp3.pptx
ITE7_Chp3.pptxITE7_Chp3.pptx
ITE7_Chp3.pptx
 
Interrupt in real time system
Interrupt in real time system Interrupt in real time system
Interrupt in real time system
 
For students wk4_computer_function_and_interconnection
For students wk4_computer_function_and_interconnectionFor students wk4_computer_function_and_interconnection
For students wk4_computer_function_and_interconnection
 
Vino's 8086 interrupts
Vino's 8086 interruptsVino's 8086 interrupts
Vino's 8086 interrupts
 
KL1034 Lect1 Computer assembly.pdf
KL1034 Lect1 Computer assembly.pdfKL1034 Lect1 Computer assembly.pdf
KL1034 Lect1 Computer assembly.pdf
 
Components of Computer
Components of ComputerComponents of Computer
Components of Computer
 
Interrupts
InterruptsInterrupts
Interrupts
 
EMBEDDED SYSTEMS - MSc Sem III (Final).ppt
EMBEDDED SYSTEMS - MSc Sem III (Final).pptEMBEDDED SYSTEMS - MSc Sem III (Final).ppt
EMBEDDED SYSTEMS - MSc Sem III (Final).ppt
 

Recently uploaded

Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxvipinkmenon1
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacingjaychoudhary37
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 

Recently uploaded (20)

Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacing
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 

12879591.ppt

  • 2. Interrupts and exceptions • Exceptions: Result from unexpected situations (from within the CPU) • Interrupts: Result from external events, e.g. keyboard. • Similar effect. Need to: - Save current CPU state - Execute some appropriate set of instructions - Resume normal execution (sometimes) 2
  • 3. 3 Interrupt and exception Type of event MIPS terminology From Where ? Interrupt External I/O device request ------------------------------------------------------------------------------------ Invoke Operation system Internal Exception From user program ------------------------------------------------------------------------------------- Arithmetic Overflow Internal Exception ------------------------------------------------------------------------------------- Using an undefined Instruction Internal Exception -------------------------------------------------------------------------------------- Hardware malfunctions Either Exception or interrupt
  • 6. Exception Handling procedure • Save on the stack all register values and internal CPU state (taken from the most recent pipeline register) • Lookup the value written in the cause register • Call the appropriate exception handling subroutine. • When subroutine returns: – Upload back all the registers and inernal CPU state – Return to execute interrupted program
  • 7. Faults • Instruction would be illegal to execute • Examples: – Writing to a memory segment marked ‘read-only’ – Reading from an unavailable memory segment (on disk) – Executing a ‘privileged’ instruction • Detected before incrementing the PC • The causes of ‘faults’ can often be ‘fixed’ • If a ‘problem’ can be remedied, then the CPU can just resume its execution-cycle
  • 8. Error Exceptions • Most error exceptions — divide by zero, invalid operation, illegal memory reference, etc. — translate directly into CPU signals • Exceptions are handled by the operating system. Usually the job is fairly simple: send the appropriate signal to the current process – force_sig(sig_number, current); • That will probably kill the process, but that’s not the concern of the exception handler • One important exception: page fault • An exception can (infrequently) happen in the kernel – die(); // kernel oops
  • 9. Traps • A CPU might have been programmed to automatically switch control to a ‘debugger’ program after it has executed a specific instruction • That type of situation is known as a ‘trap’ • It is activated after incrementing the PC
  • 10. Interrupts Motivation: • Utility of a general-purpose computer depends on its ability to interact with I/O devices attached to it (e.g., keyboard, display, disk-drives, network, etc.) • Devices require a prompt response from the CPU when various events occur, even when the CPU is busy running a program • Need a mechanism for a device to “gain CPU’s attention” • Interrupts provide a way doing this
  • 12. Interrupt Hardware x86 CPU Master PIC (8259) Slave PIC (8259) INTR Programmable Interval-Timer Keyboard Controller Real-Time Clock SCSI Disk Ethernet  I/O devices have (unique or shared) Interrupt Request Lines (IRQs)  IRQs are mapped by special hardware to interrupt vectors, and passed to the CPU  This hardware is called a Programmable Interrupt Controller (PIC) IRQs
  • 13. The `Interrupt Controller’ • Responsible for telling the CPU when a specific external device wishes to ‘interrupt’ – Needs to tell the CPU which one among several devices is the one needing service • PIC translates IRQ to vector – Raises interrupt to CPU – Vector available in register – Waits for ack from CPU • Interrupts can have varying priorities – PIC also needs to prioritize multiple requests • Possible to “mask” (disable) interrupts at PIC or CPU
  • 14. CPU’s ‘fetch-execute’ cycle Fetch instruction at PC Advance PC to next instruction Decode the fetched instruction Execute the decoded instruction Interrupt? no Save context Get INTR ID Lookup ISR Execute ISR yes IRET User Program PC ld add st mul ld sub bne add jmp …
  • 15. Handling interrupts Similar to exception handling, except: • Interrupt information are held in two registers: Interrupt Cause and Interrupt Status • Interrupts have priorities – During execution of handling code for interrupt of level L, only interrupts of level > L can create new interrupt
  • 16. Putting It All Together PIC CPU Memory Bus INTR 0 N IRQs IDT 0 255 handler idtr Mask points cause