Skip to content

hw/misc: Model ASPEED hash and crypto engine

Joel Stanley qemu-arm qemu-devel 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest3 patches 1 replyIn review
  2. v43 patches 6 repliesSuperseded
  3. v33 patches 8 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v23 patches2 repliesSuperseded
v12 patches4 repliesSuperseded

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3hw: Model ASPEED's Hash and Crypto Enginedocs/system/arm/aspeed.rst hw/misc/aspeed_hace.c hw/misc/meson.build +1 more+434 -01 reply
2/3aspeed: Integrate HACEdocs/system/arm/aspeed.rst hw/arm/aspeed_ast2600.c hw/arm/aspeed_soc.c +1 more+34 -10 replies
3/3tests/qtest: Add test for Aspeed HACEMAINTAINERS tests/qtest/aspeed_hace-test.c tests/qtest/meson.build+473 -00 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchCédric Le GoaterPhilippe Mathieu-DaudéKlaus Heinrich KiwiThomas HuthAndrew Jeffery
1/3R-b R-b R-b
2/3R-b R-b R-b R-b
3/3R-b R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v5 thread

Cover letter [PATCH v5 0/3] hw/misc: Model ASPEED hash and crypto engine

This version of the series adds the cleanups Cédric made and the scatter gather feature that Klaus implemented. I took inspiration from Klaus's patches and reworked the direct hashing mode to easier implement both sg and direct modes.

The r-b tags are preserved as the changes were minor. I welcome further review though if you have time.

v5: Merge scatter gather feature
v4: Rebase on Philippe's memory region cleanup series [1]
Address feedback from Cédric
Rework qtest to run on ast2400, ast2500 and ast2600
v3: Rework qtest to not use libqtest-single.h, rebase to avoid LPC conflicts.
v2: Address review from Andrew and Philippe. Adds a qtest.

[1] https://lore.kernel.org/qemu-devel/[email protected]/

This adds a model for the ASPEED hash and crypto engine (HACE) found on all supported ASPEED SoCs.

The model uses Qemu's gcrypto API to perform the SHA and MD5 hashing directly in the machine's emulated memory space, which I found a neat use of Qemu's features.

It has been tested using u-boot and from Linux userspace, and adds a qtest for the model running as part of the ast2600-evb, ast2500-evb and palmetto-bmc (to test ast2400) machines.

Note that the tests will fail without Philippe/Cédric's memory region series.

Joel Stanley (3):
hw: Model ASPEED's Hash and Crypto Engine
aspeed: Integrate HACE
tests/qtest: Add test for Aspeed HACE

 docs/system/arm/aspeed.rst     |   2 +-
 include/hw/arm/aspeed_soc.h    |   3 +
 include/hw/misc/aspeed_hace.h  |  43 +++
 hw/arm/aspeed_ast2600.c        |  15 ++
 hw/arm/aspeed_soc.c            |  16 ++
 hw/misc/aspeed_hace.c          | 389 +++++++++++++++++++++++++++
 tests/qtest/aspeed_hace-test.c | 469 +++++++++++++++++++++++++++++++++
 MAINTAINERS                    |   1 +
 hw/misc/meson.build            |   1 +
 tests/qtest/meson.build        |   3 +
 10 files changed, 941 insertions(+), 1 deletion(-)
 create mode 100644 include/hw/misc/aspeed_hace.h
 create mode 100644 hw/misc/aspeed_hace.c
 create mode 100644 tests/qtest/aspeed_hace-test.c
Signature · 1 line
2.30.2