Answered by:
Does Microsoft provide any API way to catch APIC timer interruptions?

Question
-
Does Microsoft provide any API way to catch APIC timer interruptions?
In principal, this way exists or not?
Thanks in advance.
With respects, Eugene.- Moved by Sean LimingMVP Sunday, August 11, 2019 4:08 AM
Answers
-
A 50us guarantee is only possible if you tightly control all the hardware. There are a number of commercial hardware products that spend longer than 50us in their IRQ handlers and DPCs, which make such a guarantee impossible.
There have been products that impose an RTOS rigor on Windows, but they essentially act like a hypervisor, where they are the control software and all of Windows runs as one task. That's possible, but it's a lot of work.
There is no API for accessing the APIC timer, because there is no guarantee that there will be an APIC timer at all. Windows is all about abstractions, and that doesn't fit the RTOS mindset.
Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.
- Marked as answer by Brian CatlinModerator Monday, August 12, 2019 9:49 PM
- Unmarked as answer by EugeneApp Tuesday, August 13, 2019 11:13 AM
- Marked as answer by Brian CatlinModerator Tuesday, August 13, 2019 6:27 PM
All replies
-
-
-
-
Hello Pavel,
Thank you a lot for answer.
I have my driver that is in principal mini RTOS (Real-time OS).
I catch interruptes from APIC timer successfully on Windows until 10 version (how it was implemented it is smal secret).
Now I want adopt my driver for Windows 10, but old way is not working for Windows 10.
And I want to know does Microsoft provide official api to do it or I should buy some commercial RTOS?
As fact, I need interrupts less than 50 microseconds.
Thanks.
With respects, Eugene.
-
A 50us guarantee is only possible if you tightly control all the hardware. There are a number of commercial hardware products that spend longer than 50us in their IRQ handlers and DPCs, which make such a guarantee impossible.
There have been products that impose an RTOS rigor on Windows, but they essentially act like a hypervisor, where they are the control software and all of Windows runs as one task. That's possible, but it's a lot of work.
There is no API for accessing the APIC timer, because there is no guarantee that there will be an APIC timer at all. Windows is all about abstractions, and that doesn't fit the RTOS mindset.
Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.
- Marked as answer by Brian CatlinModerator Monday, August 12, 2019 9:49 PM
- Unmarked as answer by EugeneApp Tuesday, August 13, 2019 11:13 AM
- Marked as answer by Brian CatlinModerator Tuesday, August 13, 2019 6:27 PM
-
Hello Tim!
A lot of thanks for answer. I have to clarify my needs.
50 us - it is max time between generation of interrupt and calling ESR function.
250 us - it is period of interrupts fire.
Now I understand there is no official API for APIC timer, because it could be absent.
But, I do not understand Why do I cannot connect my function to some number from IDT, using, for example, IoConnectInterruptEx ?
How to set APIC timer to call function from IDT I know.
With respects, Eugene.
-
As Tim pointed out, the APIC timer is not present on all systems. Also, it is used by the system and doesn't always fire at the same frequency, and you cannot change it. This question comes up every few years, and the answer is always the same.
-Brian
Azius Developer Training www.azius.com Windows device driver, internals, security, & forensics training and consulting. Blog at www.azius.com/blog
-
-
Nonetheless, it is still unsupported. That it worked previously is no guarantee that it will continue to work. I suggest that you post a request to the Microsoft Feedback Hub and ask for access to the APIC timer.
There are probably some unsupported ways to make this work, such as by looking up the APIC timer's vector in the ACPI tables, but I cannot comment on such unsupported techniques in this forum.
-Brian
Azius Developer Training www.azius.com Windows device driver, internals, security, & forensics training and consulting. Blog at www.azius.com/blog
-
Thank you, Brian. Okey, i work with APIC tables. Do you have this experience for Windows 10? If so, there is some possibility for collaboration. Please write me to mastermind2002@mail.ru for discussion, especcially if you cannot discuss here. With respects, Eugene.