qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/3] hw/misc: Model ASPEED hash and crypto engine
@ 2021-03-24  7:09 Joel Stanley
  2021-03-24  7:09 ` [PATCH v4 1/3] hw: Model ASPEED's Hash and Crypto Engine Joel Stanley
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Joel Stanley @ 2021-03-24  7:09 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, Cédric Le Goater
  Cc: Andrew Jeffery, Peter Maydell, qemu-arm, qemu-devel

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/20210312182851.1922972-1-f4bug@amsat.org/

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's 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          | 358 +++++++++++++++++++++++++++++++++
 tests/qtest/aspeed_hace-test.c | 313 ++++++++++++++++++++++++++++
 MAINTAINERS                    |   1 +
 hw/misc/meson.build            |   1 +
 tests/qtest/meson.build        |   3 +
 10 files changed, 754 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

-- 
2.30.2



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-03-24  9:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-24  7:09 [PATCH v4 0/3] hw/misc: Model ASPEED hash and crypto engine Joel Stanley
2021-03-24  7:09 ` [PATCH v4 1/3] hw: Model ASPEED's Hash and Crypto Engine Joel Stanley
2021-03-24  7:26   ` Cédric Le Goater
2021-03-24  9:46   ` Philippe Mathieu-Daudé
2021-03-24  7:09 ` [PATCH v4 2/3] aspeed: Integrate HACE Joel Stanley
2021-03-24  7:21   ` Cédric Le Goater
2021-03-24  9:47   ` Philippe Mathieu-Daudé
2021-03-24  7:09 ` [PATCH v4 3/3] tests/qtest: Add test for Aspeed HACE Joel Stanley
2021-03-24  7:21   ` Cédric Le Goater
2021-03-24  9:05     ` Thomas Huth
2021-03-24  7:30 ` [PATCH v4 0/3] hw/misc: Model ASPEED hash and crypto engine no-reply

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).