Skip to main content

 none
Does Microsoft provide any API way to catch APIC timer interruptions? RRS feed

  • 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.
    Friday, August 9, 2019 9:27 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.

    Monday, August 12, 2019 9:41 PM

All replies

  • Anything that is available would be done in a device driver. I am going to move this post to a forum that is better for this question.

    Sean Liming - Book Author: Starter Guide Windows 10 IoT Enterprise - www.annabooks.com / www.seanliming.com

    Sunday, August 11, 2019 4:06 AM
  • Great, thank you, Sean.

    May be you also could advise me any contact for support from Microsoft directly?

    I am ready to discuss business support, but if it is usefull only.

    With respects, Eugene.

    Monday, August 12, 2019 7:56 AM
  • Hi Eugene,

    Could you tell a bit more, why do you need (or want) APIC timer? If this is not a secret?

    --pa

     

    Monday, August 12, 2019 10:55 AM
  • 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.

    Monday, August 12, 2019 11:04 AM
  • 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.

    Monday, August 12, 2019 9:41 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.

    Tuesday, August 13, 2019 11:13 AM
  • 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

    Tuesday, August 13, 2019 6:31 PM
    Moderator
  • But I used it successfully until Windows 10. On Windows 10 there is unstable BSOD for some unknown reason. Even Windows 8 was successfully used by my driver.

    With respects, Eugene.

    Wednesday, August 14, 2019 8:46 AM
  • 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

    Wednesday, August 14, 2019 6:57 PM
    Moderator
  • 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.
    Thursday, August 15, 2019 6:53 AM