freebsd-skq/sys/arm
markm 1b9328de56 Give suitably-endowed ARMs a register similar to the x86 TSC register.
Here, "suitably endowed" means that the System Control Coprocessor
(#15) has Performance Monitoring Registers, including a CCNT (Cycle
Count) register.

The CCNT register is used in a way similar to the TSC register in
x86 processors by the get_cyclecount(9) function. The entropy-harvesting
thread is a heavy user of this function, and will benefit from not
having to call binuptime(9) instead.

One problem with the CCNT register is that it is 32-bit only, so
the upper 32-bits of the returned number are always 0. The entropy
harvester does not care, but in case any one else does, follow-up
work may include an interrup trap to increment an upper-32-bit
counter on CCNT overflow.

Another problem is that the CCNT register is not readable in user-mode
code; in can be made readable by userland, but then it is also
writable, and so is a good chunk of the PMU system. For that reason,
the CCNT is not enabled for user-mode access in this commit.

Like the x86, there is one CCNT per core, so they don't all run in
perfect sync.

Reviewed by:	ian@ (an earlier version)
Tested by:	ian@ (same earlier version)
Committed from:	WANDBOARD-QUAD
2014-05-14 19:11:15 +00:00
..
allwinner Switch to my freebsd.org emal address in copyright. 2014-03-25 08:31:47 +00:00
arm Give suitably-endowed ARMs a register similar to the x86 TSC register. 2014-05-14 19:11:15 +00:00
at91 When mapping device memory, use PTE_DEVICE rather than PTE_NOCACHE. 2014-05-10 20:03:03 +00:00
broadcom/bcm2835 Remove extra newlines. 2014-05-14 11:15:48 +00:00
cavium/cns11xx When mapping device memory, use PTE_DEVICE rather than PTE_NOCACHE. 2014-05-10 20:03:03 +00:00
conf Enable SMP for Exynos-based platforms (i.e. Chromebook) 2014-05-11 04:18:51 +00:00
freescale Fix typo. 2014-05-14 14:19:57 +00:00
include Give suitably-endowed ARMs a register similar to the x86 TSC register. 2014-05-14 19:11:15 +00:00
lpc Rename platform_gpio_init to be SoC specific 2014-05-10 21:30:19 +00:00
mv Rename platform_gpio_init to be platform specific, and make it static as 2014-05-10 20:31:05 +00:00
rockchip Rename platform_gpio_init to be SoC specific, and make it static as it's 2014-05-10 20:26:49 +00:00
s3c2xx0 When mapping device memory, use PTE_DEVICE rather than PTE_NOCACHE. 2014-05-10 20:03:03 +00:00
samsung/exynos Correct the end address of the video frame buffer. 2014-04-05 16:38:27 +00:00
tegra Eliminate irq_dispatch.S. Move the data items it contained into arm/intr.c 2014-03-10 18:10:09 +00:00
ti Move duplicated code to print l2 cache config into the common code. 2014-04-27 23:47:38 +00:00
versatile Eliminate irq_dispatch.S. Move the data items it contained into arm/intr.c 2014-03-10 18:10:09 +00:00
xilinx Use edge-triggered interrupts rather than polling loops to avoid missing 2014-05-08 17:20:45 +00:00
xscale When mapping device memory, use PTE_DEVICE rather than PTE_NOCACHE. 2014-05-10 20:03:03 +00:00