diff options
Diffstat (limited to 'include/ec_commands.h')
-rw-r--r-- | include/ec_commands.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h index e56ffad9c1..2411bbfbd3 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -4780,6 +4780,31 @@ struct __ec_align1 ec_params_set_cbi { uint8_t data[]; /* For string and raw data */ }; +/* + * Add entropy to the device secret (stored in the rollback region). + * + * Depending on the chip, the operation may take a long time (e.g. to erase + * flash), so the commands are asynchronous. + */ +#define EC_CMD_ADD_ENTROPY 0x0122 + +enum add_entropy_action { + /* Add entropy to the current secret. */ + ADD_ENTROPY_ASYNC = 0, + /* + * Add entropy, and also make sure that the previous secret is erased. + * (this can be implemented by adding entropy multiple times until + * all rolback blocks have been overwritten). + */ + ADD_ENTROPY_RESET_ASYNC = 1, + /* Read back result from the previous operation. */ + ADD_ENTROPY_GET_RESULT = 2, +}; + +struct __ec_align1 ec_params_rollback_add_entropy { + uint8_t action; +}; + /*****************************************************************************/ /* The command range 0x200-0x2FF is reserved for Rotor. */ |