RE: [PATCH v2 8/8] scsi: ufs: connect to RPMB subsystem

From: Winkler, Tomas
Date: Fri Apr 08 2016 - 16:34:05 EST


>
> On 4/7/2016 10:15 PM, Winkler, Tomas wrote:
> > On Wed, 2016-04-06 at 09:51 +0100, Joao Pinto wrote:
> >> Hi!
> >>
> >> On 4/4/2016 12:11 PM, Tomas Winkler wrote:
> >>> Register UFS RPMB LUN with the RPMB subsystem and provide
> >>> implementation for the RPMB access operations. RPMB partition is
> >>> accessed via a sequence of security protocol in and security
> >>> protocol out commands with UFS specific parameters. This multi step
> >>> process is abstracted into 4 basic RPMB commands.
> >>
> >> [snip]
> >>
> >>> * "UFS device" W-LU.
> >>> */
> >>> struct scsi_device *sdev_ufs_device;
> >>> + struct scsi_device *sdev_ufs_rpmb;
> >>>
> >>> enum ufs_dev_pwr_mode curr_dev_pwr_mode;
> >>> enum uic_link_state uic_link_state;
> >>>
> >>
> >> I have a UFS device emulator that has the RPMB capability. What are
> >> the expected good results for me to validate?
> >
> > Hi Joao, thanks for that. I'm attaching an archive with few basic
> > samples via user space interface.
> > You should run the program key first (program-key.sh), just don't do
> > it on a real device it's one in life time operation.
> >
>
> Managed to cross-compile to ARC and execute your test app in my platform.
> I made it in Buildroot, so I have the patches to enable the tool cross-
> compilation if necessary in the future.
>

Sounds like fun :)
I've just tried to follow the standard under tools, though this it's not something really generic which was surpising to me as this is in the kernel tree.

> The tool execution gives no errors, but also no info. I suggest you had success
> info and maybe some statistic (e.g. bytes read or written).

It did have some verbose print outs on both ends, but I've cleaned it out. It was meant to be an example rather than unit testing tool, but we can repurpose it.

Thanks
Toma

Thanks
Tomas