xref: /optee_os/core/include/kernel/tee_common_otp.h (revision fbe66cf83199aa6a2aca9f93384cf1ad9185a5f6)
11bb92983SJerome Forissier /* SPDX-License-Identifier: BSD-2-Clause */
2b0104773SPascal Brand /*
3b0104773SPascal Brand  * Copyright (c) 2014, STMicroelectronics International N.V.
4b0104773SPascal Brand  */
5*fbe66cf8SEtienne Carriere #ifndef __KERNEL_TEE_COMMON_OTP_H
6*fbe66cf8SEtienne Carriere #define __KERNEL_TEE_COMMON_OTP_H
7b0104773SPascal Brand 
857903c16SJerome Forissier #include <stddef.h>
957903c16SJerome Forissier #include <stdint.h>
1057903c16SJerome Forissier #include <string.h>
11daaf4f11SDaniel McIlvaney #include <tee_api_types.h>
12b0104773SPascal Brand #include <utee_defines.h>
13b0104773SPascal Brand 
14b0104773SPascal Brand struct tee_hw_unique_key {
15b0104773SPascal Brand 	uint8_t data[HW_UNIQUE_KEY_LENGTH];
16b0104773SPascal Brand };
17b0104773SPascal Brand 
18daaf4f11SDaniel McIlvaney TEE_Result tee_otp_get_hw_unique_key(struct tee_hw_unique_key *hwkey);
19b0104773SPascal Brand int tee_otp_get_die_id(uint8_t *buffer, size_t len);
20e1afc439SSumit Garg TEE_Result tee_otp_get_ta_enc_key(uint32_t key_type, uint8_t *buffer,
21e1afc439SSumit Garg 				  size_t len);
22b0104773SPascal Brand 
23*fbe66cf8SEtienne Carriere #endif /* __KERNEL_TEE_COMMON_OTP_H */
24