[lkml]   [2000]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: interrupt magic
I can't remember anything about protected mode interrupt handlers nor have 
I ever looked at Linux interrupt handling but at least in real mode from my
good old PC/DOS programming days I seem to remember that if you are hooking
a hardware interrupt vector then you have to issue a end of interrupt (EOI)
to the 8259A interrupt controller (PIC) before doing the iret, for example
like so:

; Note: this uses "dst, src" operand ordering not the
; "reversed" ordering used by gcc asm.
push ax
mov al,20h ; Nonspecific EOI
out 20h,al ; Write PIC output control word OCW2
pop ax

Might this be the problem (or whatever the equivalent specific is in Linux
/ pmode)?

Just my 2p.



At 07:49 23/09/2000, Julien Oster wrote:
>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


"Education is what remains after one has forgotten everything he
learned in school." - Albert Einstein

Anton Altaparmakov Voice: 01223-333541(lab) / 07712-632205(mobile)
Christ's College eMail:
Cambridge CB2 3BU ICQ: 8561279
United Kingdom WWW:

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:45    [W:0.073 / U:1.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site