APIC TIMER
Posted: Wed Aug 30, 2006 12:42 pm
Hi u all,
i read a few research papers, which explain the apic's timer present in intel processors from the p6 and up to be far more exact, and much better to use for example 1gbit networking where every 10 useconds a package ahs to be send.
I only want to use the apics timer. No I/O apic ect at the moment,
From the intel documentation is thougth to do the following:
1. IA32_APIC_BASE[11] should be set to 1
2. Spurious-Interrupt Vector Register (SVR) : 0xFEE000F0H
set first byte to 1 to softwae enable the apic.
3. divide configuration register : 0xFEE003E0, bits 0,1 ,3 to set a divider
4. initial-count register register : 0xFEE00380 to some value
5. LVT timer register register : 0xFEE00320H
mask bit is bit 16,
bit 17 to select one-time or periodic counting
and first byt is the vector to which the cpu will jump at interrupt table.
So i did this all. I even checked CPUID to check if my proc has an apic. (mobility p4 3,2 ghz). I'm testing this software in VMWare which states to use the same underlying processor.
The problem is, i set the IDT able. It works, because i can use the normal pic. I also have a keyboard ahnged to it ect. But i never get an interrupt of the APIC timer. So am i not doing something? At the moment, my handler ( like all other working handlers) are in asm, and call a C function, which jus prints to screen that an interrupt accurred from the apic's timer. O course i registered the richt index in the IDT, the vector used in the LVT register.
Does someone have an idea?
Thanks in advance!
i read a few research papers, which explain the apic's timer present in intel processors from the p6 and up to be far more exact, and much better to use for example 1gbit networking where every 10 useconds a package ahs to be send.
I only want to use the apics timer. No I/O apic ect at the moment,
From the intel documentation is thougth to do the following:
1. IA32_APIC_BASE[11] should be set to 1
2. Spurious-Interrupt Vector Register (SVR) : 0xFEE000F0H
set first byte to 1 to softwae enable the apic.
3. divide configuration register : 0xFEE003E0, bits 0,1 ,3 to set a divider
4. initial-count register register : 0xFEE00380 to some value
5. LVT timer register register : 0xFEE00320H
mask bit is bit 16,
bit 17 to select one-time or periodic counting
and first byt is the vector to which the cpu will jump at interrupt table.
So i did this all. I even checked CPUID to check if my proc has an apic. (mobility p4 3,2 ghz). I'm testing this software in VMWare which states to use the same underlying processor.
The problem is, i set the IDT able. It works, because i can use the normal pic. I also have a keyboard ahnged to it ect. But i never get an interrupt of the APIC timer. So am i not doing something? At the moment, my handler ( like all other working handlers) are in asm, and call a C function, which jus prints to screen that an interrupt accurred from the apic's timer. O course i registered the richt index in the IDT, the vector used in the LVT register.
Does someone have an idea?
Thanks in advance!