Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Jan 2012 23:20:30 +0000 (UTC)
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r229887 - in head/sys: conf dev/random modules/random
Message-ID:  <201201092320.q09NKUhv065381@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201092320.q09NKUhv065381>