interrupt magic

From: Julien Oster (joster@soft-research.de)
Date: Sat Sep 23 2000 - 02:49:43 EDT

  • Next message: H. Peter Anvin: "Re: No sound (es1371) after test7"

    Hello,

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

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

    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
    correctly.

    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?

    Thanks,
    Julien

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    Please read the FAQ at http://www.tux.org/lkml/



    This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 02:52:21 EDT