summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/random_machdep.c
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>1995-12-28 17:09:14 +0000
committermarkm <markm@FreeBSD.org>1995-12-28 17:09:14 +0000
commit759619ec439169e549362058354a92a7f5f13e80 (patch)
tree81776de85ad235c266315c093075619ca6191f1c /sys/i386/isa/random_machdep.c
parenta1a68e9a51e2ba172fb998a1ed5b577b8b6c2673 (diff)
downloadFreeBSD-src-759619ec439169e549362058354a92a7f5f13e80.zip
FreeBSD-src-759619ec439169e549362058354a92a7f5f13e80.tar.gz
1) Add #include <machine/cpu.h> to catch some 586 #defines
2) swap the 2 arguments to outb (kato) Pointed out by: Kato Takenori <kato@eclogite.eps.nagoya-u.ac.jp>
Diffstat (limited to 'sys/i386/isa/random_machdep.c')
-rw-r--r--sys/i386/isa/random_machdep.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/i386/isa/random_machdep.c b/sys/i386/isa/random_machdep.c
index 3616585..c62db13 100644
--- a/sys/i386/isa/random_machdep.c
+++ b/sys/i386/isa/random_machdep.c
@@ -1,7 +1,7 @@
/*
* random.c -- A strong random number generator
*
- * $Id$
+ * $Id: random_machdep.c,v 1.2 1995/12/27 11:22:01 markm Exp $
*
* Version 0.95, last modified 18-Oct-95
*
@@ -49,6 +49,7 @@
#include <i386/isa/isa.h>
#include <i386/isa/timerreg.h>
#include <i386/isa/isa_device.h>
+#include <machine/cpu.h>
#include <machine/random.h>
/*
@@ -191,7 +192,7 @@ add_timer_randomness(struct random_bucket *r, struct timer_rand_state *state,
}
else {
#endif
- outb(TIMER_LATCH|TIMER_SEL0, TIMER_MODE); /* latch ASAP */
+ outb(TIMER_MODE, TIMER_LATCH|TIMER_SEL0); /* latch ASAP */
num ^= inb(TIMER_CNTR0) << 16;
num ^= inb(TIMER_CNTR0) << 24;
r->entropy_count += 2;
OpenPOWER on IntegriCloud