From: Jorge Ramirez via U-Boot <u-boot@lists.u-boot-project.org>
To: Neil Armstrong <neil.armstrong@linaro.org>
Cc: Peter Robinson <pbrobinson@gmail.com>,
Jorge Ramirez <jorge.ramirez@oss.qualcomm.com>,
trini@konsulko.com, jens.wiklander@linaro.org,
ilias.apalodimas@linaro.org, bhupesh.linux@gmail.com,
n-francis@ti.com, marek.vasut+renesas@mailbox.org,
shawn.lin@rock-chips.com, igor.belwon@mentallysanemainliners.org,
yoshihiro.shimoda.uh@renesas.com, alchark@gmail.com,
tuyen.dang.xa@renesas.com, padmarao.begari@amd.com,
macpaul.lin@mediatek.com, jstephan@baylibre.com, bb@ti.com,
j-mcarthur@ti.com, venkyada@qti.qualcomm.com,
hayashi.kunihiko@socionext.com, dlechner@baylibre.com,
u-boot@lists.denx.de
Subject: Re: [PATCH v2 4/5] optee: rename rpmb.c to rpmb_legacy.c
Date: Wed, 22 Jul 2026 16:35:00 +0200 [thread overview]
Message-ID: <amDVFDwma9_JZ2cN@trex> (raw)
In-Reply-To: <c4846039-2d4d-4436-a4bd-3baf16547319@linaro.org>
On 22/07/26 15:10:16, Neil Armstrong wrote:
> Hi,
>
> On 7/22/26 14:33, Peter Robinson wrote:
> > On Wed, 22 Jul 2026 at 10:46, Jorge Ramirez via U-Boot
> > <u-boot@lists.u-boot-project.org> wrote:
> > >
> > > On 22/07/26 10:27:22, neil.armstrong@linaro.org wrote:
> > > > On 7/22/26 08:07, Jorge Ramirez-Ortiz wrote:
> > > > > This file implements the legacy single-command OPTEE_MSG_RPC_CMD_RPMB
> > > > > supplicant (eMMC only). Rename it to rpmb_legacy.c so the primary rpmb.c
> > > > > name is free for the RPMB subsystem interface added next; pure rename plus
> > > > > its Makefile object, no functional change.
> > > > >
> > > > > Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
> > > > > ---
> > > > > drivers/tee/optee/Makefile | 2 +-
> > > > > drivers/tee/optee/{rpmb.c => rpmb_legacy.c} | 0
> > > > > 2 files changed, 1 insertion(+), 1 deletion(-)
> > > > > rename drivers/tee/optee/{rpmb.c => rpmb_legacy.c} (100%)
> > > > >
> > > > > diff --git a/drivers/tee/optee/Makefile b/drivers/tee/optee/Makefile
> > > > > index 36ac085ef42..8321cf53a19 100644
> > > > > --- a/drivers/tee/optee/Makefile
> > > > > +++ b/drivers/tee/optee/Makefile
> > > > > @@ -3,4 +3,4 @@
> > > > > obj-$(CONFIG_OPTEE) += core.o
> > > > > obj-y += supplicant.o
> > > > > obj-$(CONFIG_DM_I2C) += i2c.o
> > > > > -obj-$(CONFIG_SUPPORT_EMMC_RPMB) += rpmb.o
> > > > > +obj-$(CONFIG_SUPPORT_EMMC_RPMB) += rpmb_legacy.o
> > > > > diff --git a/drivers/tee/optee/rpmb.c b/drivers/tee/optee/rpmb_legacy.c
> > > > > similarity index 100%
> > > > > rename from drivers/tee/optee/rpmb.c
> > > > > rename to drivers/tee/optee/rpmb_legacy.c
> > > >
> > > > Why not rpmb_emmc ?
> > > >
> > > > Neil
> > >
> > > right this is what is confusing about the current abstraction; op-tee has two modes:
> > >
> > > 1. Legacy mode (legacy_operation = true)
> >
> > Does the spec refer to this as legacy mode? Presumably it's RPMB on
> > eMMC vs RPMB on UFS (or presumably also NVME) or the revisions have
> > actual version numbers. Maybe name it after the interface that
> > supports the revision, or the actual revision of the RPMB spec, as
> > opposed to just legacy. What happens when next version comes along, to
> > we rename legacy to old_legacy so we can have new, legacy and
> > old_legacy?
yeah, Neil addressed this below. I agree with you Peter but sometimes
legacy can be appropiately used (I believed that this to be one of
those binary instances).
>
> So I did a small dig and both commands are still referenced in OP-TEE
> and the TEE supplicant.
>
> But indeed the OPTEE_RPC_CMD_RPMB command is only used in the userspace
> TEE supplicant _and_ U-Boot, while Linux uses the other RPMB Frames
> command like this implementation.
>
> In OPTEE the usage of OPTEE_RPC_CMD_RPMB it's explicited as "legacy" in
> https://github.com/OP-TEE/optee_os/blob/991587c721a603e831cad228626078289adad159/core/tee/tee_rpmb_fs.c#L486
> so we can describe it as "Legacy", even if it's not described as legacy
> on in the OP-TEE headers nor in the TEE supplicant.
>
> But, I'll stick to my proposal to rename as rpmb_emmc and rpmb_ufs and
> add a comment in the rpmb_emmc explaining it uses the OPTEE_RPC_CMD_RPMB
> and may need to be add support for the FRAMES commands.
> And the other way around add a small comment in the UFS implementation
> explaining it only supports the FRAMES commands.
I'll push back (one last time), my point being that I expect rpmb_legacy
to disappear where as rpmb_mmc or rpmb_ufs will not (and I see no reason
to keep them in separate files): hence the pursue of a single rpmb.c
if after this you still want to separate rpmb_ufs and rpmb_mmc I'll go
ahead (but we will lose that temporary hint to the op-tee dependency)
next prev parent reply other threads:[~2026-07-22 14:35 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-22 6:07 [PATCH v2 0/5] ufs: rpmb: route OP-TEE RPMB secure storage over UFS Jorge Ramirez-Ortiz via U-Boot
2026-07-22 6:07 ` [PATCH v2 1/5] ufs: decode string descriptors as UTF-16 big-endian Jorge Ramirez-Ortiz via U-Boot
2026-07-22 6:07 ` [PATCH v2 2/5] ufs: add RPMB transport over SCSI SECURITY PROTOCOL Jorge Ramirez-Ortiz via U-Boot
2026-07-22 6:07 ` [PATCH v2 3/5] ufs: derive the per-region RPMB CID and size for OP-TEE Jorge Ramirez-Ortiz via U-Boot
2026-07-22 8:33 ` Neil Armstrong (Linaro) via U-Boot
2026-07-22 9:47 ` Jorge Ramirez via U-Boot
2026-07-22 6:07 ` [PATCH v2 4/5] optee: rename rpmb.c to rpmb_legacy.c Jorge Ramirez-Ortiz via U-Boot
2026-07-22 8:27 ` Neil Armstrong (Linaro) via U-Boot
2026-07-22 9:46 ` Jorge Ramirez via U-Boot
2026-07-22 12:23 ` Jorge Ramirez via U-Boot
2026-07-22 12:33 ` Peter Robinson via U-Boot
2026-07-22 13:10 ` Neil Armstrong via U-Boot
2026-07-22 14:35 ` Jorge Ramirez via U-Boot [this message]
2026-07-23 8:48 ` Neil Armstrong
2026-07-22 6:07 ` [PATCH v2 5/5] optee: implement the RPMB subsystem interface for UFS Jorge Ramirez-Ortiz via U-Boot
2026-07-22 8:31 ` Neil Armstrong (Linaro) via U-Boot
2026-07-22 14:12 ` Jorge Ramirez via U-Boot
2026-07-22 15:43 ` Neil Armstrong via U-Boot
2026-07-22 18:12 ` Jorge Ramirez via U-Boot
2026-07-22 18:44 ` Jorge Ramirez via U-Boot
2026-07-23 7:33 ` Neil Armstrong
2026-07-23 8:01 ` Jorge Ramirez via U-Boot
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=amDVFDwma9_JZ2cN@trex \
--to=u-boot@lists.u-boot-project.org \
--cc=alchark@gmail.com \
--cc=bb@ti.com \
--cc=bhupesh.linux@gmail.com \
--cc=dlechner@baylibre.com \
--cc=hayashi.kunihiko@socionext.com \
--cc=igor.belwon@mentallysanemainliners.org \
--cc=ilias.apalodimas@linaro.org \
--cc=j-mcarthur@ti.com \
--cc=jens.wiklander@linaro.org \
--cc=jorge.ramirez@oss.qualcomm.com \
--cc=jstephan@baylibre.com \
--cc=macpaul.lin@mediatek.com \
--cc=marek.vasut+renesas@mailbox.org \
--cc=n-francis@ti.com \
--cc=neil.armstrong@linaro.org \
--cc=padmarao.begari@amd.com \
--cc=pbrobinson@gmail.com \
--cc=shawn.lin@rock-chips.com \
--cc=trini@konsulko.com \
--cc=tuyen.dang.xa@renesas.com \
--cc=u-boot@lists.denx.de \
--cc=venkyada@qti.qualcomm.com \
--cc=yoshihiro.shimoda.uh@renesas.com \
/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.