Displaying 2 results from an estimated 2 matches for "rpmb_f_write".
2020 Aug 11
2
clarifying the handling of responses for virtio-rpmb
...ioc_cmd cmd[3];
} iseq = {};
void *frame_res = NULL;
int i;
uint32_t flags;
rpmb_dbg("RPMB OP: %s\n", rpmb_op_str(req));
dbg_dump_frame(frame_type, "In Frame: ", frames_in, cnt_in);
i = 0;
flags = RPMB_F_WRITE;
if (req == RPMB_WRITE_DATA || req == RPMB_PROGRAM_KEY)
flags |= RPMB_F_REL_WRITE;
rpmb_ioc_cmd_set(iseq.cmd[i], flags, frames_in, cnt_in);
i++;
if (req == RPMB_WRITE_DATA || req == RPMB_PROGRAM_KEY) {
frame_res = rpmb_fra...
2020 Sep 11
0
[virtio-dev] Re: clarifying the handling of responses for virtio-rpmb
...the frames. Got first no
> request frames on the device side, nothing.)
>
> * Fix descriptor directions. For the outgoing frames num_in was
> incremented instead of num_out.
>
> The frames in the for-loop may be outgoing or intended for incoming
> data. Decided on the RPMB_F_WRITE flag what to do with those frames:
>
> for (i = 0; i < ncmds; i++) {
> ...
>
> if (cmds[i].flags & RPMB_F_WRITE)
> sgs[num_out++ + num_in] = &frame[i];
> else
> sgs[num_out + num_in++] = &frame[i];
>...