Skip to contentSkip to conversation

Clarifying the language of VIRTIO_RPMB_REQ_PROGRAM_KEY

virtio-comment Alex Bennée 2 participants 2 messages Jun 12, 2020

lore
Share & tools
lore
#0 lore raw

Hi,

In the virtio-rpmb part of the spec it says:

The operation of a virtio RPMB device is driven by the requests placed on the virtqueue.
The type of request can be program key (VIRTIO_RPMB_REQ_PROGRAM_KEY), get write counter (VIRTIO_RPMB_REQ_GET_WRITE_COUNTER),
write (VIRTIO_RPMB_REQ_DATA_WRITE), and read (VIRTIO_RPMB_REQ_DATA_READ). A program key or write request can also combine with a
result read (VIRTIO_RPMB_REQ_RESULT_READ) for a returned result.

but later on:

VIRTIO_RPMB_REQ_RESULT_READ
requests for a returned result. It is used following with VIRTIO_RPMB_REQ_PROGRAM_KEY or VIRTIO_RPMB_REQ_DATA_WRITE request types for a returned result in one or multiple RPMB frames. If it’s not requested, the device will not return result frame to the driver.

So which is it? I can't quite see how a VIRTIO_RPMB_REQ_RESULT_READ can be combined with the other requests because they are not overlapping bits so maybe the working should be:

A program key or write request can be followed by a result read (VIRTIO_RPMB_REQ_RESULT_READ) for a returned result.

Is that is what is intended?

Signature · 17 lines
Alex Bennée

This publicly archived list offers a means to provide input to the
OASIS Virtual I/O Device (VIRTIO) TC.

In order to verify user consent to the Feedback License terms and
to minimize spam in the list archive, subscription is required
before posting.

Subscribe: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
List archive: https://lists.oasis-open.org/archives/virtio-comment/
Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
Committee: https://www.oasis-open.org/committees/virtio/
Join OASIS: https://www.oasis-open.org/join/
#1 lore raw
Quoted 4 lines

A program key or write request can be followed by a result read
(VIRTIO_RPMB_REQ_RESULT_READ) for a returned result.

Is that is what is intended?

Yes.

RPMB Read/Get Write Counter implicitly requests for a result, so that VIRTIO_RPMB_REQ_RESULT_READ is not required. Actually, it's aligned with the JEDEC spec.

Quoted 41 lines

-----Original Message-----
From: Alex Bennée <[email protected]>
Sent: Friday, June 12, 2020 11:41 PM
To: [email protected]
Cc: Huang, Yang <[email protected]>; Zhu, Bing <[email protected]>; Winkler, Tomas <[email protected]>
Subject: Clarifying the language of VIRTIO_RPMB_REQ_PROGRAM_KEY

Hi,

In the virtio-rpmb part of the spec it says:

The operation of a virtio RPMB device is driven by the requests placed on the
virtqueue.
The type of request can be program key (VIRTIO_RPMB_REQ_PROGRAM_KEY), get write counter (VIRTIO_RPMB_REQ_GET_WRITE_COUNTER),
write (VIRTIO_RPMB_REQ_DATA_WRITE), and read
(VIRTIO_RPMB_REQ_DATA_READ).
A program key or write request can also combine with a
result read (VIRTIO_RPMB_REQ_RESULT_READ) for a returned result.

but later on:

VIRTIO_RPMB_REQ_RESULT_READ
requests for a returned result. It is used following with
VIRTIO_RPMB_REQ_PROGRAM_KEY or VIRTIO_RPMB_REQ_DATA_WRITE
request types for a returned result in one or multiple RPMB frames. If it’s not requested, the device will not return result frame to the driver.

So which is it? I can't quite see how a VIRTIO_RPMB_REQ_RESULT_READ can be combined with the other requests because they are not overlapping bits so maybe the working should be:

A program key or write request can be followed by a result read
(VIRTIO_RPMB_REQ_RESULT_READ) for a returned result.

Is that is what is intended?

--
Alex Bennée