[PATCH 0/2] sd: Small improvements around RPMB emulation

Jan Kiszka posted 2 patches 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/cover.1776231967.git.jan.kiszka@siemens.com
Maintainers: "Philippe Mathieu-Daudé" <philmd@linaro.org>, Bin Meng <bmeng.cn@gmail.com>
hw/sd/sd.c        | 23 +++++++++++++++++++++++
scripts/mkemmc.sh |  4 ++--
2 files changed, 25 insertions(+), 2 deletions(-)
[PATCH 0/2] sd: Small improvements around RPMB emulation
Posted by Jan Kiszka 2 weeks ago
Besides a cosmetic fix for the emmc disk image generation script, this
adds a property to the emmc model that allows to preset the
authentication key. And that enables to build OPTEE without key writing
support, bringing the related firmware much closer to real setups.

An alternative to this option would have been persisting additional
state such as the key or the write counter on the disk image as well.
This is still an option for the future, e.g. to model also write
protection groups or other persistent states. As this requires another
format extension of the eMMC disk image, I want for this much simpler
and less invasive approach.

Jan

Jan Kiszka (2):
  scripts: mkemmc.sh: Fix output pollution on missing images
  hw/sd/sdcard: Add support for pre-setting the authentication key

 hw/sd/sd.c        | 23 +++++++++++++++++++++++
 scripts/mkemmc.sh |  4 ++--
 2 files changed, 25 insertions(+), 2 deletions(-)

-- 
2.47.3
Re: [PATCH 0/2] sd: Small improvements around RPMB emulation
Posted by Philippe Mathieu-Daudé 2 weeks ago
(Cc'ing Jerome to his new email)

On 15/4/26 07:46, Jan Kiszka wrote:
> Besides a cosmetic fix for the emmc disk image generation script, this
> adds a property to the emmc model that allows to preset the
> authentication key. And that enables to build OPTEE without key writing
> support, bringing the related firmware much closer to real setups.
> 
> An alternative to this option would have been persisting additional
> state such as the key or the write counter on the disk image as well.
> This is still an option for the future, e.g. to model also write
> protection groups or other persistent states. As this requires another
> format extension of the eMMC disk image, I want for this much simpler
> and less invasive approach.
> 
> Jan
> 
> Jan Kiszka (2):
>    scripts: mkemmc.sh: Fix output pollution on missing images
>    hw/sd/sdcard: Add support for pre-setting the authentication key
> 
>   hw/sd/sd.c        | 23 +++++++++++++++++++++++
>   scripts/mkemmc.sh |  4 ++--
>   2 files changed, 25 insertions(+), 2 deletions(-)
>
Re: [PATCH 0/2] sd: Small improvements around RPMB emulation
Posted by Jerome Forissier 1 week, 6 days ago

On 15/04/2026 22:32, Philippe Mathieu-Daudé wrote:
> (Cc'ing Jerome to his new email)

Thanks :)

> On 15/4/26 07:46, Jan Kiszka wrote:
>> Besides a cosmetic fix for the emmc disk image generation script, this
>> adds a property to the emmc model that allows to preset the
>> authentication key. And that enables to build OPTEE without key writing
>> support, bringing the related firmware much closer to real setups.
>>
>> An alternative to this option would have been persisting additional
>> state such as the key or the write counter on the disk image as well.
>> This is still an option for the future, e.g. to model also write
>> protection groups or other persistent states. As this requires another
>> format extension of the eMMC disk image, I want for this much simpler
>> and less invasive approach.

That's coool! For the series:

Reviewed-by: Jerome Forissier <jerome.forissier@arm.com>

Thanks,
-- 
Jerome

>> Jan
>>
>> Jan Kiszka (2):
>>    scripts: mkemmc.sh: Fix output pollution on missing images
>>    hw/sd/sdcard: Add support for pre-setting the authentication key
>>
>>   hw/sd/sd.c        | 23 +++++++++++++++++++++++
>>   scripts/mkemmc.sh |  4 ++--
>>   2 files changed, 25 insertions(+), 2 deletions(-)
>>
>