[lkml]   [2000]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectinterrupt magic

I'm currently using 2.4.0-test5 and no APIC.

I'm trying to learn a bit about protected mode programming on i386

Looking at the interrupts, the interrupt descriptor table, interrupt gates
and all those things I wanted to experiment a bit to see if I understood

So I wrote the opcode 0xCF (IRET) into the first byte of the interrupt
handler for the keyboard controller (I got the address of the handler
directly from the IDT) and checked if I still have a keyboard.

No, I had no keyboard, but one thing confused me. After waiting a bit,
I got the kernel complaining about lost interrupts from the harddisk. The
ethernet card said pretty much the same thing. And plugging in an USB
device made the kernel also complain.

So it seems that I "masked" out a little bit more than the keyboard
interrupt (IRQ 1, entry 0x21 in the IDT). And it happens with _every_
interrupt I try with: when it gets called once, the kernel fails.

I did a lot of debugging, read a lot of C and assembler source code... but
I simply can't find what it is that renders the computer in such an
unusable state.

So... what do interrupt handlers, even the dummy standard ones, do to keep
the system running... and why won't it work without that?


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:38    [W:0.072 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site