diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2016-08-27 20:42:31 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2016-08-27 20:42:31 +0200 |
commit | 0a5f81a44230cbd562b6d71a0a5be018e24a5ba6 (patch) | |
tree | 883f1cb3f5cc91053fb377c2ac28b2db1bd07ba1 /sys/src/9/pc/devarch.c | |
parent | 71ac88392f2033256b29f22bd8afdd7374100e5a (diff) |
kernel: switch to fast portable chacha based seed-once random number generator
Diffstat (limited to 'sys/src/9/pc/devarch.c')
-rw-r--r-- | sys/src/9/pc/devarch.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/src/9/pc/devarch.c b/sys/src/9/pc/devarch.c index f3be061cb..0b4cad252 100644 --- a/sys/src/9/pc/devarch.c +++ b/sys/src/9/pc/devarch.c @@ -872,6 +872,11 @@ cpuidentify(void) fprestore = fpx87restore; } + if(strcmp(m->cpuidid, "GenuineIntel") == 0 && (m->cpuidcx & Rdrnd) != 0) + hwrandbuf = rdrandbuf; + else + hwrandbuf = nil; + cputype = t; return t->family; } |