From: Jorge Ramirez <jorge.ramirez@oss.qualcomm.com>
To: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
Cc: dlechner@baylibre.com, trini@konsulko.com,
jens.wiklander@linaro.org, ilias.apalodimas@linaro.org,
peng.fan@nxp.com, jh80.chung@samsung.com,
tanmay.kathpalia@altera.com, neil.armstrong@linaro.org,
bhupesh.linux@gmail.com, n-francis@ti.com, xypron.glpk@gmx.de,
s-vadapalli@ti.com, michal.simek@amd.com, jbx6244@gmail.com,
marek.vasut+renesas@mailbox.org, sumit.garg@oss.qualcomm.com,
jens.wiklander@oss.qualcomm.com, u-boot@lists.u-boot-project.org
Subject: Re: [PATCH v5 0/6] ufs: rpmb: route OP-TEE RPMB secure storage over UFS
Date: Fri, 18 Sep 2026 22:15:20 +0200 [thread overview]
Message-ID: <aq2b2AspOcySKRvl@trex> (raw)
In-Reply-To: <20260918200641.2286077-1-jorge.ramirez@oss.qualcomm.com>
On 18/09/26 22:06:32, Jorge Ramirez-Ortiz wrote:
> OP-TEE secure storage (CFG_RPMB_FS) relies on an RPMB partition, but
> U-Boot's OP-TEE RPMB supplicant only speaks the legacy single-command
> interface, which is bound to eMMC. SoCs that are UFS-only and have no
> eMMC (for example the Qualcomm SA8775P) therefore cannot back OP-TEE
> secure storage from U-Boot today. This series adds that support.
>
> It introduces the transport-agnostic OP-TEE RPMB "subsystem" interface
> (PROBE_RESET / PROBE_NEXT / FRAMES), where the normal world enumerates
> the RPMB device and reports its kind, size and CID, then carries the
> signed frames. The legacy eMMC supplicant is preserved unchanged, only
> renamed to rpmb_emmc.c, with the new UFS backend added as a separate
> rpmb_ufs.c; the two are mutually exclusive via Kconfig (SUPPORT_UFS_RPMB
> depends on !SUPPORT_EMMC_RPMB) because the OP-TEE supplicant handles a
> single RPMB transport. The subsystem interface is UFS-only for now; eMMC
> can be migrated onto it later as the legacy path is retired.
>
> On top of that it adds a UFS RPMB transport that moves JEDEC RPMB frames
> to and from the RPMB Well-Known LUN using SCSI SECURITY PROTOCOL IN/OUT.
> The per-region 16-byte CID is derived by BLAKE2b-hashing the exact
> device-id string the Linux kernel builds (ufshcd_create_device_id()
> plus a "-R<region>" suffix), so OP-TEE derives an RPMB key that matches
> the one Linux would use.
>
> The first patch is a standalone UFS descriptor fix the RPMB path depends
> on (UTF-16BE string decoding). A small preparatory patch surfaces the
> RESPONSE UPIU sense data from ufs_scsi_exec() so the transport can retry
> only on a power-on UNIT ATTENTION; the transport patch also bounces
> unaligned frames through a DMA-aligned buffer for the RPMB WLUN.
>
> Note: reading UFS descriptors reliably also requires the descriptor
> data-segment cache-invalidation fix, which has already been posted and
> merged separately, so this series is based on top of it.
>
> Tested on the Qualcomm IQ-9075-EVK (SA8775P): OP-TEE with CFG_RPMB_FS
> programs the RPMB key through U-Boot and reads/writes secure-storage
> objects, with the derived CID matching the Linux UFS device_id ABI.
>
> Dependencies:
> Linux kernel:
> https://lore.kernel.org/linux-scsi/20260716083728.2226422-1-jorge.ramirez@oss.qualcomm.com/
accepted in v4 --> https://lkml.org/lkml/2026/8/27/369
> Op-tee
> https://github.com/OP-TEE/optee_os/pull/7881
and also following Ilias review https://github.com/OP-TEE/optee_os/pull/8007 (both merged)
For reference, at this point Linux can access RPMB and just u-boot pending on this set.
next prev parent reply other threads:[~2026-09-18 20:15 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-18 20:06 [PATCH v5 0/6] ufs: rpmb: route OP-TEE RPMB secure storage over UFS Jorge Ramirez-Ortiz
2026-09-18 20:06 ` [PATCH v5 1/6] ufs: decode string descriptors as UTF-16 big-endian Jorge Ramirez-Ortiz
2026-09-18 20:06 ` [PATCH v5 2/6] ufs: surface sense data from ufs_scsi_exec() Jorge Ramirez-Ortiz
2026-10-02 11:16 ` Ilias Apalodimas
2026-10-13 17:48 ` Jorge Ramirez
2026-10-13 17:51 ` Tom Rini
2026-09-18 20:06 ` [PATCH v5 3/6] ufs: add RPMB transport over SCSI SECURITY PROTOCOL Jorge Ramirez-Ortiz
2026-09-29 3:29 ` Stanley Jhu
2026-09-18 20:06 ` [PATCH v5 4/6] ufs: derive the per-region RPMB CID and size for OP-TEE Jorge Ramirez-Ortiz
2026-09-18 20:06 ` [PATCH v5 5/6] optee: rename rpmb.c to rpmb_emmc.c Jorge Ramirez-Ortiz
2026-10-02 11:14 ` Ilias Apalodimas
2026-09-18 20:06 ` [PATCH v5 6/6] optee: implement the RPMB subsystem interface for UFS Jorge Ramirez-Ortiz
2026-10-02 11:14 ` Ilias Apalodimas
2026-09-18 20:15 ` Jorge Ramirez [this message]
2026-09-24 17:50 ` [PATCH v5 0/6] ufs: rpmb: route OP-TEE RPMB secure storage over UFS Macpaul Lin (林智斌)
2026-09-25 9:59 ` Ilias Apalodimas
2026-09-26 20:41 ` Jorge Ramirez
2026-09-26 21:08 ` Jorge Ramirez
2026-09-28 7:32 ` Jens Wiklander
2026-09-28 10:02 ` Ilias Apalodimas
-- strict thread matches above, loose matches on Subject: below --
2026-09-29 8:35 Macpaul Lin (林智斌)
[not found] <6abb787b.db7c5649.307e91.b4fcSMTPIN_ADDED_BROKEN@mx.google.com>
2026-10-02 8:33 ` Ilias Apalodimas
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=aq2b2AspOcySKRvl@trex \
--to=jorge.ramirez@oss.qualcomm.com \
--cc=bhupesh.linux@gmail.com \
--cc=dlechner@baylibre.com \
--cc=ilias.apalodimas@linaro.org \
--cc=jbx6244@gmail.com \
--cc=jens.wiklander@linaro.org \
--cc=jens.wiklander@oss.qualcomm.com \
--cc=jh80.chung@samsung.com \
--cc=marek.vasut+renesas@mailbox.org \
--cc=michal.simek@amd.com \
--cc=n-francis@ti.com \
--cc=neil.armstrong@linaro.org \
--cc=peng.fan@nxp.com \
--cc=s-vadapalli@ti.com \
--cc=sumit.garg@oss.qualcomm.com \
--cc=tanmay.kathpalia@altera.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.u-boot-project.org \
--cc=xypron.glpk@gmx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.