OTP Keywriter TISCI Description

This chapter provides information on TISCI message for programming customer keys into eFuse array on K3 devices.

TISCI Message ID Message Name
0x9031 TISCI_MSG_KEY_WRITER

This document must be read alongside Key Writer

API Description

TISCI_MSG_KEY_WRITER - Key writer

Usage

Message Type Secure
Secure Queue Only? Yes

TISCI Message ID

TISCI_MSG_KEY_WRITER          (0x9031U)

struct tisci_msg_keywriter_req

Request message for keywriter

Parameter Type Description
hdr struct tisci_header standard TISCI header
image_addr_lo u32 Lower 32 bit address (in LE format) of the certificate
image_addr_hi u32 Higher 32 bit address (in LE format) of the certificate
key_prog_mask u32 Reserved for future use

The address of the certificate containing customer key information is given as an input to the API.

struct tisci_msg_keywriter_resp

Response message for keywriter

Parameter Type Description
hdr struct tisci_header standard TISCI header
debug_response u32 debug code for success/failure

A debug_response of 0x0 means the key programming was successful, other response codes indicate the point of failure, which can be referred from PDK documentation for OTP Keywriter.

OTP KEY WRITER ERROR CODES

Note

For example a debug_response 0x00000004 would mean that (KEYWR_ERR_DECRYPT_BMPKH) there was an error in decrypting BMPKH extension field

enum keywriter_error_codes

OTP Keywriter error code bit indices

Enum Value Description
KEYWR_ERR_DECRYPT_AES256_KEY 0 Error in Decrypting AES256 key randomly generated by customer
KEYWR_ERR_DECRYPT_BMEK 1 Error in Decrypting BMEK extension field
KEYWR_ERR_DECRYPT_BMPKH 2 Error in Decrypting BMPKH extension field
KEYWR_ERR_DECRYPT_SMEK 3 Error in Decrypting SMEK extension field
KEYWR_ERR_DECRYPT_SMPKH 4 Error in Decrypting SMPKH extension field
KEYWR_ERR_INTERAL_OP 5 Internal Operation Error
KEYWR_ERR_INVALID_EXT_COUNT 6 Invalid extension count in x509 certificate. Either SMPKH, SMEK pair or BMPKH, BMEK, SMPKH, SMEK should be used. Any other combination will trigger error
KEYWR_ERR_PARSE_CERT 7 Error in parsing certificate
KEYWR_ERR_PARSE_FEK 8 Error in parsing TI FEK (appended to TIFS binary, before encryption)
KEYWR_ERR_PARSE_SMPK_CERT 9 Error in parsing SMPK signed certificate (certificate that contains customer key data)
KEYWR_ERR_PROGR_BMEK 10 Error in programming BMEK into SoC eFuses
KEYWR_ERR_PROGR_BMPKH_PART_1 11 Error in programming BMPKH part 1 into SoC eFuses
KEYWR_ERR_PROGR_BMPKH_PART_2 12 Error in programming BMPKH part 2 into SoC eFuses
KEYWR_ERR_PROGR_KEYCOUNT 13 Error in programming KEY COUNT into SoC eFuses
KEYWR_ERR_PROGR_KEYREV 14 Error in programming KEY REV into SoC eFuses
KEYWR_ERR_PROGR_SMEK 15 Error in programming SMEK into SoC eFuses
KEYWR_ERR_PROGR_SMPKH_PART_1 16 Error in programming SMPKH part 1 into SoC eFuses
KEYWR_ERR_PROGR_SMPKH_PART_2 17 Error in programming SMPKH part 2 into SoC eFuses
KEYWR_ERR_VALIDATION_CERT 18 Error validating certificate
KEYWR_ERR_VALIDATION_SMPK_CERT 19 Error validating SMPK signed certificate
KEYWR_ERR_VALIDATION_BMPK_KEY 20 Error validating BMPK key
KEYWR_ERR_VALIDATION_SMPK_KEY 21 Error validating SMPK key
KEYWR_ERR_WRITE_PROT_KEYCOUNT 22 Error write protecting key count row
KEYWR_ERR_WRITE_PROT_KEYREV 23 Error write protecting key revision row
KEYWR_ERR_IMG_INTEG_SMPK_CERT 24 SMPK signed certificate image integrity failed
KEYWR_ERR_PROGR_MSV 25 Error in programming MSV into SoC eFuses
KEYWR_ERR_PROGR_SWREV 26 Error in programming SWREV into SoC eFuses
KEYWR_ERR_PROGR_FW_CFG_REV 27 Error in programming FW CFG REV into SoC eFuses
KEYWR_ERR_DECRYPT_EXT_OTP 28 Error in Decrypting EXT OTP extension field
KEYWR_ERR_PROGR_EXT_OTP 29 Error in programming EXT OTP extension field