Am I a total dump noob or when a I read a redirection entry such as IRQ 0 --> IRQ 2 in ACPI tables,
It means that IRQ0 will be redirected to IRQ2 in IOAPIC.
But what happens now to IRQ2 ? where does it go ? to the same input ?
It doesn't make sense that there's no corresponding IRQ2 redirection then.
dumb/noob question regarding IO/APIC redirection
dumb/noob question regarding IO/APIC redirection
“Meaningless! Meaningless!”
says the Teacher.
“Utterly meaningless!
Everything is meaningless.” - Ecclesiastes 1, 2
Educational Purpose Operating System - EPOS
says the Teacher.
“Utterly meaningless!
Everything is meaningless.” - Ecclesiastes 1, 2
Educational Purpose Operating System - EPOS
- BrightLight
- Member
- Posts: 901
- Joined: Sat Dec 27, 2014 9:11 am
- Location: Maadi, Cairo, Egypt
- Contact:
Re: dumb/noob question regarding IO/APIC redirection
Nothing happens to IRQ 2, because in the legacy PIC configuration, IRQ 2 is the cascade interrupt. The master PIC is connected to the CPU, and the slave PIC is connected to IRQ 2 on the master. On the IOAPIC, there are no need for a cascade IRQ, thus IRQ 0 (timer) is remapped to IRQ 2, and the local APIC timer is mapped to IRQ 0.stdcall wrote:Am I a total dump noob or when a I read a redirection entry such as IRQ 0 --> IRQ 2 in ACPI tables,
It means that IRQ0 will be redirected to IRQ2 in IOAPIC.
But what happens now to IRQ2 ? where does it go ? to the same input ?
It doesn't make sense that there's no corresponding IRQ2 redirection then.
You know your OS is advanced when you stop using the Intel programming guide as a reference.
Re: dumb/noob question regarding IO/APIC redirection
Do you have a reference for this? As far as I was aware, IOAPIC interrupt 0 is signalled whenever the southbridge/ICH raises an interrupt, and is thus used for any interrupts where the ICH doesn't raise a separate interrupt line. The only example of this I can find is when using external FPU interrupts (which are routed from the builtin FPU in the CPU to the ICH and then back to the IOAPIC).omarrx024 wrote:local APIC timer is mapped to IRQ 0.
Regards,
John.
- BrightLight
- Member
- Posts: 901
- Joined: Sat Dec 27, 2014 9:11 am
- Location: Maadi, Cairo, Egypt
- Contact:
Re: dumb/noob question regarding IO/APIC redirection
I don't recall where I read this, but I have indeed handled a local APIC timer IRQ 0 using I/O APIC on QEMU before.jnc100 wrote:Do you have a reference for this? As far as I was aware, IOAPIC interrupt 0 is signalled whenever the southbridge/ICH raises an interrupt, and is thus used for any interrupts where the ICH doesn't raise a separate interrupt line. The only example of this I can find is when using external FPU interrupts (which are routed from the builtin FPU in the CPU to the ICH and then back to the IOAPIC).omarrx024 wrote:local APIC timer is mapped to IRQ 0.
You know your OS is advanced when you stop using the Intel programming guide as a reference.
Re: dumb/noob question regarding IO/APIC redirection
Wrong.
Each CPU (or CPU core) as its own local APIC, and they do not generate IRQs; they signal interrupts on the CPU that they are on.
And you can actually choose which specific interrupt vector the APIC timer triggers, by programming the value into a bitfield in the LVT entry for the timer - it is the same register that decides which mode (single-shot, periodic, etc) the APIC timer is in. This is documented in section 10.5.4 of the Intel System Programming Manual. For the format of an LVT entry, see section 10.5.1 - it tells you which entry is for the timer, and as you can see in the table, the bottom 8 bits select the interrupt vector it should trigger. You have to do this separately for each CPU.
Each CPU (or CPU core) as its own local APIC, and they do not generate IRQs; they signal interrupts on the CPU that they are on.
And you can actually choose which specific interrupt vector the APIC timer triggers, by programming the value into a bitfield in the LVT entry for the timer - it is the same register that decides which mode (single-shot, periodic, etc) the APIC timer is in. This is documented in section 10.5.4 of the Intel System Programming Manual. For the format of an LVT entry, see section 10.5.1 - it tells you which entry is for the timer, and as you can see in the table, the bottom 8 bits select the interrupt vector it should trigger. You have to do this separately for each CPU.