This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM6411: Writing extended OTP from keywriter binary

Part Number: AM6411
Other Parts Discussed in Thread: SYSCONFIG

Hi,

Using TI OTP key writer binary, I created certificate with extended OTP data by passing parameters:

--ext-otp ./ext_otp_data.bin --ext-otp-indx 0 --ext-otp-size 1024

Where ext_otp_data.bin is simple binary containing 1024 bits of OTP data.  When I boot up processor from tiboot3.bin with extended OTP data bytes, then keywriter stops with negative response:

Enabled VPP
keys Certificate found: 0x70045100
Keywriter Debug Response:0x20000000

Keywriter binary works, if built without explicit extended OTP data information in binary (or certificate).

I believe error is KEYWR_ERR_PROGR_MSV, but MSV details are same in both cases.

Keywriter SDK: 09.00.00.31

TI ARM LLVM: 2.1.3.LTS

Sysconfig: 1.17.0.3128

CCS: 12.4.0

  • Hello,

    Keywriter Debug Response:0x20000000

    According to the following guide, the error is "KEYWR_ERR_PROGR_EXT_OTP 29 Error in programming EXT OTP extension field"

    https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/security/keywriter.html#otp-key-writer-error-codes

    Could you please share the following

    Also, is it the first time you are writing Extended OTP using the Keywriter?

    Thanks!

  • --ext-otp ./ext_otp_data.bin --ext-otp-indx 0 --ext-otp-size 1024

    What is the reason for using 1024 here?

    The size of the Extended OTP on AM64/243 devices is only 384 bits.

  • Prashant, keywriter certificate binary is shared in TI drive via mailchain

    Regards,

    Yasir

  • I do not see any issue in the certificate. I would like to have the answer to my last query?

    There are only 384 bits so the customer should only try to program those bits. It would be helpful if it could be tested before the meeting.

  • Hi Prashant,

    Attaching SYSFW logs (ExtOTPUpdateFail.txt) and keywriter certificate binary (final_certificate.txt) for your reference.  Please rename final_certifiate.txt to final_certificate.cer to look at its contents.

    Command used to generate certificate:

    ./gen_keywr_cert_auto.sh --tifek "$PUB_TIFEK" \
    --smpk "$PUB_KEY_TO_FUSE" \
    --keycnt 1 \
    --keyrev 1 \
    --cert "$CERT_NAME_PATH" \
    --ext-otp ext_otp_data.bin \
    --ext-otp-indx 0 \
    --ext-otp-size 1024 \
    PUB_TIFEK = ti_fek_public.pem
    PUB_KEY_TO_FUSE = rsa.key (custom generated)
    CERT_NAME_PATH = path to final_certificate.bin
    This is not first time using OTP writer, first time enabling extended OTP option.

    >> Start of SYSFW logs 1...
    
    0x63818001
              0x62C0005B
                        0x64018001
                                  0x600000A3
                                            0x63808001
                                                      0x62C0005C
                                                                0x64008001
                                                                          0x600000A4
                                                                                    0x63808002
                                                                                              0x62C0005D
                                                                                                        0x64008002
                                                                                                                  0x63D00010
                                                                                                                            0x64500010
                                                                                                                                      0x63D08001
                                                                                                                                                0x63D04002
                                                                                                                                                          0x64508001
                                                                                                                                                                    0x63100016
                                                                                                                                                                              0x64504002
                                                                                                                                                                                        0x63D0C002
                                                                                                                                                                                                  0x6450C002
                                                                                                                                                                                                            0x63D10002
                                                                                                                                                                                                                      0x64510002
                                                                                                                                                                                                                                0x63C00050
                                                                                                                                                                                                                                          0x64400050
       0x63C04001
                 0x64404001
                           0x6300005E
                                     0x63C08003
                                               0x64408003
                                                         0x63C0C005
                                                                   0x6440C005
                                                                             0x63C18002
                                                                                       0x64418002
                                                                                                 0x63C20004
                                                                                                           0x64420004
                                                                                                                     0x63C38002
                                                                                                                               0x64438002
                                                                                                                                         0x63C60004
                                                                                                                                                   0x64460004
                                                                                                                                                             0x63C64003
                                                                                                                                                                       0x64464003
                                                                                                                                                                                 0x68400000
                                                                                                                                                                                           0x62C0005D
                                                                                                                                                                                                     0x64014000
                                                                                                                                                                                                               0x6400C004
                                                                                                                                                                                                                         0x62C0005E
                                                                                                                                                                                                                                   0x60800099
                                                                                                                                                                                                                                             0x60000039
          0x63814000
                    0x6380C004
                              0xC20202
                                      0xC20024
                                              0x61800202
                                                        0x61C00039
                                                                  0x62000000
                                                                            0xC20201
                                                                                    0xC20024
                                                                                            0x61800201
                                                                                                      0x61C00092
                                                                                                                0xC20101
                                                                                                                        0xC20024
                                                                                                                                0x61800101
                                                                                                                                          0x61C00439
                                                                                                                                                    0xC20104
                                                                                                                                                            0xC20024
                                                                                                                                                                    0x61800104
                                                                                                                                                                              0x61C00439
                                                                                                                                                                                        0xC20103
                                                                                                                                                                                                0xC20024
                                                                                                                                                                                                        0x61800103
                                                                                                                                                                                                                  0x61C00439
                                                                                                                                                                                                                            0xC20100
                                                                                                                                                                                                                                    0xC20024
                                                                                                                                                                                                                                            0x61800100
         0x61C00439
                   0x62000000
                             0x60C00099
                                       0xC20102
                                               0xC20024
                                                       0x61800102
                                                                 0x61C00439
                                                                           0x62000002
                                                                                     0xC2010D
                                                                                             0xC20024
                                                                                                     0x6180010D
                                                                                                               0x61C00439
                                                                                                                         0x612B7C5A
                                                                                                                                   0xC2010C
                                                                                                                                           0xC20024
                                                                                                                                                   0x6180010C
                                                                                                                                                             0x61C00439
                                                                                                                                                                       0x612B7C5A
                                                                                                                                                                                 0x612B7C5A
                                                                                                                                                                                           0xC20101
                                                                                                                                                                                                   0xC20024
                                                                                                                                                                                                           0x61800101
                                                                                                                                                                                                                     0x61C00092
                                                                                                                                                                                                                               0xC20104
                                                                                                                                                                                                                                       0xC20024
                                                                                                                                                                                                                                               0x61800104
            0x61C00092
                      0xC20103
                              0xC20024
                                      0x61800103
                                                0x61C00092
                                                          0xC20100
                                                                  0xC20024
                                                                          0x61800100
                                                                                    0x61C00092
                                                                                              0x62000000
                                                                                                        0x60C000B9
                                                                                                                  0x60C000B2
                                                                                                                            0xC20102
                                                                                                                                    0xC20024
                                                                                                                                            0x61800102
                                                                                                                                                      0x61C00092
                                                                                                                                                                0x62000001
                                                                                                                                                                          0xC2010D
                                                                                                                                                                                  0xC20024
                                                                                                                                                                                          0x6180010D
                                                                                                                                                                                                    0x61C00092
                                                                                                                                                                                                              0x61276CB2
                                                                                                                                                                                                                        0xC2010C
                                                                                                                                                                                                                                0xC20024
                                                                                                                                                                                                                                        0x6180010C
     0x61C00092
               0x61276CB2
                         0x61276CB2
                                   0x409031
                                           0x800023
                                                   #
                                                    # Decrypting extensions..
                                                                             #
                                                                              MPK Options:  0x0
                                                                                               MEK Options:  0x0
                                                                                                                MPK Opt P1:  0x0
                                                                                                                                MPK Opt P2:  0x0
                                                                                                                                                MEK Opt   :  0x0
                                                                                                                                                                * SMPKH Part 1 BCH code: a0ce3d53
    
                                                                                                                                                                                                 * SMPKH Part 2 BCH code: 007a02b8
    
                                                                                                                                                                                                                                  * SMPK Hash (part-1,2):
    
            197e1e6963fc2e0442975299b86ccae0bfa7a3506f3d9845984f25882812260a00
    
                                                                              d84cc82b591e852842cf4679844ec96ae6778d3ac878f2e9c5b6142407112b2b00
    
                                                                                                                                                SMEK extension programming disabled
                                                                                                                                                                                   * EXT OTP Hash: ab322aef843f77064566ea8827b9e2eb4056342dd9c13331f13699f6d5300295cbdf3a45a85cc629a66877a3ad9958f430907c22f36dc58b76ac740ff2c5a48a
    
                                                                                      MSV extension programming disabled
    
                                                                                                                        * KEY CNT: 01010000
    
                                                                                                                                           * KEY REV: 01010000
    
                                                                                                                                                              SWREV extension programming disabled
    
                                                                                                                                                                                                  FW CFG REV extension programming disabled
    
                                                                                                                                                                                                                                           * KEYWR VERSION:  0x20000
    
                       #
                        # Programming Keys..
                                            #
    
                                             * MSV:
                                                    [u32] bch + msv:  0x0
                                                                         MSV extension programming disabled
                                                                                                           [u32] bch + msv:  0x0
    
                                                                                                                                * SWREV:
                                                                                                                                         [u32] SWREV-SBL:  0x1
                                                                                                                                                              [u32] SWREV-SYSFW  :  0x1
                                                                                                                                                                                       SWREV extension programming disabled
                                                                                                                                                                                                                           [u32] SWREV-SBL:  0x1
                                                                                                                                                                                                                                                [u32] SWREV-SYSFW  :  0x1
    
                            * FW CFG REV:
                                          [u32] SWREV-FW-CFG-REV:  0x1
                                                                      SWREV SEC BCFG extension programming disabled
                                                                                                                   [u32] SWREV-FW-CFG-REV:  0x1
    
                                                                                                                                               * EXT OTP:
                                                                                                                                                          can't program, efuse row is WP:  0x80
                                                                                                                                                                                               can't program, efuse row is WP:  0x81
                                                                                                                                                                                                                                    can't program, efuse row is WP:  0x82
                            can't program, efuse row is WP:  0x83
                                                                 can't program, efuse row is WP:  0x84
                                                                                                      can't program, efuse row is WP:  0x85
                                                                                                                                           can't program, efuse row is WP:  0x86
                                                                                                                                                                                can't program, efuse row is WP:  0x87
                                                                                                                                                                                                                     can't program, efuse row is WP:  0x88
             can't program, efuse row is WP:  0x89
                                                  can't program, efuse row is WP:  0x8A
                                                                                       can't program, efuse row is WP:  0x8B
                                                                                                                            can't program, efuse row is WP:  0x8C
                                                                                                                                                                 can't program, efuse row is WP:  0x8D
                                                                                                                                                                                                      can't program, efuse row is WP:  0x8E
                                                                                                                                                                                                                                           can't program, efuse row is WP:  0x8F
                                   can't program, efuse row is WP:  0x90
                                                                        can't program, efuse row is WP:  0x91
                                                                                                             can't program, efuse row is WP:  0x92
                                                                                                                                                  can't program, efuse row is WP:  0x93
                                                                                                                                                                                       can't program, efuse row is WP:  0x94
                                                                                                                                                                                                                            can't program, efuse row is WP:  0x95
                    can't program, efuse row is WP:  0x96
                                                         can't program, efuse row is WP:  0x97
                                                                                              can't program, efuse row is WP:  0x98
                                                                                                                                   Programmed 16/41 rows successfully
                                                                                                                                                                     Error in programming EXT OTP
                                                                                                                                                                                                 debug_response:  0x20000000
                                                                                                                                                                                                                            09C
                                                                                                                                                                                                                               0x6380004E
                                                                                                                                                                                                                                         0x62C00059
      0x6400004E
                0x6080003E
                          0x608000DB
                                    0x608000E0
                                              0x608000E1
                                                        0x6080003A
                                                                  0x608000C1
                                                                            0x608000CD
                                                                                      0x60800040
                                                                                                0x60800041
                                                                                                          0x60800042
                                                                                                                    0x60800043
                                                                                                                              0x60800044
                                                                                                                                        0x60800045
                                                                                                                                                  0x6080002C
                                                                                                                                                            0x6080002D
                                                                                                                                                                      0x60800005
                                                                                                                                                                                0x6080000D
                                                                                                                                                                                          0x60800014
                                                                                                                                                                                                    0x60800016
                                                                                                                                                                                                              0x60800018
                                                                                                                                                                                                                        0x6080001A
                                                                                                                                                                                                                                  0x6080001C
                                                                                                                                                                                                                                            0x6080001E
         0x60800020
                   0x60800021
                             0x60800022
                                       0x608000C0
                                                 0x6000009D
                                                           0x608000B8
                                                                     0x608000BF
                                                                               0x6000009E
                                                                                         0x6380004F
                                                                                                   0x62C0005A
                                                                                                             0x6400004F
                                                                                                                       0x600000A0
                                                                                                                                 0x6390000F
                                                                                                                                           0x62D00015
                                                                                                                                                     0x6410000F
                                                                                                                                                               0x60800090
                                                                                                                                                                         0x6080006F
                                                                                                                                                                                   0x60800070
                                                                                                                                                                                             0x60800071
                                                                                                                                                                                                       0x60800072
                                                                                                                                                                                                                 0x60800073
                                                                                                                                                                                                                           0x608000B1
                                                                                                                                                                                                                                     0x60800069
                                                                                                                                                                                                                                               0x600000A1
    >> End of SYSFW logs!!!
    0��0�
    Š	�戚�ۇ����]ia�k �0
    	*�H��
    
    0��10	UoR10	Urx10U
    gQE843yQV0sag1+0)U
    "dqhGYAQ2Y4gFfCq0t1yABCYxex9eAxt71f10Ua87RB35W10Ux0FSqGTPWbGpuiV110/	*�H��
    	"kFp5uGcgWXxcfxi@vsHs9C9qQWGrBs.com0
    260421080608Z
    260521080608Z0��10	UoR10	Urx10U
    gQE843yQV0sag1+0)U
    "dqhGYAQ2Y4gFfCq0t1yABCYxex9eAxt71f10Ua87RB35W10Ux0FSqGTPWbGpuiV110/	*�H��
    	"kFp5uGcgWXxcfxi@vsHs9C9qQWGrBs.com0�"0
    	*�H��
    �0�
    ���w�b3�'�}>�.�+�u�Y^�!�58����,e����|��uW ��K�Ī�ʟ�wF�h�$�h��sk#����+:��/�"Q�S�l�\0,��:'�O��؞g©L��3R�� FX���	�0;�"㣔��W��!��fΠj��])5�:T�H19o�kpqd3R���5�9)���p�����E���#Ytg�ҵ�2�p�J�c�7���Z>�U�0�k�_K��GS�$��)�mH�l��1�%'��Iq?[Y�ԉ���A��7xW']ξ����LAg��%}�m�]��͌*(���<{޾����1�w}M �X�r���Ҟ}��3	����:���:&��i��hd1�a�Z�y�2"��|w‰E��~�>����DM�R�o˙��n��!�hʞd[*	�ݗ_Nc>B?W�I�7��c[� ��&\�RSz�ۖ���4��P[B�8��LR+�V�L
    ��.FY���� ]��#{ʄd�/a�����j���	�0�	�0U0�0�	+�&@�0��!Z�����\�{���YTC�:�4����%��7;��Ǒ�<�ĀM�cT��o�)�Wc�[��>O�2MC�K��;�;cU������F�ӟ*��h��#K�è�Jz��8O}e �iB�k��cL}Ы"�(ow�Q��
    �2��Nr������Yy$a6Z�7�bԤ J�.�G�0��
    tycŀP�R1�p��h
    �
    �>a�0���aÆ����?��y.�M�~���m���w���$^�|(�������X��Tv��;z���?����u��^��RG���~F��$��!oo���� o��閸
    
    �ܚ���*��i��Dw7�%Av�~��Jm�NT��O܉����=_`�O*�V�؊��|�X,x#)� nu2��[�9d�.5�H1^�g�X8�h����=�E��2������0rC�.zX��<����~/(�)rvl�_�%�Ƙ�<���쬰���F;����$��Ή�a��zA��i�>���j����QƑx*�׫�l!��0�	+�&A�0��"��h�N:�{��97�^ ���4��ؿ,��I9Sd�a`��*>јv�=�y���
    VֻX��zH�1L�
    =Q>����;&�f1W������oy�[m�>M2�%�e��k�h��s�~�w�>�q[c�rY1!��R�s����T���DD鬒1��5A\�2�?�،���n��9�*j-�)�R��o"3G,u�aڂ�_�]�lG�Ô"�x���c4���a6��<�esW,*��C{����i�$�z�d��<��֒�H����C[@
    ��O�<adQ�}8�f��/5A�!������¡Hf�����Y�~��}�;a��"�W���*7�+���6:,�Ǘ4����/ɼ�O^(����J���/�c��q+��ϖE*��7@��[U�)G��r5+˪������˷ q%!7�i�?Q�9��>ݒe��c^_]�g�!&(����ã����`udd���sqҶ�pcg:
    珸�_M>~�u����ݻ������Ġ�3F�ÍD@�Y��,��h��~��+�?�qH�i���R�"��7��C�u��"lΦ:�.{jCE;���
    ��;��/m�~��pU��Cb|�o��Z�B.�v�,7Y:�V��32�6�y�]��a2��Dž���*��V'lX�E&�*�-_wx�X�he��,��~R�}r����0HF�+27�<)����s�Sq�a�k:}�L�:]׀�6zc��+�P('P�ZHP��K�z�j��h���K�e���k~	r�SQ?�XP��c�6@y���ʴ�P;H�R>����ϧ��v-��k�gj�R#-�4ՍC����c`��x�)
    q���Z2��"��#���5���R�o��E�4���]r�G���8[��U>�]t�c���3�z��)I�����G�0�V��^�Yrfk��@T�/��O�Sw�8m`p��3�:NLMv��+J�]bx��e�=g���^��A�{ȶ��:F>�&�i�&�
    ���O�A������%O��i�A�.20��	+�&C��0��`�E��:���[�	� �����`�'?x�<؜lJ���ҙ8U@�E�ܽ��`���>mJM��=4����$���m��3�2��=:�=>���6��ŵ�],�>� &dn�\���&�f��c��>�_X	�&���C�^�`���Z0��	+�&D��0��@�z��������㿫�!�,�#1��y���e��A�Ӷ��zA�ua�2Ī�r���/7�u�#(���ljl�' �zO� 1��r�D��`<�9V����ݎ��B��u}|M�@����0	+�&E
    0����0	+�&H0
    ����0�	+�&I��0����7��%b'`�B�H�6�U��Bh�>�ʦ�[�3iL��DQ0�
    l�'��������W�
    ��,[�I&Y�c���@�;څ�5�xb�>]�%8��g��
    )�Ep�$b�g�ֱre���|���Z�QS�ss��4�7sXlK+w�p�0�H�n箕h[�G��T�.�UT�c:o�t���� ����TW'��2�m,-I��Ȝ��o��a�����Z0	+�&J0
    ���Z0	+�&L0
    ����0	+�&M0
    ���Z0	+�&N0����0	+�&O0����0 	+�&P0����0	+�&Q00U�꘲"/Z�&SX�VRJ�h]U0
    	*�H��
    
    �/�Qr�����D,��^n��4��ڂ�W���Bާ_PxMY�j�Na����J<xo�9�2��U~�g�h��NY���������+��!�� �.�ȓn�tw:�wp����X]=��t�ݨ�����}N��q���x+W{��4�#Y�UJr�č�=���3��.�T�I}�JZ�3;
    D,%=��6�a>�$��ǖu�+���L
    P��U�d�ȿ>�Wɛ��:��jaW�櫭\��PĄSy?�?�⼯�k�vB����CŪ>��5L�ˣ�	�&�~�Ϲ�9�R:ct�����"Y*��mt{A��>��b�1Rg:щwS��?Nᦶ�Љ��T���`�X�l%�q��!�!n���Ix��|Zn���#N��*0�L:�/BO18���bQN�z�Ў���x*�H8����,�O��Q��$7g����|ig��#F<2����jW���:�!~
    �]�q�,;�Ɠ�eE�c��{����L
    �6RL�f5u8

    Regards,

    Harsha

  • As shown in the SYSFW logs

    * EXT OTP:

                                                                                                                                                          can't program, efuse row is WP: 0x80

                                                                                                                                                                                               can't program, efuse row is WP: 0x81

                                                                                                                                                                                                                                    can't program, efuse row is WP: 0x82

    The Extended OTP rows cannot be programmed on this device as all the rows are Write Protected (WP) which you must have done at some point on this device.

    Please test programming on a different device.

  • Attaching logs for 384 bits update.  From logs, same failure is seen.  Please rename final_certificate.txt to final_certificate.cer.

    0x63818001
              0x62C0005B
                        0x64018001
                                  0x600000A3
                                            0x63808001
                                                      0x62C0005C
                                                                0x64008001
                                                                          0x600000A4
                                                                                    0x63808002
                                                                                              0x62C0005D
                                                                                                        0x64008002
                                                                                                                  0x63D00010
                                                                                                                            0x64500010
                                                                                                                                      0x63D08001
                                                                                                                                                0x63D04002
                                                                                                                                                          0x64508001
                                                                                                                                                                    0x63100016
                                                                                                                                                                              0x64504002
                                                                                                                                                                                        0x63D0C002
                                                                                                                                                                                                  0x6450C002
                                                                                                                                                                                                            0x63D10002
                                                                                                                                                                                                                      0x64510002
                                                                                                                                                                                                                                0x63C00050
                                                                                                                                                                                                                                          0x64400050
       0x63C04001
                 0x64404001
                           0x6300005E
                                     0x63C08003
                                               0x64408003
                                                         0x63C0C005
                                                                   0x6440C005
                                                                             0x63C18002
                                                                                       0x64418002
                                                                                                 0x63C20004
                                                                                                           0x64420004
                                                                                                                     0x63C38002
                                                                                                                               0x64438002
                                                                                                                                         0x63C60004
                                                                                                                                                   0x64460004
                                                                                                                                                             0x63C64003
                                                                                                                                                                       0x64464003
                                                                                                                                                                                 0x68400000
                                                                                                                                                                                           0x62C0005D
                                                                                                                                                                                                     0x64014000
                                                                                                                                                                                                               0x6400C004
                                                                                                                                                                                                                         0x62C0005E
                                                                                                                                                                                                                                   0x60800099
                                                                                                                                                                                                                                             0x60000039
          0x63814000
                    0x6380C004
                              0xC20202
                                      0xC20024
                                              0x61800202
                                                        0x61C00039
                                                                  0x62000000
                                                                            0xC20201
                                                                                    0xC20024
                                                                                            0x61800201
                                                                                                      0x61C00092
                                                                                                                0xC20101
                                                                                                                        0xC20024
                                                                                                                                0x61800101
                                                                                                                                          0x61C00439
                                                                                                                                                    0xC20104
                                                                                                                                                            0xC20024
                                                                                                                                                                    0x61800104
                                                                                                                                                                              0x61C00439
                                                                                                                                                                                        0xC20103
                                                                                                                                                                                                0xC20024
                                                                                                                                                                                                        0x61800103
                                                                                                                                                                                                                  0x61C00439
                                                                                                                                                                                                                            0xC20100
                                                                                                                                                                                                                                    0xC20024
                                                                                                                                                                                                                                            0x61800100
         0x61C00439
                   0x62000000
                             0x60C00099
                                       0xC20102
                                               0xC20024
                                                       0x61800102
                                                                 0x61C00439
                                                                           0x62000002
                                                                                     0xC2010D
                                                                                             0xC20024
                                                                                                     0x6180010D
                                                                                                               0x61C00439
                                                                                                                         0x612B7C5A
                                                                                                                                   0xC2010C
                                                                                                                                           0xC20024
                                                                                                                                                   0x6180010C
                                                                                                                                                             0x61C00439
                                                                                                                                                                       0x612B7C5A
                                                                                                                                                                                 0x612B7C5A
                                                                                                                                                                                           0xC20101
                                                                                                                                                                                                   0xC20024
                                                                                                                                                                                                           0x61800101
                                                                                                                                                                                                                     0x61C00092
                                                                                                                                                                                                                               0xC20104
                                                                                                                                                                                                                                       0xC20024
                                                                                                                                                                                                                                               0x61800104
            0x61C00092
                      0xC20103
                              0xC20024
                                      0x61800103
                                                0x61C00092
                                                          0xC20100
                                                                  0xC20024
                                                                          0x61800100
                                                                                    0x61C00092
                                                                                              0x62000000
                                                                                                        0x60C000B9
                                                                                                                  0x60C000B2
                                                                                                                            0xC20102
                                                                                                                                    0xC20024
                                                                                                                                            0x61800102
                                                                                                                                                      0x61C00092
                                                                                                                                                                0x62000001
                                                                                                                                                                          0xC2010D
                                                                                                                                                                                  0xC20024
                                                                                                                                                                                          0x6180010D
                                                                                                                                                                                                    0x61C00092
                                                                                                                                                                                                              0x61276CB2
                                                                                                                                                                                                                        0xC2010C
                                                                                                                                                                                                                                0xC20024
                                                                                                                                                                                                                                        0x6180010C
     0x61C00092
               0x61276CB2
                         0x61276CB2
                                   0x409031
                                           0x800023
                                                   #
                                                    # Decrypting extensions..
                                                                             #
                                                                              MPK Options:  0x0
                                                                                               MEK Options:  0x0
                                                                                                                MPK Opt P1:  0x0
                                                                                                                                MPK Opt P2:  0x0
                                                                                                                                                MEK Opt   :  0x0
                                                                                                                                                                * SMPKH Part 1 BCH code: a0ce3d53
    
                                                                                                                                                                                                 * SMPKH Part 2 BCH code: 007a02b8
    
                                                                                                                                                                                                                                  * SMPK Hash (part-1,2):
    
            197e1e6963fc2e0442975299b86ccae0bfa7a3506f3d9845984f25882812260a00
    
                                                                              d84cc82b591e852842cf4679844ec96ae6778d3ac878f2e9c5b6142407112b2b00
    
                                                                                                                                                SMEK extension programming disabled
                                                                                                                                                                                   * EXT OTP Hash: ab322aef843f77064566ea8827b9e2eb4056342dd9c13331f13699f6d5300295cbdf3a45a85cc629a66877a3ad9958f430907c22f36dc58b76ac740ff2c5a48a
    
                                                                                      MSV extension programming disabled
    
                                                                                                                        * KEY CNT: 01010000
    
                                                                                                                                           * KEY REV: 01010000
    
                                                                                                                                                              SWREV extension programming disabled
    
                                                                                                                                                                                                  FW CFG REV extension programming disabled
    
                                                                                                                                                                                                                                           * KEYWR VERSION:  0x20000
    
                       #
                        # Programming Keys..
                                            #
    
                                             * MSV:
                                                    [u32] bch + msv:  0x0
                                                                         MSV extension programming disabled
                                                                                                           [u32] bch + msv:  0x0
    
                                                                                                                                * SWREV:
                                                                                                                                         [u32] SWREV-SBL:  0x1
                                                                                                                                                              [u32] SWREV-SYSFW  :  0x1
                                                                                                                                                                                       SWREV extension programming disabled
                                                                                                                                                                                                                           [u32] SWREV-SBL:  0x1
                                                                                                                                                                                                                                                [u32] SWREV-SYSFW  :  0x1
    
                            * FW CFG REV:
                                          [u32] SWREV-FW-CFG-REV:  0x1
                                                                      SWREV SEC BCFG extension programming disabled
                                                                                                                   [u32] SWREV-FW-CFG-REV:  0x1
    
                                                                                                                                               * EXT OTP:
                                                                                                                                                          can't program, efuse row is WP:  0x80
                                                                                                                                                                                               can't program, efuse row is WP:  0x81
                                                                                                                                                                                                                                    can't program, efuse row is WP:  0x82
                            can't program, efuse row is WP:  0x83
                                                                 can't program, efuse row is WP:  0x84
                                                                                                      can't program, efuse row is WP:  0x85
                                                                                                                                           can't program, efuse row is WP:  0x86
                                                                                                                                                                                can't program, efuse row is WP:  0x87
                                                                                                                                                                                                                     can't program, efuse row is WP:  0x88
             can't program, efuse row is WP:  0x89
                                                  can't program, efuse row is WP:  0x8A
                                                                                       can't program, efuse row is WP:  0x8B
                                                                                                                            can't program, efuse row is WP:  0x8C
                                                                                                                                                                 can't program, efuse row is WP:  0x8D
                                                                                                                                                                                                      can't program, efuse row is WP:  0x8E
                                                                                                                                                                                                                                           can't program, efuse row is WP:  0x8F
                                   can't program, efuse row is WP:  0x90
                                                                        can't program, efuse row is WP:  0x91
                                                                                                             can't program, efuse row is WP:  0x92
                                                                                                                                                  can't program, efuse row is WP:  0x93
                                                                                                                                                                                       can't program, efuse row is WP:  0x94
                                                                                                                                                                                                                            can't program, efuse row is WP:  0x95
                    can't program, efuse row is WP:  0x96
                                                         can't program, efuse row is WP:  0x97
                                                                                              can't program, efuse row is WP:  0x98
                                                                                                                                   Programmed 16/41 rows successfully
                                                                                                                                                                     Error in programming EXT OTP
                                                                                                                                                                                                 debug_response:  0x20000000
                                                                                                                                                                                                                            09C
                                                                                                                                                                                                                               0x6380004E
                                                                                                                                                                                                                                         0x62C00059
      0x6400004E
                0x6080003E
                          0x608000DB
                                    0x608000E0
                                              0x608000E1
                                                        0x6080003A
                                                                  0x608000C1
                                                                            0x608000CD
                                                                                      0x60800040
                                                                                                0x60800041
                                                                                                          0x60800042
                                                                                                                    0x60800043
                                                                                                                              0x60800044
                                                                                                                                        0x60800045
                                                                                                                                                  0x6080002C
                                                                                                                                                            0x6080002D
                                                                                                                                                                      0x60800005
                                                                                                                                                                                0x6080000D
                                                                                                                                                                                          0x60800014
                                                                                                                                                                                                    0x60800016
                                                                                                                                                                                                              0x60800018
                                                                                                                                                                                                                        0x6080001A
                                                                                                                                                                                                                                  0x6080001C
                                                                                                                                                                                                                                            0x6080001E
         0x60800020
                   0x60800021
                             0x60800022
                                       0x608000C0
                                                 0x6000009D
                                                           0x608000B8
                                                                     0x608000BF
                                                                               0x6000009E
                                                                                         0x6380004F
                                                                                                   0x62C0005A
                                                                                                             0x6400004F
                                                                                                                       0x600000A0
                                                                                                                                 0x6390000F
                                                                                                                                           0x62D00015
                                                                                                                                                     0x6410000F
                                                                                                                                                               0x60800090
                                                                                                                                                                         0x6080006F
                                                                                                                                                                                   0x60800070
                                                                                                                                                                                             0x60800071
                                                                                                                                                                                                       0x60800072
                                                                                                                                                                                                                 0x60800073
                                                                                                                                                                                                                           0x608000B1
                                                                                                                                                                                                                                     0x60800069
                                                                                                                                                                                                                                               0x600000A1
    >> End of SYSFW logs!!!
    0��0�
    Š	�戚�ۇ����]ia�k �0
    	*�H��
    
    0��10	UoR10	Urx10U
    gQE843yQV0sag1+0)U
    "dqhGYAQ2Y4gFfCq0t1yABCYxex9eAxt71f10Ua87RB35W10Ux0FSqGTPWbGpuiV110/	*�H��
    	"kFp5uGcgWXxcfxi@vsHs9C9qQWGrBs.com0
    260421080608Z
    260521080608Z0��10	UoR10	Urx10U
    gQE843yQV0sag1+0)U
    "dqhGYAQ2Y4gFfCq0t1yABCYxex9eAxt71f10Ua87RB35W10Ux0FSqGTPWbGpuiV110/	*�H��
    	"kFp5uGcgWXxcfxi@vsHs9C9qQWGrBs.com0�"0
    	*�H��
    �0�
    ���w�b3�'�}>�.�+�u�Y^�!�58����,e����|��uW ��K�Ī�ʟ�wF�h�$�h��sk#����+:��/�"Q�S�l�\0,��:'�O��؞g©L��3R�� FX���	�0;�"㣔��W��!��fΠj��])5�:T�H19o�kpqd3R���5�9)���p�����E���#Ytg�ҵ�2�p�J�c�7���Z>�U�0�k�_K��GS�$��)�mH�l��1�%'��Iq?[Y�ԉ���A��7xW']ξ����LAg��%}�m�]��͌*(���<{޾����1�w}M �X�r���Ҟ}��3	����:���:&��i��hd1�a�Z�y�2"��|w‰E��~�>����DM�R�o˙��n��!�hʞd[*	�ݗ_Nc>B?W�I�7��c[� ��&\�RSz�ۖ���4��P[B�8��LR+�V�L
    ��.FY���� ]��#{ʄd�/a�����j���	�0�	�0U0�0�	+�&@�0��!Z�����\�{���YTC�:�4����%��7;��Ǒ�<�ĀM�cT��o�)�Wc�[��>O�2MC�K��;�;cU������F�ӟ*��h��#K�è�Jz��8O}e �iB�k��cL}Ы"�(ow�Q��
    �2��Nr������Yy$a6Z�7�bԤ J�.�G�0��
    tycŀP�R1�p��h
    �
    �>a�0���aÆ����?��y.�M�~���m���w���$^�|(�������X��Tv��;z���?����u��^��RG���~F��$��!oo���� o��閸
    
    �ܚ���*��i��Dw7�%Av�~��Jm�NT��O܉����=_`�O*�V�؊��|�X,x#)� nu2��[�9d�.5�H1^�g�X8�h����=�E��2������0rC�.zX��<����~/(�)rvl�_�%�Ƙ�<���쬰���F;����$��Ή�a��zA��i�>���j����QƑx*�׫�l!��0�	+�&A�0��"��h�N:�{��97�^ ���4��ؿ,��I9Sd�a`��*>јv�=�y���
    VֻX��zH�1L�
    =Q>����;&�f1W������oy�[m�>M2�%�e��k�h��s�~�w�>�q[c�rY1!��R�s����T���DD鬒1��5A\�2�?�،���n��9�*j-�)�R��o"3G,u�aڂ�_�]�lG�Ô"�x���c4���a6��<�esW,*��C{����i�$�z�d��<��֒�H����C[@
    ��O�<adQ�}8�f��/5A�!������¡Hf�����Y�~��}�;a��"�W���*7�+���6:,�Ǘ4����/ɼ�O^(����J���/�c��q+��ϖE*��7@��[U�)G��r5+˪������˷ q%!7�i�?Q�9��>ݒe��c^_]�g�!&(����ã����`udd���sqҶ�pcg:
    珸�_M>~�u����ݻ������Ġ�3F�ÍD@�Y��,��h��~��+�?�qH�i���R�"��7��C�u��"lΦ:�.{jCE;���
    ��;��/m�~��pU��Cb|�o��Z�B.�v�,7Y:�V��32�6�y�]��a2��Dž���*��V'lX�E&�*�-_wx�X�he��,��~R�}r����0HF�+27�<)����s�Sq�a�k:}�L�:]׀�6zc��+�P('P�ZHP��K�z�j��h���K�e���k~	r�SQ?�XP��c�6@y���ʴ�P;H�R>����ϧ��v-��k�gj�R#-�4ՍC����c`��x�)
    q���Z2��"��#���5���R�o��E�4���]r�G���8[��U>�]t�c���3�z��)I�����G�0�V��^�Yrfk��@T�/��O�Sw�8m`p��3�:NLMv��+J�]bx��e�=g���^��A�{ȶ��:F>�&�i�&�
    ���O�A������%O��i�A�.20��	+�&C��0��`�E��:���[�	� �����`�'?x�<؜lJ���ҙ8U@�E�ܽ��`���>mJM��=4����$���m��3�2��=:�=>���6��ŵ�],�>� &dn�\���&�f��c��>�_X	�&���C�^�`���Z0��	+�&D��0��@�z��������㿫�!�,�#1��y���e��A�Ӷ��zA�ua�2Ī�r���/7�u�#(���ljl�' �zO� 1��r�D��`<�9V����ݎ��B��u}|M�@����0	+�&E
    0����0	+�&H0
    ����0�	+�&I��0����7��%b'`�B�H�6�U��Bh�>�ʦ�[�3iL��DQ0�
    l�'��������W�
    ��,[�I&Y�c���@�;څ�5�xb�>]�%8��g��
    )�Ep�$b�g�ֱre���|���Z�QS�ss��4�7sXlK+w�p�0�H�n箕h[�G��T�.�UT�c:o�t���� ����TW'��2�m,-I��Ȝ��o��a�����Z0	+�&J0
    ���Z0	+�&L0
    ����0	+�&M0
    ���Z0	+�&N0����0	+�&O0����0 	+�&P0����0	+�&Q00U�꘲"/Z�&SX�VRJ�h]U0
    	*�H��
    
    �/�Qr�����D,��^n��4��ڂ�W���Bާ_PxMY�j�Na����J<xo�9�2��U~�g�h��NY���������+��!�� �.�ȓn�tw:�wp����X]=��t�ݨ�����}N��q���x+W{��4�#Y�UJr�č�=���3��.�T�I}�JZ�3;
    D,%=��6�a>�$��ǖu�+���L
    P��U�d�ȿ>�Wɛ��:��jaW�櫭\��PĄSy?�?�⼯�k�vB����CŪ>��5L�ˣ�	�&�~�Ϲ�9�R:ct�����"Y*��mt{A��>��b�1Rg:щwS��?Nᦶ�Љ��T���`�X�l%�q��!�!n���Ix��|Zn���#N��*0�L:�/BO18���bQN�z�Ў���x*�H8����,�O��Q��$7g����|ig��#F<2����jW���:�!~
    �]�q�,;�Ɠ�eE�c��{����L
    �6RL�f5u8

  • Extended OTP is never attempted on these boards.  We are trying it for first time.

  • Please test on a different device. The Extended OTP cannot be programmed on this device because of the WP flag which you must have set maybe unknowingly at some point.

  • Secure board configuration in OTP writer firmware:

    #define KEYWR_BOARDCFG_SECURITY_SIZE_IN_BYTES (349U)

    #define KEYWR_BOARDCFG_SECURITY { \
        0x00U, 0x01U, 0xeaU, 0xf1U, 0xa4U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U,  \
        0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U,  \
        0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U,  \
        0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U,  \
        0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U,  \
        0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U,  \
        0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U,  \
        0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U,  \
        0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U,  \
        0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U,  \
        0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x27U, 0x8dU, 0x44U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U,  \
        0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U,  \
        0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U,  \
        0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U,  \
        0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x81U, 0x40U, 0x45U, 0x00U, 0x00U, 0x00U,  \
        0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U,  \
        0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U,  \
        0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U,  \
        0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x70U,  \
        0x51U, 0x0cU, 0x00U, 0x80U, 0x00U, 0x00U, 0x00U, 0x5aU, 0x00U, 0x00U, 0x00U, 0xbeU, 0x23U, 0x00U, 0x00U, 0x00U,  \
        0x00U, 0x00U, 0x00U, 0xafU, 0x42U, 0x10U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U,  \
        0x00U, 0x00U, 0x00U, 0x8fU, 0x60U, 0x0aU, 0x00U, 0x23U, 0x23U, 0x00U, 0x00U, 0x00U, 0x00U,  \
    }
  • No configuration can enable the Extended OTP programming on this device. Please test on a different device and let me know the results.

  • They are never set, because we have never implemented TISCI messages to update extended OTP in our application (including OPTEE, uBoot and Linux application)

  • eFuse programming is achieved using LDO, which down converts 3.3V to 1.8V, and LDO is enabled or disabled using GPIO U9.  TI OTP writer is updated to set direction of GPIO as output and GPIO is driven high in keywriter_setVpp() function

  • ExtOTPUpdateFail_384bits.txt

    For this case, did you generate the extended otp data for 384 bits only as I mentioned because the logs show that "Programmed 16/41 rows successfully" which equals to 1024 bits only given 25 bits per row?

    I can reproduce the issue if I generate the certificate with 1024 bits as the size of the extended otp.

    However, if I use the expected 384, the issue does not occur

    Sample logs

    ❯ dd if=/dev/zero of=ext_otp_data.bin count=48 bs=1
    48+0 records in
    48+0 records out
    48 bytes copied, 0.000123959 s, 387 kB/s
    ❯ ./gen_keywr_cert.sh -t tifek/ti_fek_public.pem --ext-otp ext_otp_data.bin --ext-otp-indx 0 --ext-otp-size 384
    Generating Single signed certificate!!
    INFO: Using default key(s) for signing certificate(s)
    GEN: AES256 key generated, since not provided
    # encrypt aes256 key with tifek public part
    # encrypt SMPK-priv signed aes256 key(hash) with tifek public part
    # encrypt smpk-pub hash using aes256 key
    writing RSA key
    # encrypt smek (sym key) using aes256 key
    # encrypt ext_otp using aes256 key
    3946    primary_cert.bin
    3946    ../../x509cert/final_certificate.bin
    # SHA512 Hashes of keys are stored in verify_hash.csv for reference..

    #
    # Decrypting extensions..
    #
    MPK Options:  0x0
    MEK Options:  0x0
    MPK Opt P1:  0x0
    MPK Opt P2:  0x0
    MEK Opt   :  0x0
    SMPKH extension programming disabled
    SMEK extension programming disabled
    * EXT OTP Hash: c5cbd411721419d5b0f7d41c36899284723a06e1d0d32dea6e0a69fdcadac4fd63eb1d19c268268dbc060a68f1f207243da8781e8d95776a788a3d699dc52d85
    
    MSV extension programming disabled
    
    KEY CNT extension programming disabled
    
    KEY REV extension programming disabled
    
    SWREV extension programming disabled
    
    FW CFG REV extension programming disabled
    
    * KEYWR VERSION:  0x20000
    
    #
    # Programming Keys..
    #
    
    * MSV:
    [u32] bch + msv:  0x0
    MSV extension programming disabled
    [u32] bch + msv:  0x0
    
    * SWREV:
    [u32] SWREV-SBL:  0x1
    [u32] SWREV-SYSFW  :  0x1
    SWREV extension programming disabled
    [u32] SWREV-SBL:  0x1
    [u32] SWREV-SYSFW  :  0x1
    
    * FW CFG REV:
    [u32] SWREV-FW-CFG-REV:  0x1
    SWREV SEC BCFG extension programming disabled
    [u32] SWREV-FW-CFG-REV:  0x1
    
    * EXT OTP:
    Programmed 16/16 rows successfully
    
    * BMPKH, BMEK:
    BMPKH extension programming disabled
    BMEK extension programming disabled
    
    * SMPKH, SMEK:
    SMPKH extension programming disabled
    SMEK extension programming disabled
    
    * KEYCNT:
    [u32] keycnt:  0x0
    KEY CNT extension programming disabled
    [u32] keycnt:  0x0
    
    * KEYREV:
    [u32] keyrev:  0x0
    KEY REV extension programming disabled
    [u32] keyrev:  0x0