1 '\" te
   2 .\" Copyright (c) 2009 Sun Microsystems, Inc.  All Rights Reserved.
   3 .\" Copyright (c) 2020 Peter Tribble.
   4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
   5 .\"  See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with
   6 .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   7 .TH N2RNG 7D "Jan 12, 2020"
   8 .SH NAME
   9 n2rng \- Ultra-SPARC T2 random number generator device driver
  10 .SH DESCRIPTION
  11 The \fBn2rng\fR device driver is a multi-threaded, loadable hardware driver
  12 supporting hardware assisted random numbers.
  13 This support is built into the Ultra-SPARC T2 and later processors.
  14 .sp
  15 .LP
  16 The \fBn2rng\fR driver requires the presence of the Solaris Cryptographic
  17 Framework to enable applications and kernel clients to access the provided
  18 services.
  19 .SH CONFIGURATION
  20 You configure the \fBn2rng\fR driver by defining properties in
  21 \fB/platform/sun4v/kernel/drv/n2rng.conf\fR which override the default settings.
  22 The following property is supported:
  23 .sp
  24 .ne 2
  25 .na
  26 \fBnostats\fR
  27 .ad
  28 .RS 28n
  29 Disables the generation of statistics.
  30 The nostats property may be used to help prevent traffic analysis, however,
  31 this may inhibit support personnel.
  32 .RE
  33 
  34 .SH CRYPTO STATISTICS
  35 Solaris crypto drivers must implement statistics variables.
  36 Statistics reported by \fBn2rng\fR may be read using the \fBkstat\fR(1M)
  37 utility.
  38 The \fBn2rng\fR driver maintains the following statistics:
  39 .sp
  40 .ne 2
  41 .na
  42 \fBstatus\fR
  43 .ad
  44 .RS 28n
  45 Status (online, offline, fail) of RNG device.
  46 .RE
  47 
  48 .sp
  49 .ne 2
  50 .na
  51 \fBrngjobs\fR
  52 .ad
  53 .RS 28n
  54 Number of requests for random data.
  55 .RE
  56 
  57 .sp
  58 .ne 2
  59 .na
  60 \fBrngbytes\fR
  61 .ad
  62 .RS 28n
  63 Number of bytes read from the RNG device.
  64 .RE
  65 
  66 .SH KERNEL STATISTICS
  67 The \fBn2rng\fR driver tallies a set of kernel driver statistics when in the
  68 Control domain.
  69 Statistics reported by \fBn2rng\fR may be read using the \fBkstat\fR(1M)
  70 utility.
  71 .sp
  72 .ne 2
  73 .na
  74 \fBrng(n)-cell0-bias\fR
  75 .ad
  76 .RS 28n
  77 Bias setting for noise cell 0 of RNG \fIn\fR.
  78 .RE
  79 
  80 .sp
  81 .ne 2
  82 .na
  83 \fBrng(n)-cell0-entropy\fR
  84 .ad
  85 .RS 28n
  86 Entropy value for noise cell 0 of RNG \fIn\fR.
  87 .RE
  88 
  89 .sp
  90 .ne 2
  91 .na
  92 \fBrng(n)-cell1-bias\fR
  93 .ad
  94 .RS 28n
  95 Bias setting for noise cell 1 of RNG \fIn\fR.
  96 .RE
  97 
  98 .sp
  99 .ne 2
 100 .na
 101 \fBrng(n)-cell1-entropy\fR
 102 .ad
 103 .RS 28n
 104 Entropy value for noise cell 1 of RNG \fIn\fR.
 105 .RE
 106 
 107 .sp
 108 .ne 2
 109 .na
 110 \fBrng(n)-cell2-bias\fR
 111 .ad
 112 .RS 28n
 113 Bias setting for noise cell 2 of RNG \fIn\fR.
 114 .RE
 115 
 116 .sp
 117 .ne 2
 118 .na
 119 \fBrng(n)-cell2-entropy\fR
 120 .ad
 121 .RS 28n
 122 Entropy value for noise cell 2 of RNG \fIn\fR.
 123 .RE
 124 
 125 .sp
 126 .ne 2
 127 .na
 128 \fBrng(n)-state\fR
 129 .ad
 130 .RS 28n
 131 State of rng number n (online, offline, error, health check).
 132 .RE
 133 
 134 .SH FILES
 135 .ne 2
 136 .na
 137 \fB/platform/sun4v/kernel/drv/sparcv9/n2rng\fR
 138 .ad
 139 .sp .6
 140 .RS 4n
 141 Device driver (SPARC)
 142 .RE
 143 
 144 .sp
 145 .ne 2
 146 .na
 147 \fB/platform/sun4v/kernel/drv/n2rng.conf\fR
 148 .ad
 149 .sp .6
 150 .RS 4n
 151 Driver configuration file
 152 .RE
 153 
 154 .SH ATTRIBUTES
 155 See \fBattributes\fR(5) for descriptions of the following attributes:
 156 .sp
 157 
 158 .sp
 159 .TS
 160 box;
 161 c | c
 162 l | l .
 163 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 164 _
 165 Architecture    SPARC
 166 _
 167 Interface stability     Committed
 168 .TE
 169 
 170 .SH SEE ALSO
 171 \fBcryptoadm\fR(1M), \fBkstat\fR(1M), \fBattributes\fR(5)