[SLOF] [PATCH 01/16] Add a TPM driver implementation
Stefan Berger
stefanb at linux.vnet.ibm.com
Thu Nov 12 08:13:19 AEDT 2015
On 11/10/2015 12:48 PM, Nikunj A Dadhania wrote:
> Stefan Berger <stefanb at linux.vnet.ibm.com> writes:
>>>> + /* response CRQ has been set and valid field cleared */
>>>> +
>>>> + crq.valid = PAPR_VTPM_VALID_COMMAND;
>>>> + crq.msg = PAPR_VTPM_TPM_COMMAND;
>>>> + crq.len = cpu_to_be16(spapr_vtpm.buffer_offset);
>>>> + crq.data = cpu_to_be32((uint64_t)spapr_vtpm.buffer);
>>>> +
>>>> + pfw_drv_state_set(PFW_DRV_STATE_SEND_TPM_CMD,
>>>> + PFW_DRV_ERROR_NO_FAILURE);
>>>> +
>>>> + rc = hv_send_crq(spapr_vtpm.vtpm_unit, (uint64_t *)&crq);
>>>> +
>>>> + if (rc == H_SUCCESS) {
>>>> + pfw_drv_state_set(PFW_DRV_STATE_WAIT_TPM_RSP,
>>>> + PFW_DRV_ERROR_NO_FAILURE);
>>>> + } else {
>>>> + /* per pfw doc, move to wait_init state */
>>> Is this available externally? where ?
>> It's not available externally.
> In that case, is it possible to document the behaviour here in short?
It's not that simple. Basically a state machine is executed by sending
different types of messages via CRQ and depending on the responses, the
driver state and driver error code is to be set to specific values.
Stefan
More information about the SLOF
mailing list