[SLOF] [PATCH v2 2/3] tcgbios: Implement tpm_hash_log_extend_event_buffer

Alexey Kardashevskiy aik at ozlabs.ru
Sat May 9 12:34:40 AEST 2020



On 09/05/2020 07:16, Stefan Berger wrote:
> On 5/7/20 9:11 PM, Alexey Kardashevskiy wrote:
>>
>> On 02/04/2020 01:57, Stefan Berger wrote:
>>
>>>   #endif /* TCGBIOS_H */
>>> diff --git a/lib/libtpm/tpm.code b/lib/libtpm/tpm.code
>>> index 205c608..d67d2c3 100644
>>> --- a/lib/libtpm/tpm.code
>>> +++ b/lib/libtpm/tpm.code
>>> @@ -169,3 +169,22 @@ PRIM(tpm_X2d_measure_X2d_gpt)
>>>       PUSH;
>>>       TOS.n = tpm_measure_gpt();
>>>   MIRP
>>> +
>> Unrelated.
> 
> 
> What do you mean ?


Ignore it, I thought I saw a new isolated empty line when was replying
to the patch, got confused with quotations and wraps.

> 
> 
>>
>>> +/***********************************************************************************************************/
>>>
>>> +/* Firmware
>>> API                                                                                           
>>> */
>>> +/* SLOF:   tpm-hash-log-extend-event-buffer ( pcr evt data-ptr
>>> data-len desc-ptr desclen is_elf -- errcode ) */
>>> +/* LIBTPM: errcode =
>>> tpm-hash-log-extend-event-buffer                                                       
>>> */
>>> +/***********************************************************************************************************/
>>>
>>> +PRIM(tpm_X2d_hash_X2d_log_X2d_extend_X2d_event_X2d_buffer)
>>> +    uint32_t is_elf  = TOS.u; POP;
>>> +    uint32_t desclen = TOS.u; POP;
>>> +    const char *desc = TOS.a; POP;
>>> +    uint64_t datalen = TOS.u; POP;
>>> +    const void *data = TOS.a; POP;
>>> +    uint32_t eventtype = TOS.u; POP;
>>> +    uint32_t pcrindex = TOS.u;
>>> +
>>> +    TOS.n = tpm_hash_log_extend_event_buffer(pcrindex, eventtype,
>>> +                             data, datalen,
>>> +                             desc, desclen, is_elf);
>>> +MIRP
>>> diff --git a/lib/libtpm/tpm.in b/lib/libtpm/tpm.in
>>> index bdbc47d..fb54754 100644
>>> --- a/lib/libtpm/tpm.in
>>> +++ b/lib/libtpm/tpm.in
>>> @@ -28,3 +28,4 @@ cod(tpm20-menu)
>>>   cod(tpm-gpt-set-lba1)
>>>   cod(tpm-gpt-add-entry)
>>>   cod(tpm-measure-gpt)
>>> +cod(tpm-hash-log-extend-event-buffer)
>>>
> 

-- 
Alexey


More information about the SLOF mailing list