Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/x86 Unbreak build. Fake out (ie: remove) rdts...
details: https://anonhg.NetBSD.org/src/rev/cb2a27453f8c
branches: trunk
changeset: 320815:cb2a27453f8c
user: kre <kre%NetBSD.org@localhost>
date: Sat Jul 21 14:46:41 2018 +0000
description:
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.
diffstat:
sys/arch/x86/x86/cpu_rng.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diffs (30 lines):
diff -r 45184b022d11 -r cb2a27453f8c sys/arch/x86/x86/cpu_rng.c
--- a/sys/arch/x86/x86/cpu_rng.c Sat Jul 21 13:23:48 2018 +0000
+++ b/sys/arch/x86/x86/cpu_rng.c Sat Jul 21 14:46:41 2018 +0000
@@ -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 tech%openbsd.org@localhost mailing list.
*/
+#include "opt_xen.h"
+
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/cpu.h>
@@ -235,7 +237,11 @@
}
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);
Home |
Main Index |
Thread Index |
Old Index