The Platform choses a timer granularity. In a PI platform it is the Timer Arch 
Protocol that choses. So the producer of gEfiTimerArchProtocolGuid picks. 

In general EFI does not specify these kind of requirements. So basically the 
contract is you will not get called faster than the timer period, and the 
platform will call you back with its best effort. The Stall works the same way, 
as it is a minimum guarantee, without any maximum. For most things this works 
just fine. 


The DXE Core timer code is here:
https://svn.code.sf.net/p/edk2/code/trunk/edk2/MdeModulePkg/Core/Dxe/Event/Timer.c
 CoreTimerTick ()
https://svn.code.sf.net/p/edk2/code/trunk/edk2/MdeModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c
 CoreTimerTick() is registered with the PI defined gEfiTimerArchProtocolGuid

Thanks,

Andrew Fish

On Sep 16, 2013, at 3:52 AM, galla rao <gallagnv....@gmail.com> wrote:

> Hello All,
>  
> Can anyone help me understand what is the minimum Timer Granularity for 
> gBS->SetTimer
> When i have written a callback with 50ms(milli seconds), The calls seems to 
> be taking a value close
> to 50ms
>  
> In the 8254Timerdxe the following comments are given about timer ticks
>  
> //
> // The PCAT 8253/8254 has an input clock at 1.193182 MHz and Timer 0 is
> // initialized as a 16 bit free running counter that generates an 
> interrupt(IRQ0)
> // each time the counter rolls over.
> //
> //   65536 counts
> // ---------------- * 1,000,000 uS/S = 54925.4 uS = 549254 * 100 ns
> //   1,193,182 Hz
> //
> // The default timer tick duration is set to 10 ms = 100000 100 ns units
> //
>  
> Based on the above details on x86-IA64 architecture
> 54925.4uS would be close to 50ms(milli seconds)
>  
> Does it means minimum granularity is 50ms for a callback to get called. For a 
> 10ms callback i am not seeing
> a callback getting called every 10ms
>  
> Can I use anyother Timer Mechanisms from chipset for a shorter callbacks than 
> 50ms to improve my IO repsonse of the device?
>  
> Please provide your inputs & suggestions.
>  
> Thanks
> Ranga
>  
> ------------------------------------------------------------------------------
> LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
> 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk_______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to