Home
last modified time | relevance | path

Searched refs:n2rng (Results 1 – 7 of 7) sorted by relevance

/illumos-gate/usr/src/uts/sun4v/io/n2rng/
H A Dn2rng.c163 n2rng_t *n2rng = NULL; in n2rng_attach() local
181 n2rng = (n2rng_t *)ddi_get_soft_state(n2rng_softstate, in n2rng_attach()
183 if (n2rng == NULL) { in n2rng_attach()
187 return (n2rng_resume(n2rng)); in n2rng_attach()
200 n2rng = (n2rng_t *)ddi_get_soft_state(n2rng_softstate, instance); in n2rng_attach()
201 ASSERT(n2rng != NULL); in n2rng_attach()
202 n2rng->n_dip = dip; in n2rng_attach()
204 mutex_init(&n2rng->n_lock, NULL, MUTEX_DRIVER, NULL); in n2rng_attach()
205 n2rng->n_flags = 0; in n2rng_attach()
206 n2rng->n_timeout_id = 0; in n2rng_attach()
[all …]
H A Dn2rng_kcf.c52 void n2rng_ksinit(n2rng_t *n2rng);
53 void n2rng_ksdeinit(n2rng_t *n2rng);
55 static int fips_init(n2rng_t *n2rng);
56 static void fips_fini(n2rng_t *n2rng);
57 int fips_random(n2rng_t *n2rng, uint8_t *out, size_t nbytes);
124 n2rng_t *n2rng = (n2rng_t *)prov; in ext_info() local
155 ddi_driver_name(n2rng->n_dip), in ext_info()
156 ddi_get_instance(n2rng->n_dip)); in ext_info()
181 n2rng_t *n2rng = (n2rng_t *)targ; in unregister_task() local
184 (void) n2rng_unregister_provider(n2rng); in unregister_task()
[all …]
H A Dn2rng_kstat.c46 n2rng_ksinit(n2rng_t *n2rng) in n2rng_ksinit() argument
53 if (ddi_getprop(DDI_DEV_T_ANY, n2rng->n_dip, in n2rng_ksinit()
62 instance = ddi_get_instance(n2rng->n_dip); in n2rng_ksinit()
67 n2rng->n_ksp = kstat_create(DRIVER, instance, NULL, "misc", in n2rng_ksinit()
71 if (n2rng->n_ksp == NULL) { in n2rng_ksinit()
72 n2rng_error(n2rng, "unable to create kstats"); in n2rng_ksinit()
74 n2rng_stat_t *dkp = (n2rng_stat_t *)n2rng->n_ksp->ks_data; in n2rng_ksinit()
83 if (n2rng_iscontrol(n2rng)) { in n2rng_ksinit()
85 for (i = 0; i < n2rng->n_ctl_data->n_num_rngs; i++) { in n2rng_ksinit()
103 n2rng->n_ksp->ks_update = n2rng_ksupdate; in n2rng_ksinit()
[all …]
H A Dn2rng_entp_setup.c136 n2rng_logic_test(n2rng_t *n2rng, int rngid) in n2rng_logic_test() argument
144 rng_entry_t *rng = &n2rng->n_ctl_data->n_rngs[rngid]; in n2rng_logic_test()
166 rv = n2rng_collect_diag_bits(n2rng, rngid, &logictest, buffer, in n2rng_logic_test()
196 DBG2(n2rng, DHEALTH, "n2rng: logic error on rng(%d), only %d " in n2rng_logic_test()
199 DBG3(n2rng, DHEALTH, "buffer[%d] %016llx, cycles = %d", in n2rng_logic_test()
204 DBG3(n2rng, DHEALTH, "n2rng: rng(%d) logic test passed, " in n2rng_logic_test()
207 DBG3(n2rng, DCHATTY, "buffer[%d] %016llx, cycles = %d", in n2rng_logic_test()
220 n2rng_collect_metrics(n2rng_t *n2rng, int rngid, n2rng_setup_t *setupp, in n2rng_collect_metrics() argument
236 rv = n2rng_collect_diag_bits(n2rng, rngid, setupp, buffer, bufsize, in n2rng_collect_metrics()
256 collect_rng_perf(n2rng_t *n2rng, int rngid, n2rng_osc_perf_table_t ptable) in collect_rng_perf() argument
[all …]
H A Dn2rng_provider.c66 fips_random(n2rng_t *n2rng, uint8_t *out, size_t nbytes) in fips_random() argument
79 frsp = &n2rng->n_frs.fipsarray[ in fips_random()
80 atomic_inc_32_nv(&n2rng->n_frs.fips_round_robin_j) % in fips_random()
87 if ((rv = n2rng_getentropy(n2rng, (void *)&entropy.as64[1], in fips_random()
97 n2rng_failure(n2rng); in fips_random()
118 frsp = &n2rng->n_frs.fipsarray[ in fips_random()
119 atomic_inc_32_nv(&n2rng->n_frs.fips_round_robin_j) % in fips_random()
134 n2rng_unconfigured(n2rng); in fips_random()
162 n2rng_fips_random_init(n2rng_t *n2rng, fipsrandomstruct_t *frsp) in n2rng_fips_random_init() argument
176 rv = n2rng_getentropy(n2rng, (void *)frsp->XKEY, ROUNDUP(SHA1BYTES, 8)); in n2rng_fips_random_init()
H A Dn2rng_debug.c48 n2rng_dprintf(n2rng_t *n2rng, int level, const char *fmt, ...) in n2rng_dprintf() argument
55 if (n2rng == NULL) { in n2rng_dprintf()
59 ddi_driver_name(n2rng->n_dip), in n2rng_dprintf()
60 ddi_get_instance(n2rng->n_dip), fmt); in n2rng_dprintf()
69 n2rng_error(n2rng_t *n2rng, const char *fmt, ...) in n2rng_error() argument
73 n2rng_dipverror(n2rng->n_dip, fmt, ap); in n2rng_error()
/illumos-gate/usr/src/uts/sun4v/sys/
H A Dn2rng.h157 #define n2rng_setcontrol(n2rng) ((n2rng)->n_flags |= N2RNG_CONTROL) argument
158 #define n2rng_clrcontrol(n2rng) ((n2rng)->n_flags &= ~N2RNG_CONTROL) argument
159 #define n2rng_iscontrol(n2rng) ((n2rng)->n_flags & N2RNG_CONTROL) argument
161 #define n2rng_setfailed(n2rng) ((n2rng)->n_flags |= N2RNG_FAILED) argument
162 #define n2rng_clrfailed(n2rng) ((n2rng)->n_flags &= ~N2RNG_FAILED) argument
163 #define n2rng_isfailed(n2rng) ((n2rng)->n_flags & N2RNG_FAILED) argument
165 #define n2rng_setconfigured(n2rng) ((n2rng)->n_flags |= N2RNG_CONFIGURED) argument
166 #define n2rng_clrconfigured(n2rng) ((n2rng)->n_flags &= ~N2RNG_CONFIGURED) argument
167 #define n2rng_isconfigured(n2rng) ((n2rng)->n_flags & N2RNG_CONFIGURED) argument
169 #define n2rng_setinitialized(n2rng) ((n2rng)->n_flags |= N2RNG_INITIALIZED) argument
[all …]