How to register PMI handler?
Posted: Wed Aug 14, 2013 10:50 am
I'm trying to register an interrupt handler for the performance monitoring interrupt (PMI).
I was hoping I could just find the IRQ line number by looking in /proc/interrupts (grep PMI /proc/interrupts) but when I try to register that irq using register_irq, the system hangs.
I've also been reading about APIC/LAPIC in the Intel documentation, but it's not clear to me how to actually use it. There is an APIC register for the performance monitoring counter's local vector table (which is presumably related to the PMI), which can be read and written to, but I'm not sure if I can use that to define the entrypoint for my custom PMI handler.
What is the relationship between the Local Vector Table in the APIC and the value shown in /proc/interrupts? How do I register a handler for the PMI (which presumably occurs when a performance counter overflows)?
I should also mention I'm on a 2.6 kernel (HPC system, no chance to update), SandyBridge.
I was hoping I could just find the IRQ line number by looking in /proc/interrupts (grep PMI /proc/interrupts) but when I try to register that irq using register_irq, the system hangs.
I've also been reading about APIC/LAPIC in the Intel documentation, but it's not clear to me how to actually use it. There is an APIC register for the performance monitoring counter's local vector table (which is presumably related to the PMI), which can be read and written to, but I'm not sure if I can use that to define the entrypoint for my custom PMI handler.
What is the relationship between the Local Vector Table in the APIC and the value shown in /proc/interrupts? How do I register a handler for the PMI (which presumably occurs when a performance counter overflows)?
I should also mention I'm on a 2.6 kernel (HPC system, no chance to update), SandyBridge.