summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/vector.s
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>1995-10-28 16:58:05 +0000
committermarkm <markm@FreeBSD.org>1995-10-28 16:58:05 +0000
commit0336663acb5f8898f1b6458acfd4c70817c0718c (patch)
treebed4ea6a610ec2669b364d66cd69fe10ce0feb9c /sys/i386/isa/vector.s
parent63bc51f9191b9bad22a3d2a6a3ef84a091389395 (diff)
downloadFreeBSD-src-0336663acb5f8898f1b6458acfd4c70817c0718c.zip
FreeBSD-src-0336663acb5f8898f1b6458acfd4c70817c0718c.tar.gz
Theodore Ts'po's random number gernerator for Linux, ported by me.
This code will only be included in your kernel if you have 'options DEVRANDOM', but that will fall away in a couple of days. Obtained from: Theodore Ts'o, Linux
Diffstat (limited to 'sys/i386/isa/vector.s')
-rw-r--r--sys/i386/isa/vector.s14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/i386/isa/vector.s b/sys/i386/isa/vector.s
index bbed601..c630bee 100644
--- a/sys/i386/isa/vector.s
+++ b/sys/i386/isa/vector.s
@@ -1,6 +1,6 @@
/*
* from: vector.s, 386BSD 0.1 unknown origin
- * $Id: vector.s,v 1.11 1994/12/03 10:03:19 bde Exp $
+ * $Id: vector.s,v 1.12 1995/04/15 21:32:18 bde Exp $
*/
#include <i386/isa/icu.h>
@@ -53,6 +53,16 @@
#define MAYBE_PUSHL_ES
#endif
+#ifdef DEVRANDOM
+#define ADDENTROPY(irq_num) \
+ /* Add this interrupt to the pool of entropy */ \
+ pushl $irq_num ; \
+ call _add_interrupt_randomness ; \
+ addl $4,%esp
+#else
+#define ADDENTROPY(irq_num)
+#endif
+
/*
* Macros for interrupt interrupt entry, call to handler, and exit.
*
@@ -194,6 +204,8 @@ Xresume/**/irq_num: ; \
FASTER_NOP ; \
outb %al,$icu+1 ; \
sti ; /* XXX _doreti repeats the cli/sti */ \
+ /* Add this interrupt to the pool of entropy */ \
+ ADDENTROPY(irq_num) ; \
MEXITCOUNT ; \
/* We could usually avoid the following jmp by inlining some of */ \
/* _doreti, but it's probably better to use less cache. */ \
OpenPOWER on IntegriCloud