Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/sys/arch/hp300/dev Pull up revision 1.41 (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/ec60f1567494
branches:  netbsd-1-4
changeset: 471026:ec60f1567494
user:      he <he%NetBSD.org@localhost>
date:      Thu Oct 12 21:32:02 2000 +0000

description:
Pull up revision 1.41 (requested by he):
  Add randomness sampling for hil, sd and rd on the hp300 port.

diffstat:

 sys/arch/hp300/dev/hil.c |  21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)

diffs (56 lines):

diff -r 4c26a9f54d8c -r ec60f1567494 sys/arch/hp300/dev/hil.c
--- a/sys/arch/hp300/dev/hil.c  Thu Oct 12 21:26:27 2000 +0000
+++ b/sys/arch/hp300/dev/hil.c  Thu Oct 12 21:32:02 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hil.c,v 1.37 1998/11/09 15:53:51 frueauf Exp $ */
+/*     $NetBSD: hil.c,v 1.37.4.1 2000/10/12 21:32:02 he Exp $  */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -43,6 +43,7 @@
  */
 
 #include "opt_compat_hpux.h"
+#include "rnd.h"
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -57,6 +58,10 @@
 #include <sys/uio.h>
 #include <sys/user.h>
 
+#if NRND > 0
+#include <sys/rnd.h>
+#endif
+
 #include <hp300/dev/hilreg.h>
 #include <hp300/dev/hilioctl.h>
 #include <hp300/dev/hilvar.h>
@@ -824,6 +829,9 @@
        stat = READHILSTAT(hildevice);
        c = READHILDATA(hildevice);             /* clears interrupt */
        hil_process_int(hilp, stat, c);
+#if NRND > 0
+       rnd_add_uint32(&hilp->rnd_source, (stat<<8)|c);
+#endif
 }
 
 #include "ite.h"
@@ -1337,6 +1345,17 @@
                        printf(" 0");
                printf("\n");
        }
+#if NRND > 0
+       /*
+        * attach the device into the random source list
+        * except from ID module (no point)
+        */
+       if (!id) {
+               char buf[10];
+               sprintf(buf, "hil%d", unit);
+               rnd_attach_source(&hilp->rnd_source, buf, RND_TYPE_TTY, 0);
+       }
+#endif
 }
 
 #define HILAR1 0x3E



Home | Main Index | Thread Index | Old Index