kernel - Fix bugs in rdrand, change sampling frequency
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 25 Feb 2014 22:46:02 +0000 (14:46 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 25 Feb 2014 22:48:12 +0000 (14:48 -0800)
commit51a4a9a0482111a96b4665f9e6d93dc9cd1b6b5a
tree7b336f82651e97877feb735694a73459cce01230
parentcf9961f7f4ec50a50716c84bb9b9a86cffe4caee
kernel - Fix bugs in rdrand, change sampling frequency

* Fix bugs in the rdrand assembly.  %ebx/%rbx is a call-saved register and
  cannot be destroyed.  For 64-bit use %r11 which is a temporary register.

* Increase the rdrand.c frequency from 1Hz to 10Hz

* add the debug.rdrand sysctl

* Use add_buffer_randomness() instead of add_true_randomness().
sys/dev/crypto/rdrand/rdrand.c
sys/dev/crypto/rdrand/rdrand_harvest_i386.S
sys/dev/crypto/rdrand/rdrand_harvest_x86_64.S