Module Name: src
Committed By: maxv
Date: Sun Nov 26 11:08:35 UTC 2017
Modified Files:
src/sys/arch/amd64/stand/prekern: prng.c
Log Message:
I forgot to say in my previous commit that the PRNG is inspired from a
conversation with Taylor and Thor on tech-kern@.
(just add a comment)
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/amd64/stand/prekern/prng.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/amd64/stand/prekern/prng.c
diff -u src/sys/arch/amd64/stand/prekern/prng.c:1.1 src/sys/arch/amd64/stand/prekern/prng.c:1.2
--- src/sys/arch/amd64/stand/prekern/prng.c:1.1 Sun Nov 26 11:01:09 2017
+++ src/sys/arch/amd64/stand/prekern/prng.c Sun Nov 26 11:08:34 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: prng.c,v 1.1 2017/11/26 11:01:09 maxv Exp $ */
+/* $NetBSD: prng.c,v 1.2 2017/11/26 11:08:34 maxv Exp $ */
/*
* Copyright (c) 2017 The NetBSD Foundation, Inc. All rights reserved.
@@ -154,6 +154,7 @@ prng_init(void)
memset(&rng, 0, sizeof(rng));
+ /* detect cpu features */
cpuid(0x07, 0x00, descs);
has_rdseed = (descs[1] & CPUID_SEF_RDSEED) != 0;
cpuid(0x01, 0x00, descs);