diff options
author | Yu Shan <shanyu@google.com> | 2018-08-15 12:07:20 -0700 |
---|---|---|
committer | faqiang.zhu <faqiang.zhu@nxp.com> | 2018-11-12 09:18:36 +0800 |
commit | 9e3b88f8c0809f3e6a3257ff40b7b57ad6bf6965 (patch) | |
tree | dbccbf48ced453f16316299d5e5750405fc4fca0 | |
parent | 5e7a5994395140acb9c3847548b3cc1d8b910fdb (diff) |
Add trusty call to set product id.
Test: Modify imx7d bootloader in b/1074236 and test with new
keymaster app.
Bug: 77873456
Change-Id: I0083630fa44c2c9fd0cabba7e7c1553488579d4e
-rw-r--r-- | include/interface/keymaster/keymaster.h | 1 | ||||
-rw-r--r-- | include/trusty/keymaster.h | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/include/interface/keymaster/keymaster.h b/include/interface/keymaster/keymaster.h index 7b18a64f365..a5e3e8b4c7b 100644 --- a/include/interface/keymaster/keymaster.h +++ b/include/interface/keymaster/keymaster.h @@ -62,6 +62,7 @@ enum keymaster_command { KM_ATAP_SET_CA_RESPONSE_UPDATE = (0x6000 << KEYMASTER_REQ_SHIFT), KM_ATAP_SET_CA_RESPONSE_FINISH = (0x7000 << KEYMASTER_REQ_SHIFT), KM_ATAP_READ_UUID = (0x8000 << KEYMASTER_REQ_SHIFT), + KM_SET_PRODUCT_ID = (0x9000 << KEYMASTER_REQ_SHIFT) }; typedef enum { diff --git a/include/trusty/keymaster.h b/include/trusty/keymaster.h index beb2ff9578f..eadb0d13196 100644 --- a/include/trusty/keymaster.h +++ b/include/trusty/keymaster.h @@ -117,4 +117,14 @@ int trusty_atap_set_ca_response(const uint8_t *ca_response, */ int trusty_atap_read_uuid_str(char **uuid_p); +/* + * SetProductId is only called once to set the secure product id. Caller should + * read the product id from permanent attributes structure and set the product + * id while fusing the permanent attributes. + * + * @product_id: The product id to be set. + * @size: The size of the product id. + */ +int trusty_set_product_id(const uint8_t *product_id, uint32_t size); + #endif /* TRUSTY_KEYMASTER_H_ */ |