Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/sys/arch/i386/pci Pull up revisions 1.10-1.12 (requeste...
details: https://anonhg.NetBSD.org/src/rev/a75cbb4fd865
branches: netbsd-1-6
changeset: 529237:a75cbb4fd865
user: he <he%NetBSD.org@localhost>
date: Sun Nov 03 12:57:43 2002 +0000
description:
Pull up revisions 1.10-1.12 (requested by tron in ticket #231):
Add hardware random generator support for Intel i845, i850
and i860 chipsets, and make sure to unmap if it's not there.
diffstat:
sys/arch/i386/pci/pchb_rnd.c | 25 +++++++++++--------------
1 files changed, 11 insertions(+), 14 deletions(-)
diffs (74 lines):
diff -r 5772e19923d8 -r a75cbb4fd865 sys/arch/i386/pci/pchb_rnd.c
--- a/sys/arch/i386/pci/pchb_rnd.c Fri Nov 01 18:34:52 2002 +0000
+++ b/sys/arch/i386/pci/pchb_rnd.c Sun Nov 03 12:57:43 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pchb_rnd.c,v 1.9 2001/11/15 07:03:34 lukem Exp $ */
+/* $NetBSD: pchb_rnd.c,v 1.9.12.1 2002/11/03 12:57:43 he Exp $ */
/*
* Copyright (c) 2000 Michael Shalayeff
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pchb_rnd.c,v 1.9 2001/11/15 07:03:34 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pchb_rnd.c,v 1.9.12.1 2002/11/03 12:57:43 he Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -70,6 +70,9 @@
case PCI_PRODUCT_INTEL_82815_FULL_HUB:
case PCI_PRODUCT_INTEL_82820_MCH:
case PCI_PRODUCT_INTEL_82840_HB:
+ case PCI_PRODUCT_INTEL_82845_HB:
+ case PCI_PRODUCT_INTEL_82850_HB:
+ case PCI_PRODUCT_INTEL_82860_HB:
sc->sc_st = pa->pa_memt;
if (bus_space_map(sc->sc_st, I82802_IOBASE,
I82802_IOSIZE, 0, &sc->sc_sh) != 0) {
@@ -86,6 +89,8 @@
/*
* Random number generator is not present.
*/
+ bus_space_unmap(sc->sc_st, sc->sc_sh,
+ I82802_IOSIZE);
return;
}
@@ -98,6 +103,8 @@
/*
* Couldn't enable the RNG.
*/
+ bus_space_unmap(sc->sc_st, sc->sc_sh,
+ I82802_IOSIZE);
return;
}
@@ -111,6 +118,8 @@
}
if ((reg8 & I82802_RNG_RNGST_DATAV) == 0) {
+ bus_space_unmap(sc->sc_st, sc->sc_sh,
+ I82802_IOSIZE);
printf("%s: unable to read from random "
"number generator.\n",
sc->sc_dev.dv_xname);
@@ -126,18 +135,6 @@
* http://csrc.nist.gov/fips/fips1401.htm
*/
- /*
- * See how quickly the RNG provides entropy.
- */
- for (i = 0; i < 8192; i++) {
- while ((bus_space_read_1(sc->sc_st, sc->sc_sh,
- I82802_RNG_RNGST) &
- I82802_RNG_RNGST_DATAV) == 0)
- /* spin */;
- (void) bus_space_read_1(sc->sc_st, sc->sc_sh,
- I82802_RNG_DATA);
- }
-
printf("%s: random number generator enabled\n",
sc->sc_dev.dv_xname);
- Prev by Date:
[src/netbsd-1-6]: src/doc Pullups for tickets: 372, 373, 374, 411, 412, 413, ...
- Next by Date:
[src/netbsd-1-6]: src/sys/dev/pci Pull up revision 1.59 (requested by thorpej...
- Previous by Thread:
[src/netbsd-1-6]: src/doc Pullups for tickets: 372, 373, 374, 411, 412, 413, ...
- Next by Thread:
[src/netbsd-1-6]: src/sys/dev/pci Pull up revision 1.59 (requested by thorpej...
- Indexes:
Home |
Main Index |
Thread Index |
Old Index