[PATCH v3 0/3] hw/misc: Model ASPEED hash and crypto engine

Joel Stanley posted 3 patches 3 years, 1 month ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210312105711.551423-1-joel@jms.id.au
Maintainers: Thomas Huth <thuth@redhat.com>, Andrew Jeffery <andrew@aj.id.au>, Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Joel Stanley <joel@jms.id.au>, "Cédric Le Goater" <clg@kaod.org>, Peter Maydell <peter.maydell@linaro.org>
There is a newer version of this series
docs/system/arm/aspeed.rst     |   2 +-
include/hw/arm/aspeed_soc.h    |   3 +
include/hw/misc/aspeed_hace.h  |  33 ++++
hw/arm/aspeed_ast2600.c        |  14 ++
hw/arm/aspeed_soc.c            |  15 ++
hw/misc/aspeed_hace.c          | 312 +++++++++++++++++++++++++++++++++
tests/qtest/aspeed_hace-test.c | 214 ++++++++++++++++++++++
MAINTAINERS                    |   1 +
hw/misc/meson.build            |   1 +
tests/qtest/meson.build        |   3 +
10 files changed, 597 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
[PATCH v3 0/3] hw/misc: Model ASPEED hash and crypto engine
Posted by Joel Stanley 3 years, 1 month ago
v3: Rework qtest to not use libqtest-single.h, rebase to avoid LPC
conflicts.
v2: Address review from Andrew and Philippe. Adds a qtest.

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 v2 adds a
qtest for the model running as part of the ast2600-evb machine.

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  |  33 ++++
 hw/arm/aspeed_ast2600.c        |  14 ++
 hw/arm/aspeed_soc.c            |  15 ++
 hw/misc/aspeed_hace.c          | 312 +++++++++++++++++++++++++++++++++
 tests/qtest/aspeed_hace-test.c | 214 ++++++++++++++++++++++
 MAINTAINERS                    |   1 +
 hw/misc/meson.build            |   1 +
 tests/qtest/meson.build        |   3 +
 10 files changed, 597 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.1