Fast cycle counter for ARM chips with SCC - patch for review.

Mark R V Murray markm at FreeBSD.org
Sat May 10 17:39:31 UTC 2014


Hi *

This patch makes the ARM6 kernels that have an SCC coprocessor (RPI and WANDBOARD have them) get a MUCH better implementation of get_cyclecount(9), but not a perfect one. The incrementing rate is good (+- 1 per instruction), but its only 32 bits. Later, if there is interest, I may wish to fix that with an overflow interrupt, but for now its easily good enough for the kernel entropy harvesting service. Also, its MUUUCH more efficient; a simple read rather can calling the internal kernel binuptime(9) clock.

Comments, please? I’m keen to commit.

M
-- 
Mark R V Murray
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arm_ccnt_counter.diff
Type: application/octet-stream
Size: 2479 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20140510/72c1b855/attachment.obj>
-------------- next part --------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 353 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20140510/72c1b855/attachment.sig>


More information about the freebsd-arm mailing list