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/23e3d1bd6d76
branches:  trunk
changeset: 324814:23e3d1bd6d76
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 13e841a121fd -r 23e3d1bd6d76 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