LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 09-28-2012, 04:26 AM   #1
elico
Member
 
Registered: Dec 2011
Posts: 145

Rep: Reputation: Disabled
When an interrupt appears


when a hardware interrupt is invoked
what happens ?

If I understood well, the rellevant interrupt handler function is executed and at end the processor goes back to do what it did before the interrupt .

am I right ?

also "context get saved" what does it mean ?


Eliahu
 
Old 09-28-2012, 04:33 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,804

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
would be nice to describe that hardware. In general you are right. hardware interrupt will cause the current state will be saved, irq handler will be executed, state will be restored and CPU will continue where it was at the time of the interrupt. Context is probably the state of anything which is restored at the end.
 
1 members found this post helpful.
Old 09-28-2012, 04:38 AM   #3
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 647

Rep: Reputation: 189Reputation: 189
If you're talking about x86 architecture, what you're saying is basically right.
"context get saved" could mean two things:
  • the CPU pushes the contents of the CS and IP registers (which point to the next instruction of the current program) in the stack before jumping to the interrupt service routine. This is automatically done by the CPU every time an interrupt is served.
  • the general purpose registers (ax, bx, ...) are generally pushed on the stack prior to running the first instruction of the interrupt service routine, so they can be restored to their previous state after the interrupt routine has finished its deed. This is to be performed by the programmer of the interrupt service routine, if the routine needs to use one of those registers as a temporary storage.

Last edited by 414N; 09-28-2012 at 05:01 AM. Reason: corrected a typo
 
1 members found this post helpful.
Old 09-28-2012, 04:57 AM   #4
elico
Member
 
Registered: Dec 2011
Posts: 145

Original Poster
Rep: Reputation: Disabled
Thanks
Elico
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel panic: killing interrupt handler! In interrupt handler - not syncing. divyashree Programming 26 05-15-2010 01:27 PM
control is not going to interrupt handler when interrupt remyasj LinuxQuestions.org Member Intro 1 11-12-2009 12:56 AM
control is not going to interrupt handler when interrupt comes in serial driver sateeshalla Linux - Kernel 1 05-04-2006 09:43 AM
<0>Kernel panic: Aiee, killing interrupt handler! In interrupt handler - not syncing mrb Linux - Newbie 2 01-09-2005 09:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 11:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration