Module Name: src
Committed By: kre
Date: Sat Jul 21 14:46:41 UTC 2018
Modified Files:
src/sys/arch/x86/x86: cpu_rng.c
Log Message:
Unbreak build. Fake out (ie: remove) rdtsc() which does not
exist on XEN (or not yet anyway).
This change needs to be reverted when a proper solution ic implemented.
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/x86/x86/cpu_rng.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/x86/x86/cpu_rng.c
diff -u src/sys/arch/x86/x86/cpu_rng.c:1.6 src/sys/arch/x86/x86/cpu_rng.c:1.7
--- src/sys/arch/x86/x86/cpu_rng.c:1.6 Sat Jul 21 06:09:13 2018
+++ src/sys/arch/x86/x86/cpu_rng.c Sat Jul 21 14:46:41 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_rng.c,v 1.6 2018/07/21 06:09:13 maxv Exp $ */
+/* $NetBSD: cpu_rng.c,v 1.7 2018/07/21 14:46:41 kre Exp $ */
/*-
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -35,6 +35,8 @@
* comments from Henric Jungheim on the [email protected] mailing list.
*/
+#include "opt_xen.h"
+
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/cpu.h>
@@ -235,7 +237,11 @@ cpu_earlyrng(void *out, size_t sz)
}
SHA512_Update(&ctx, (uint8_t *)buf, i * sizeof(cpu_rng_t));
}
+#ifndef XEN
val = rdtsc();
+#else
+ val = 0; /* XXX */
+#endif
SHA512_Update(&ctx, (uint8_t *)&val, sizeof(val));
SHA512_Final(digest, &ctx);