[SOLVED] Stuck in the IOAPIC / LAPIC trap... :p
Posted: Sat Apr 28, 2012 10:07 am
Hi all!
After reading a lot on this forum (and of course, all the Intel guides) I'm stuck with APIC interrupts. I have a mess in my mind and I don't see any light in the end of the tunnel.
Goal: invoke my service routine when I hit a key.
What I have:
- long mode
- APIC detected (LAPIC in extended mode, tested with the timer interupt) and IOAPIC detected as well
- ISR routine (the same that gets called by the LAPIC timer interrupt)
Note:
- I have only the BSP cpu enabled.
- I rely on ACPI specifications only to detect hardware even if I have MP support
- I have masked all the PIC entries (vectors start from 0x20).
- I didn't change the TPR and PPR registers (default values of 0 should be fine for me)
- I have programmed the #1 entry of the IOAPIC's IOREDTBL with edge trigger, active high
Test environment:
- Bochs 2.5
- Qemu
Can you tell me what's the _minimum_ setup of both LAPIC and IOAPIC, please? I'm thinking about the simplest thing (phys destination, BSP only etc etc) that comes in mind!
I always get a "Int 0x20 stuck?" but the ISR never gets called.
I don't have clear what delivery type to use and when! It's clear that the LAPIC is getting something from the IOAPIC but I cannot fix the problem. I made a lot of tests to no avail... so I decided to start from scratch and asking for help here.
Thank you in advance,
Matteo
P.S.: sorry for my English...
After reading a lot on this forum (and of course, all the Intel guides) I'm stuck with APIC interrupts. I have a mess in my mind and I don't see any light in the end of the tunnel.
Goal: invoke my service routine when I hit a key.
What I have:
- long mode
- APIC detected (LAPIC in extended mode, tested with the timer interupt) and IOAPIC detected as well
- ISR routine (the same that gets called by the LAPIC timer interrupt)
Note:
- I have only the BSP cpu enabled.
- I rely on ACPI specifications only to detect hardware even if I have MP support
- I have masked all the PIC entries (vectors start from 0x20).
- I didn't change the TPR and PPR registers (default values of 0 should be fine for me)
- I have programmed the #1 entry of the IOAPIC's IOREDTBL with edge trigger, active high
Test environment:
- Bochs 2.5
- Qemu
Can you tell me what's the _minimum_ setup of both LAPIC and IOAPIC, please? I'm thinking about the simplest thing (phys destination, BSP only etc etc) that comes in mind!
I always get a "Int 0x20 stuck?" but the ISR never gets called.
I don't have clear what delivery type to use and when! It's clear that the LAPIC is getting something from the IOAPIC but I cannot fix the problem. I made a lot of tests to no avail... so I decided to start from scratch and asking for help here.
Thank you in advance,
Matteo
P.S.: sorry for my English...