Author: jkim
Date: Mon Jan  9 23:20:30 2012
New Revision: 229887
URL: http://svn.freebsd.org/changeset/base/229887

Log:
  Enable hardware RNG for VIA Nano processors.
  
  PR:           kern/163974

Modified:
  head/sys/conf/files.amd64
  head/sys/dev/random/probe.c
  head/sys/modules/random/Makefile

Modified: head/sys/conf/files.amd64
==============================================================================
--- head/sys/conf/files.amd64   Mon Jan  9 23:01:42 2012        (r229886)
+++ head/sys/conf/files.amd64   Mon Jan  9 23:20:30 2012        (r229887)
@@ -215,6 +215,7 @@ dev/lindev/lindev.c         optional        lindev
 dev/nfe/if_nfe.c               optional        nfe pci
 dev/nve/if_nve.c               optional        nve pci
 dev/nvram/nvram.c              optional        nvram isa
+dev/random/nehemiah.c          optional        random
 dev/qlxgb/qla_dbg.c            optional        qlxgb pci
 dev/qlxgb/qla_hw.c             optional        qlxgb pci
 dev/qlxgb/qla_ioctl.c          optional        qlxgb pci

Modified: head/sys/dev/random/probe.c
==============================================================================
--- head/sys/dev/random/probe.c Mon Jan  9 23:01:42 2012        (r229886)
+++ head/sys/dev/random/probe.c Mon Jan  9 23:20:30 2012        (r229887)
@@ -36,7 +36,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/stdint.h>
 #include <sys/sysctl.h>
 
-#if defined(__i386__) && !defined(PC98)
+#if defined(__amd64__) || (defined(__i386__) && !defined(PC98))
 #include <machine/cpufunc.h>
 #include <machine/cputypes.h>
 #include <machine/md_var.h>
@@ -55,7 +55,7 @@ random_ident_hardware(struct random_syst
        *systat = random_yarrow;
 
        /* Then go looking for hardware */
-#if defined(__i386__) && !defined(PC98)
+#if defined(__amd64__) || (defined(__i386__) && !defined(PC98))
        if (via_feature_rng & VIA_HAS_RNG) {
                *systat = random_nehemiah;
        }

Modified: head/sys/modules/random/Makefile
==============================================================================
--- head/sys/modules/random/Makefile    Mon Jan  9 23:01:42 2012        
(r229886)
+++ head/sys/modules/random/Makefile    Mon Jan  9 23:20:30 2012        
(r229887)
@@ -6,7 +6,7 @@
 
 KMOD=  random
 SRCS=  randomdev.c probe.c
-.if ${MACHINE} == "i386"
+.if ${MACHINE} == "amd64" || ${MACHINE} == "i386"
 SRCS+= nehemiah.c
 .endif
 SRCS+= randomdev_soft.c yarrow.c hash.c
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to