On 22/07/26 11:46:00, Jorge Ramirez wrote: > On 22/07/26 10:27:22, [email protected] 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 <[email protected]> > > > --- > > > 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) > > - Uses the original RPC command OPTEE_RPC_CMD_RPMB. > - No device enumeration — assumes a single, fixed eMMC RPMB device at > - CFG_RPMB_FS_DEV_ID (dev_type = OPTEE_RPC_RPMB_EMMC). > - This is the fallback for older supplicants that don't understand the > probe protocol > > 2. Probe / new mode (legacy_operation = false) > > - Uses OPTEE_RPC_CMD_RPMB_PROBE_RESET + OPTEE_RPC_CMD_RPMB_PROBE_NEXT > to enumerate RPMB devices, then OPTEE_RPC_CMD_RPMB_FRAMES for the > actual frame I/O. > - Supports multiple RPMB devices > - OP-TEE probes all devices first, deferring key provisioning until > every device is examined. > > This PR adds supports for UFS using the new mode of operation that > enumerates devices instead of the legacy mode. > > In the meantime eMMC continues to use the legacy mode. > > So the super-sets are legacy (for emmc) and probe/default (for UFS and > eventually eMMC/NVMe and so on). >
What the patch tries to say (my intention) is that rpmb_legacy.c should not change moving forward and rpmb.c and tee should be extended with eMMC support on the probe path.
