From: "Cédric Le Goater" <clg@kaod.org>
To: Jan Kiszka <jan.kiszka@siemens.com>, qemu-devel <qemu-devel@nongnu.org>
Cc: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Bin Meng" <bmeng.cn@gmail.com>,
qemu-block@nongnu.org,
"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Jan Lübbe" <jlu@pengutronix.de>,
"Jerome Forissier" <jerome.forissier@linaro.org>,
"Alexander Bulekov" <alxndr@bu.edu>,
"Alistair Francis" <alistair@alistair23.me>,
"Joel Stanley" <joel@jms.id.au>, "Warner Losh" <imp@bsdimp.com>
Subject: Re: [PATCH v5 0/6] sd: Add RPMB emulation to eMMC model
Date: Mon, 20 Oct 2025 09:28:36 +0200 [thread overview]
Message-ID: <c39cc3e2-bbd3-4ac9-a3e3-ac2515fdb141@kaod.org> (raw)
In-Reply-To: <cover.1760702638.git.jan.kiszka@siemens.com>
On 10/17/25 14:03, Jan Kiszka wrote:
> Changes in v5 [1]:
> - fix regression of patch 1 with unplugged SD cards
> - address review comments on documentation
>
> Changes in v4:
> - add truncation warning to mkemmc.sh
> - fix typos in doc and mkemmc.sh
>
> Changes in v3:
> - rebased, dropping merged patches
> - rework image alignment rules to match hardware
> - improve/fix mkemmc script
> - add emmc documentation
>
> Changes in v2:
> - handle write counter expiry
> - assert() availability of QCRYPTO_HASH_ALGO_SHA256
> - add missing SPDX-License-Identifier
>
> This closes an old gap in system integration testing for the very
> complex ARM firmware stacks by adding fairly advanced Replay Protected
> Memory Block (RPMB) emulation to the eMMC device model. Key programming
> and message authentication are working, so is the write counter. Known
> users are happy with the result. What is missing, but not only for RPMB-
> related registers, is state persistence across QEMU restarts. This is OK
> at this stage for most test scenarios, though, and could still be added
> later on.
>
> What can already be done with it is demonstrated in the WIP branch of
> isar-cip-core at [2]: TF-A + OP-TEE + StandaloneMM TA + fTPM TA, used by
> U-Boot and Linux for UEFI variable storage and TPM scenarios. If you
> want to try: build qemu-arm64 target for trixie with 6.12-cip *head*
> kernel, enable secure boot and disk encryption, then run
>
> $ QEMU_PATH=/path/to/qemu-build/ ./start-qemu.sh
>
> Deploy snakeoil keys into PK, KEK and db after first boot to enable
> secure booting:
>
> root@demo:~# cert-to-efi-sig-list PkKek-1-snakeoil.pem PK.esl
> root@demo:~# sign-efi-sig-list -k PkKek-1-snakeoil.key -c PkKek-1-snakeoil.pem PK PK.esl PK.auth
> root@demo:~# efi-updatevar -f PK.auth db
> root@demo:~# efi-updatevar -f PK.auth KEK
> root@demo:~# efi-updatevar -f PK.auth PK
>
> Note that emulation is a bit slow in general, and specifically the
> partition encryption on first boot is taking 20 min. - we should
> probably reduce its size or understand if there is still something to
> optimize.
>
> Jan
>
> [1] https://github.com/siemens/qemu/commits/queues/emmc/
> [2] https://gitlab.com/cip-project/cip-core/isar-cip-core/-/commits/wip/qemu-rpmb
>
> CC: Alexander Bulekov <alxndr@bu.edu>
> CC: Alistair Francis <alistair@alistair23.me>
> CC: Cédric Le Goater <clg@kaod.org>
> CC: Joel Stanley <joel@jms.id.au>
> CC: Warner Losh <imp@bsdimp.com>
>
> Jan Kiszka (6):
> hw/sd/sdcard: Fix size check for backing block image
> hw/sd/sdcard: Allow user-instantiated eMMC
> hw/sd/sdcard: Add basic support for RPMB partition
> hw/sd/sdcard: Handle RPMB MAC field
> scripts: Add helper script to generate eMMC block device images
> docs: Add eMMC device model description
>
> docs/system/device-emulation.rst | 1 +
> docs/system/devices/emmc.rst | 53 +++++
> hw/sd/sd.c | 352 ++++++++++++++++++++++++++++---
> hw/sd/sdmmc-internal.h | 21 ++
> hw/sd/trace-events | 2 +
> scripts/mkemmc.sh | 218 +++++++++++++++++++
> 6 files changed, 618 insertions(+), 29 deletions(-)
> create mode 100644 docs/system/devices/emmc.rst
> create mode 100755 scripts/mkemmc.sh
>
I checked the series on the aspeed tree :
Tested-by: Cédric Le Goater <clg@redhat.com>
Thanks,
C.
next prev parent reply other threads:[~2025-10-20 7:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-17 12:03 [PATCH v5 0/6] sd: Add RPMB emulation to eMMC model Jan Kiszka
2025-10-17 12:03 ` [PATCH v5 1/6] hw/sd/sdcard: Fix size check for backing block image Jan Kiszka
2025-10-20 7:29 ` Cédric Le Goater
2025-10-17 12:03 ` [PATCH v5 2/6] hw/sd/sdcard: Allow user-instantiated eMMC Jan Kiszka
2025-10-27 11:55 ` Daniel P. Berrangé
2025-10-27 12:23 ` Philippe Mathieu-Daudé
2025-10-27 12:35 ` Daniel P. Berrangé
2025-10-27 12:44 ` Philippe Mathieu-Daudé
2025-10-27 12:45 ` Jan Lübbe
2025-10-17 12:03 ` [PATCH v5 3/6] hw/sd/sdcard: Add basic support for RPMB partition Jan Kiszka
2025-10-17 12:03 ` [PATCH v5 4/6] hw/sd/sdcard: Handle RPMB MAC field Jan Kiszka
2025-10-17 12:03 ` [PATCH v5 5/6] scripts: Add helper script to generate eMMC block device images Jan Kiszka
2025-10-17 12:03 ` [PATCH v5 6/6] docs: Add eMMC device model description Jan Kiszka
2025-10-20 7:28 ` Cédric Le Goater [this message]
2025-10-27 11:15 ` [PATCH v5 0/6] sd: Add RPMB emulation to eMMC model Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c39cc3e2-bbd3-4ac9-a3e3-ac2515fdb141@kaod.org \
--to=clg@kaod.org \
--cc=alex.bennee@linaro.org \
--cc=alistair@alistair23.me \
--cc=alxndr@bu.edu \
--cc=bmeng.cn@gmail.com \
--cc=ilias.apalodimas@linaro.org \
--cc=imp@bsdimp.com \
--cc=jan.kiszka@siemens.com \
--cc=jerome.forissier@linaro.org \
--cc=jlu@pengutronix.de \
--cc=joel@jms.id.au \
--cc=philmd@linaro.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).