Interrupts with APIC, I/O APIC
Posted: Mon Nov 21, 2011 8:29 pm
Goal: Getting keyboard working and later other devices...
I'm bit stuck at programming device interrupts, any pointers welcomed
For now my OS is:
as I understand I've to program IOREDTBL[23:0]—I/O REDIRECTION TABLE REGISTERS
but I've no idea how exactly and what should contain each entry
PS. currently I don't care other cores and I'm using just BSP, also I'm discarding any compatibility and my OS will use only native modes, no PIC etc. I'm trying to make it as every modern OS should be, that's why ACPI
any other suggestions also would be nice
Thanks
I'm bit stuck at programming device interrupts, any pointers welcomed
For now my OS is:
- Setting up paging
- Switching to Long Mode
- Creating interrupt handlers and loading IDT (Exceptions are working nice )
- Locating RSDP from ACPI specification
- Locating MADT (RSDP->XSDT->MADT)
- Parsing MADT and getting APIC and I/O APIC address
- If PCAT_COMPAT is set in MADT Flags then masking all IRQ in PIC and writing 01h to IMCR
- ???
- 82093AA I/O ADVANCED PROGRAMMABLE INTERRUPT CONTROLLER (IOAPIC)
- Chapter 6 (INTERRUPT AND EXCEPTION HANDLING) and 10 (ADVANCED PROGRAMMABLE
INTERRUPT CONTROLLER (APIC)) from Intel® 64 and IA-32 Architectures Software Developer’s Manual Volume 3A: System Programming Guide, Part 1 - Chapter 5.2.12 (Multiple APIC Description Table (MADT)) from Advanced Configuration and Power Interface Specification (Revision 4.0a)
as I understand I've to program IOREDTBL[23:0]—I/O REDIRECTION TABLE REGISTERS
but I've no idea how exactly and what should contain each entry
PS. currently I don't care other cores and I'm using just BSP, also I'm discarding any compatibility and my OS will use only native modes, no PIC etc. I'm trying to make it as every modern OS should be, that's why ACPI
any other suggestions also would be nice
Thanks