[PATCH 3/4] Add _CPU_Counter_frequency()

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Jun 15 15:03:58 UTC 2018


----- Am 15. Jun 2018 um 16:16 schrieb Gedare Bloom gedare at rtems.org:

> Hi Sebastian,
> 
> The only real question I have is about the default value of 1 GHz.
> (How) does this affect the accuracy/correctness of the BSPs that use
> this default implementation?

If a BSP doesn't provide a CPU counter implementation, then the default value will be almost always wrong. The value of 1GHz was chosen to get reasonable safe busy wait functions, e.g. they return not too early.

> 
> As a side note, using Hz units in uint32_t means we limit to about 4.2
> GHz. This seems a safe assumption, but worth documenting?

Yes, sorry, the CPU counter API documentation is quite long on my TODO list:

https://devel.rtems.org/ticket/2848

Faster CPUs can scale down the CPU counter frequency if necessary.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list