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.4.1 / (download) - annotate - [select for diffs], Tue May 2 21:31:56 2023 UTC (11 months, 2 weeks ago) by martin
Branch: netbsd-10
CVS Tags: netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1
Changes since 1.10: +23 -5 lines
Diff to previous 1.10 (colored) next main 1.11 (colored) to selected 1.1 (colored)

Pull up following revision(s) (requested by mrg in ticket #154):

	sys/arch/arm/dts/rk3328-crypto.dtsi: revision 1.1
	sys/arch/arm/dts/rk3328-rock64.dts: revision 1.8
	sys/arch/arm/rockchip/rk3328_cru.c: revision 1.10
	sys/arch/arm/rockchip/rk_v1crypto.c: revision 1.11

enable rkv1crypto on rock64.

this comes from upstream d1152bc533c941f7e267bf53d344cee510ea2808.
(i tried to make this be in rk3328.dtsi so all rk3328 boards would
benefit, but it doesn't work, and this is the only one have to test.)

adjust rkv1crypto to support a per-platform clocks setup.

Revision 1.11 / (download) - annotate - [select for diffs], Mon Apr 24 05:16:01 2023 UTC (11 months, 3 weeks ago) by mrg
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, HEAD
Changes since 1.10: +23 -5 lines
Diff to previous 1.10 (colored) to selected 1.1 (colored)

enable rkv1crypto on rock64.

this comes from upstream d1152bc533c941f7e267bf53d344cee510ea2808.

(i tried to make this be in rk3328.dtsi so all rk3328 boards would
benefit, but it doesn't work, and this is the only one have to test.)

adjust rkv1crypto to support a per-platform clocks setup.

Revision 1.10 / (download) - annotate - [select for diffs], Fri May 13 09:49:44 2022 UTC (23 months ago) by riastradh
Branch: MAIN
CVS Tags: netbsd-10-base, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Branch point for: netbsd-10
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored) to selected 1.1 (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 (2 years ago) by riastradh
Branch: MAIN
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored) to selected 1.1 (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 (2 years ago) by riastradh
Branch: MAIN
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored) to selected 1.1 (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 (3 years ago) by thorpej
Branch: thorpej-futex
Changes since 1.3: +6 -6 lines
Diff to previous 1.3 (colored) next main 1.4 (colored) to selected 1.1 (colored)

Sync with HEAD.

Revision 1.7 / (download) - annotate - [select for diffs], Wed Jan 27 03:10:19 2021 UTC (3 years, 2 months 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) to selected 1.1 (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 (3 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored) to selected 1.1 (colored)

Use DEVICE_COMPAT_EOL.

Revision 1.5 / (download) - annotate - [select for diffs], Mon Jan 25 14:20:38 2021 UTC (3 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.4: +3 -4 lines
Diff to previous 1.4 (colored) to selected 1.1 (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 (3 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.3: +6 -5 lines
Diff to previous 1.3 (colored) to selected 1.1 (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 (3 years, 5 months ago) by tnn
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.2: +3 -3 lines
Diff to previous 1.2 (colored) to selected 1.1 (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 (3 years, 10 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) to selected 1.1 (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 (3 years, 11 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 (3 years, 11 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 - [selected], Sun May 17 19:57:25 2020 UTC (3 years, 11 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>