Conversation
| uint8_t reserved[3]; | ||
| } __attribute__((packed, aligned(4))); | ||
|
|
||
| #define EC_PRV_CMD_HAVEN_SET_TPM_MODE 0x0051 |
There was a problem hiding this comment.
I see that the current structure with protocols in protocol directory has the host command definitions for the protocol in specific header files. See
libhoth/protocol/authz_record.h
Line 60 in 699b285
libhoth/protocol/payload_update.h
Line 27 in 699b285
Even though I prefer a centralized list of host command and structures here, I would like the code to be consistent. Would it be a good idea to move this inside the htool_tpm.h?
| .func = htool_get_tpm_mode, | ||
| }, | ||
| { | ||
| .verbs = (const char*[]){"tpm", "set_mode", "disabled", NULL}, |
There was a problem hiding this comment.
nit: Would it be a good idea to make the argument (disabled, tpm_spi, spi_nor_mailbox) to set_mode be a param?
There was a problem hiding this comment.
Would it be a good idea to move parts of this file (which call the host command and process the response, given a device) and corresponding header file inside protocol/ directory?
| @@ -0,0 +1,88 @@ | |||
| // Copyright 2025 Google LLC | |||
| @@ -0,0 +1,31 @@ | |||
| // Copyright 2025 Google LLC | |||
Add set/get TPM host command