The NetBSD Project

CVS log for src/sys/arch/arm/rockchip/rk_v1crypto.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / arch / arm / rockchip

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.10 / (download) - annotate - [select for diffs], Fri May 13 09:49:44 2022 UTC (8 months, 3 weeks ago) by riastradh
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm, HEAD
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored)

rkv1crypto(4): Fix units in RNG repeated-output health test.

This code was intended to check whether the two 4-word halves of an
8-word, 32-byte, 256-bit sample were repeated.

Instead, it accidentally checked whether the first 4 _bytes_ of the
two halves were repeated.

The effect was a false alarm rate of 1/2^32, instead of a false alarm
rate of 1/2^128, with no change on the true alarm rate in the event
of an RNG wedged producing all-zero or all-one bits.  1/2^128 is an
acceptable false alarm rate; 1/2^32, not so much.

(The false alarm right might be higher if the samples are not
perfectly uniformly distributed, which they most likey aren't,
although the documentation doesn't give any details other than
suggesting it's a ring oscillator under the hood, which provides
entropy from jitter induced by thermal noise.  This driver records
half a bit of entropy per bit of sample to be reasonably
conservative.)

Revision 1.9 / (download) - annotate - [select for diffs], Fri Apr 8 23:14:21 2022 UTC (9 months, 4 weeks ago) by riastradh
Branch: MAIN
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored)

rk_v1crypto(4): Fix missing `error =' assignment.

This is not likely to fail, but let's avoid suppressing an unlikely
error.

Revision 1.8 / (download) - annotate - [select for diffs], Sat Mar 19 11:37:05 2022 UTC (10 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored)

rnd(9): Adjust IPL of locks used by rndsource callbacks.

These no longer ever run from hard interrupt context or with a spin
lock held, so there is no longer any need to have them at IPL_VM to
block hard interrupts.  Instead, lower them to IPL_SOFTSERIAL.

Revision 1.3.2.1 / (download) - annotate - [select for diffs], Sat Apr 3 22:28:18 2021 UTC (22 months ago) by thorpej
Branch: thorpej-futex
Changes since 1.3: +6 -6 lines
Diff to previous 1.3 (colored) next main 1.4 (colored)

Sync with HEAD.

Revision 1.7 / (download) - annotate - [select for diffs], Wed Jan 27 03:10:19 2021 UTC (2 years ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (colored)

Rename of_match_compat_data() to of_compatible_match().  Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.

Revision 1.6 / (download) - annotate - [select for diffs], Wed Jan 27 02:00:02 2021 UTC (2 years ago) by thorpej
Branch: MAIN
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

Use DEVICE_COMPAT_EOL.

Revision 1.5 / (download) - annotate - [select for diffs], Mon Jan 25 14:20:38 2021 UTC (2 years ago) by thorpej
Branch: MAIN
Changes since 1.4: +3 -4 lines
Diff to previous 1.4 (colored)

Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.

Revision 1.4 / (download) - annotate - [select for diffs], Mon Jan 18 02:35:49 2021 UTC (2 years ago) by thorpej
Branch: MAIN
Changes since 1.3: +6 -5 lines
Diff to previous 1.3 (colored)

Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.

Revision 1.3 / (download) - annotate - [select for diffs], Mon Oct 19 13:44:25 2020 UTC (2 years, 3 months ago) by tnn
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.2: +3 -3 lines
Diff to previous 1.2 (colored)

bus_space_write_4 does not have a return value

Revision 1.2.2.2 / (download) - annotate - [select for diffs], Mon May 18 18:54:30 2020 UTC (2 years, 8 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE
Changes since 1.2.2.1: +388 -0 lines
Diff to previous 1.2.2.1 (colored) next main 1.3 (colored)

Pull up following revision(s) (requested by riastradh in ticket #913):

	sys/arch/arm/dts/rk3399-crypto.dtsi: revision 1.1
	sys/arch/arm/rockchip/rk_v1crypto.c: revision 1.1
	sys/arch/arm/rockchip/rk_v1crypto.c: revision 1.2 (plus patch)
	sys/arch/arm/rockchip/rk_v1crypto.h: revision 1.1
	sys/arch/arm/dts/rk3399-pinebook-pro.dts: revision 1.3
	sys/arch/arm/rockchip/rk3399_cru.c: revision 1.20
	sys/arch/evbarm/conf/GENERIC64: revision 1.158
	sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.11
	sys/arch/arm/rockchip/files.rockchip: revision 1.24

Rockchip crypto engine RNG driver.

As found on the rk3288 and rk3399.  This driver only supports the
TRNG, not the rest of the crypto engine, although it uses the AES unit
to do a self-test at attach time to verify that the engine works.
There seem to be two versions of the Rockchip crypto engine, v1 and
v2; this one is for v1.  Can't name a driver `rkcryptov1' so we'll
clumsily call it `rkv1crypto' instead to leave room for `rkv2crypto'
later on.

The crypto binding derived from the Rockchip BSP Linux kernel, in the
location it appears on the rk3399, is in rk3399-crypto.dtsi, since
there doesn't seem to be a better place to put it at the moment among
this twisty maze of inclusions, all different.

Use rnd_add_data_sync from the callback.

(Doesn't make a difference in HEAD but this is the stated API
contract and it matters if we want to pull this up.)

Prime the pool on attach.

Revision 1.2.2.1, Sun May 17 20:29:39 2020 UTC (2 years, 8 months ago) by martin
Branch: netbsd-9
Changes since 1.2: +0 -386 lines
FILE REMOVED

file rk_v1crypto.c was added on branch netbsd-9 on 2020-05-18 18:54:30 +0000

Revision 1.2 / (download) - annotate - [select for diffs], Sun May 17 20:29:39 2020 UTC (2 years, 8 months ago) by riastradh
Branch: MAIN
Branch point for: netbsd-9
Changes since 1.1: +4 -3 lines
Diff to previous 1.1 (colored)

Use rnd_add_data_sync from the callback.

(Doesn't make a difference in HEAD but this is the stated API
contract and it matters if we want to pull this up.)

Revision 1.1 / (download) - annotate - [select for diffs], Sun May 17 19:57:25 2020 UTC (2 years, 8 months ago) by riastradh
Branch: MAIN

Rockchip crypto engine RNG driver.

As found on the rk3288 and rk3399.  This driver only supports the
TRNG, not the rest of the crypto engine, although it uses the AES unit
to do a self-test at attach time to verify that the engine works.

There seem to be two versions of the Rockchip crypto engine, v1 and
v2; this one is for v1.  Can't name a driver `rkcryptov1' so we'll
clumsily call it `rkv1crypto' instead to leave room for `rkv2crypto'
later on.

The crypto binding derived from the Rockchip BSP Linux kernel, in the
location it appears on the rk3399, is in rk3399-crypto.dtsi, since
there doesn't seem to be a better place to put it at the moment among
this twisty maze of inclusions, all different.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>