LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 05-27-2009, 02:46 AM   #1
irey
Member
 
Registered: Jun 2008
Location: Torino, Italy
Posts: 65

Rep: Reputation: 17
reprogramming the x86 IDT


Hi,

The only reason for this question is learning. I'm trying to handle interrupts. I started with the FreeBSD kernel sources and modified a bit. My code is executed early during the bootstrap process, right after the processor is set in protected mode and most descriptors (IDT, GDT, etc) are set up.

All entries in the IDT point to my own ISR. When executing INTx instructions I see it works fine. However I'm not receiving any hardware interrupts.

I tried issuing a STI instruction to make sure interrupts are enabled and outputting 0x20 to ports 0x20 and 0xA0 to make sure there are no pending EOIs (even if it shouldn't be necessary). However I'm still receiving nothing.

Is there some processor flag I don't know about? What did I miss?
Thanks
 
Old 05-27-2009, 11:32 AM   #2
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian
Posts: 1,423

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
Did you initialize the PIC?

Also you have to unmask the interrupts you want to receive. See Interfacing the PC, especially Hardware Interrupts
 
Old 05-27-2009, 12:06 PM   #3
irey
Member
 
Registered: Jun 2008
Location: Torino, Italy
Posts: 65

Original Poster
Rep: Reputation: 17
Quote:
Did you initialize the PIC?
Ehm... no. This is what I was missing.

It works fine now. Thanks.

Last edited by irey; 05-27-2009 at 01:12 PM.
 
Old 11-07-2010, 01:49 PM   #4
bastl
Member
 
Registered: Sep 2003
Location: Germany/BW
Distribution: My own
Posts: 217

Rep: Reputation: 21
Hi irey.
I want to edit the IDT, too. Can you tell me more about?
E.g. the GDT entry (Segment pointing to the IDT) for editing the IDT because I use a LKM to setup a new interrupt framework INT 0x81 and the symbol "idt_table[];" seems not to be reachable at linktime.

Many Thanks in advance.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NO sound with INTEL HDA (IDT codec) on HP DV4t-1000 TJ13820 Linux - Hardware 12 05-22-2009 04:53 AM
LXer: Sabayon Linux x86/x86-64 3.5 Loop 2: Beta Release LXer Syndicated Linux News 0 03-17-2008 06:41 PM
Reprogramming USB pen drives cyent Programming 4 08-02-2006 12:57 AM
Boot x86 target from flash, with the image and file system on the x86 host. batsayan Linux - Software 2 08-23-2005 12:09 AM
Reprogramming Bios DdTComp Linux - Hardware 3 11-01-2004 09:37 PM


All times are GMT -5. The time now is 05:14 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration