Can not fuse odm_lock variable

Hi,

I tried to fuse odm_lock on my Tx2 module to protect ReservedOdm variable but fuse failed.

Logs:

Welcome to Tegra Flash
version 1.0.0
Type ? or help for help and q or quit to exit
Use ! to execute system commands
 
[   0.0946 ] Burning fuses
[   0.0946 ] Generating RCM messages
[   0.0961 ] tegrarcm_v2 --listrcm rcm_list.xml --chip 0x18 0 --download rcm mb1_recovery_prod.bin 0 0
[   0.0973 ] RCM 0 is saved as rcm_0.rcm
[   0.0978 ] RCM 1 is saved as rcm_1.rcm
[   0.0978 ] List of rcm files are saved in rcm_list.xml
[   0.0978 ] 
[   0.0978 ] Signing RCM messages
[   0.0990 ] tegrasign_v2 --key ../rsa_priv.pem --list rcm_list.xml --pubkeyhash pub_key.key
[   0.1001 ] PKC key in Open SSL format
[   0.1005 ] Key size is 256 bytes
[   0.1007 ] Valid PKC key
[   0.1019 ] Saving pkc public key  in pub_key.key
[   0.2644 ] 
[   0.2645 ] Copying signature to RCM mesages
[   0.2662 ] tegrarcm_v2 --chip 0x18 0 --updatesig rcm_list_signed.xml --pubkeyhash pub_key.key
[   0.2684 ] 
[   0.2685 ] Boot Rom communication
[   0.2695 ] tegrarcm_v2 --chip 0x18 0 --rcm rcm_list_signed.xml
[   0.2706 ] BR_CID: 0xa1801001644448890400000010ff8200
[   0.2719 ] RCM version 0X180001
[   0.2865 ] Boot Rom communication completed
[   1.2944 ] 
[   2.2973 ] tegrarcm_v2 --isapplet
[   2.2987 ] Applet version 01.00.0000
[   2.3144 ] 
[   2.3178 ] Parsing fuse info as per xml file
[   2.3190 ] tegraparser_v2 --fuse_info odmfuse_pkc.xml blow_fuse_data.bin
[   2.3208 ] MagicId=0x45535546 version=0x1
[   2.3211 ] node: name=OdmLock size=4
[   2.3211 ] Unknown fuse type size requested
[   2.3211 ] Failed to generate fuse info, ErrNum=4
[   2.3211 ] 
Error: Return value 4
Command tegraparser_v2 --fuse_info odmfuse_pkc.xml blow_fuse_data.bin

my odm_pkc.xml:

<genericfuse MagicId="0x45535546" version="1.0.0">
<fuse name="OdmLock" size="4" value="0x1" />
</genericfuse>

Still fail when running parsing command:

$ ./tegraparser_v2 --fuse_info odmfuse_pkc.xml blow_fuse_data.bin
MagicId=0x45535546 version=0x1
node: name=OdmLock size=4
Unknown fuse type size requested
Failed to generate fuse info, ErrNum=4

Hi,
Please share your release version and command of executing odmfuse.sh.
And is theTX2 fused already? Or it is a clean TX2?

Hi @DaneLLL,

Using secureboot_R32.3.1 + JetPack_4.2.1_Linux_GA_P3310 + patched odmfuse.sh (according to this discussion) to generate fuseblob.tbz2.

I have fused twice on this Tx2 module before.
First fuse :

$ BOARDID=3310 FAB=C04 sudo ./odmfuse.sh --noburn -i 0x18 -c NS -o "0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000001 0x53444423" jetson-tx2
mv fuseblob.tbz2 to another path and extract it.
$ sudo ./fusecmd.sh

Second fuse:

$ BOARDID=3310 FAB=C04 sudo ./odmfuse.sh --noburn -i 0x18 -c PKC -k ../rsa_priv.pem jetson-tx2
mv fuseblob.tbz2 to another path and extract it.
$ sudo ./fusecmd.sh

After above fusing, flash signed image(JetPack_4.3_Linux_GA_P3310):

sudo ./flash.sh -u ../rsa_priv.pem jetson-tx2 mmcblk0p1

Output of tegrafuse.sh

odm_lock : 0x00000000
arm_jtag_disable : 0x00000001
odm_production_mode : 0x00000000
boot_security_info : 0x00000002
odm_info : 0x00000000
reserved_odm0 : 0x00000000
reserved_odm1 : 0x00000000
reserved_odm2 : 0x00000000
reserved_odm3 : 0x00000000
reserved_odm4 : 0x00000000
reserved_odm5 : 0x00000000
reserved_odm6 : 0x00000001
reserved_odm7 : 0x53555533
kek0 : 0x00000000000000000000000000000000
kek1 : 0x00000000000000000000000000000000
kek2 : 0x00000000000000000000000000000000
public_key : 0x2a1faa38cc81d68b5a6a3f149e86656a5638b784c7401da548de2d394a3c0f97
secure_boot_key : 0x00000000000000000000000000000000

Hi @ninaH,

This is mean that everything works fine for you, right ?

Ilies

Hi @ninaH
Please also share the command of generating this odm_pkc.xml:

<genericfuse MagicId="0x45535546" version="1.0.0">
<fuse name="OdmLock" size="4" value="0x1" />
</genericfuse>

This should be the third fuse, right?

By default we would expect programming all fuses in single odmfuse.sh command. This is similar to this post that fuses are programmed in multiple steps. We need to check/discuss with our teams on this condition.

Hi all ,

Sorry that I did not mention clear about the issue.
I tired third fuse in order to protect my ReservedOdm variables with -l odm_lock option:

$ BOARDID=3310 FAB=C04 sudo ./odmfuse.sh --noburn -i 0x18 -c NS -l 0x1 jetson-tx2

The fuse result:

Welcome to Tegra Flash
version 1.0.0
Type ? or help for help and q or quit to exit
Use ! to execute system commands
 
[   0.0104 ] Burning fuses
[   0.0104 ] Generating RCM messages
[   0.0118 ] tegrarcm_v2 --listrcm rcm_list.xml --chip 0x18 0 --download rcm mb1_recovery_prod.bin 0 0
[   0.0129 ] RCM 0 is saved as rcm_0.rcm
[   0.0135 ] RCM 1 is saved as rcm_1.rcm
[   0.0135 ] List of rcm files are saved in rcm_list.xml
[   0.0135 ] 
[   0.0135 ] Signing RCM messages
[   0.0147 ] tegrasign_v2 --key ../rsa_priv.pem --list rcm_list.xml --pubkeyhash pub_key.key
[   0.0157 ] Assuming zero filled SBK key
[   0.0215 ] 
[   0.0216 ] Copying signature to RCM mesages
[   0.0230 ] tegrarcm_v2 --chip 0x18 0 --updatesig rcm_list_signed.xml
[   0.0252 ] 
[   0.0252 ] Boot Rom communication
[   0.0266 ] tegrarcm_v2 --chip 0x18 0 --rcm rcm_list_signed.xml
[   0.0278 ] BootRom is not running
[   5.1674 ] 
[   6.1717 ] tegrarcm_v2 --isapplet
[   6.1739 ] Applet version 01.00.0000
[   6.1893 ] 
[   6.1940 ] Parsing fuse info as per xml file
[   6.1963 ] tegraparser_v2 --fuse_info odmfuse_pkc.xml blow_fuse_data.bin
[   6.1983 ] MagicId=0x45535546 version=0x1
[   6.1987 ] node: name=JtagDisable size=4
[   6.1988 ]   value=0x1
[   6.1988 ] node: name=OdmLock size=4
[   6.1988 ] Unknown fuse type size requested
[   6.1988 ] Failed to generate fuse info, ErrNum=4
[   6.1989 ] 
Error: Return value 4
Command tegraparser_v2 --fuse_info odmfuse_pkc.xml blow_fuse_data.bin

odmfuse_pkc.xml

<genericfuse MagicId="0x45535546" version="1.0.0">
<fuse name="JtagDisable" size="4" value="0x1" />
<fuse name="OdmLock" size="4" value="0x1" />
</genericfuse>

hello ninaH,

there’re erroneous about OdmReserved, which should be one 256-bit number.
also, that’s only supported T210 for now.

we’ll have investigation for the new commands to program that.
thanks

Hi Jerry,

Is there updates about this issue ?

I’m using L4T 32.3.1 on Nvidia Jetson TX2. I got the same issue when trying to burn odm_lock tegra fuse.
The purpose of burning the odm_lock tegra fuse is to protect the odm_reserved tegra fuses as described the Nvidia documentation, please take a look here.

Sets odm_lock to the specified value. Setting each bit locks (makes read-only) the corresponding 32‑bit word in the odm_reserved field.
For example, setting odm_lock to 0x1 locks the first 32‑bit word of odm_reserved. Setting odm_lock to 0x5 locks the first and third 32‑bit words of odm_reserved, and so on. 
  • The command line used
$ sudo BOARDID=3310 FAB=C04 ./odmfuse.sh --noburn -j -i 0x18 -c NS -l 0xf jetson-tx2
  • The result
$ sudo ./fusecmd.sh 
Welcome to Tegra Flash
version 1.0.0
Type ? or help for help and q or quit to exit
Use ! to execute system commands
 
[   0.0077 ] Burning fuses
[   0.0077 ] Generating RCM messages
[   0.0085 ] tegrarcm_v2 --listrcm rcm_list.xml --chip 0x18 0 --download rcm mb1_recovery_prod.bin 0 0
[   0.0092 ] RCM 0 is saved as rcm_0.rcm
[   0.0094 ] RCM 1 is saved as rcm_1.rcm
[   0.0094 ] List of rcm files are saved in rcm_list.xml
[   0.0094 ] 
[   0.0094 ] Signing RCM messages
[   0.0101 ] tegrasign_v2 --key None --list rcm_list.xml --pubkeyhash pub_key.key
[   0.0107 ] Assuming zero filled SBK key
[   0.0131 ] 
[   0.0131 ] Copying signature to RCM mesages
[   0.0138 ] tegrarcm_v2 --chip 0x18 0 --updatesig rcm_list_signed.xml
[   0.0147 ] 
[   0.0147 ] Boot Rom communication
[   0.0155 ] tegrarcm_v2 --chip 0x18 0 --rcm rcm_list_signed.xml
[   0.0162 ] BR_CID: 0x8180100164403647200000000b000380
[   0.1802 ] RCM version 0X180001
[   0.3651 ] Boot Rom communication completed
[   1.3717 ] 
[   2.3762 ] tegrarcm_v2 --isapplet
[   2.3791 ] Applet version 01.00.0000
[   2.7313 ] 
[   2.7379 ] Parsing fuse info as per xml file
[   2.7410 ] tegraparser_v2 --fuse_info odmfuse_pkc.xml blow_fuse_data.bin
[   2.7441 ] MagicId=0x45535546 version=0x1
[   2.7447 ] node: name=OdmLock size=4
[   2.7447 ] Unknown fuse type size requested
[   2.7447 ] Failed to generate fuse info, ErrNum=4
[   2.7447 ] 
Error: Return value 4
Command tegraparser_v2 --fuse_info odmfuse_pkc.xml blow_fuse_data.bin

@madisox Could you please take a look here ? Do have an idea about that ?

Any help would be appreciated.

Best regards.
Ilies

@ilies.chergui It looks like tegraparser_v2 thinks that odmfuse.sh is inserting the wrong size value for the OdmLock fuse in the XML file. Not sure why, though, since 4 looks like the right size, based on the documentation.

I’ve had success with burning the reserved_odmX and odm_lock fuses via the sysfs interface directly on the TX2. I haven’t tried burning them via USB (it was tricky enough just getting the secure-boot fuses burned that way).

Thanks @madisox for your response.
I have done that, I mean burning the tegra fuses (ODM_RESERVED and ODM_LOCK) via SysFS interface.
To be honest, I prefer to burn all tegra fuses in one time via the script odmfuse.sh

hi @ilies.chergui ,

we had some internal process and we had resolved the issue,
you must upgrade to the latest JetPack release, (i.e. l4t-r32.4.3) for the fixes.
you might also check L4T Release Notes about r32.4.3; please also refer to [Chapter-3.0 Top Fixed Issues] for the details of bootloader related fixes.

to summarize,
please upgrade to JetPack-4.4/ l4t-r32.4.3 for confirmation.
thanks

Hi @JerryChang

I have done a quick test by using the Nvidia tool tegraparser_v2 from JetPack 4.4 and secure boot package L4T R32.4.3.

Unfortunately, I got the same issue as the previous JetPack 4.3 and secure boot package L4T R32.3.1

  • Here the command used to generate the fuseblob tarball
$ sudo BOARDID=3310 FAB=C04 ./odmfuse.sh --noburn -j -i 0x18 -c NS -l 0xf jetson-tx2
  • XML file used odmfuse_pkc.xml
$ cat odmfuse_pkc.xml
<genericfuse MagicId="0x45535546" version="1.0.0">
<fuse name="OdmLock" size="4" value="0xf" />
<fuse name="PkcDisable" size="4" value="0x1" />
<fuse name="BootSecurityInfo" size="4" value="0x2" />
</genericfuse>
  • Here the result
$ ./tegraparser_v2 --fuse_info odmfuse_pkc.xml test_ilies.bin
MagicId=0x45535546 version=0x1
node: name=OdmLock size=4
Unknown fuse type size requested
Failed to generate fuse info, ErrNum=4

Best regards,
Ilies

hello ilies.chergui,

there should be another scripts for fuse reading,
for example, $ sudo ./odmfuseread.sh -c PKC -i 0x18 -k <key> jetson-tx2

Hi @JerryChang,

Thanks for your response. In my case, I’m trying to burn ODM LOCK tegra fuse not reading it.

Could you please share the Nvidia binary tegraparser_v2 with debug symbols or source code ? I tried to debug it via strace I didn’t see anything.

  • Here is the command line used
$ strace -ff -o /tmp/tegraparser-v2-logs -s 256 ./bootloader/tegraparser_v2 --fuse_info ./odmfuse_pkc.xml test_ilies.bin
MagicId=0x45535546 version=0x1
node: name=OdmLock size=4
Unknown fuse type size requested
Failed to generate fuse info, ErrNum=4
  • Here is the XML file
$ cat odmfuse_pkc.xml 
<genericfuse MagicId="0x45535546" version="1.0.0">
<fuse name="OdmLock" size="4" value="0xf" />
<fuse name="PkcDisable" size="4" value="0x1" />
<fuse name="BootSecurityInfo" size="4" value="0x2" />
</genericfuse>

The attached file tegraparser-v2-logs.16361.log (1.9 KB) is the result of the command strace when trying to debug this issue.

Best regards,
Ilies

hello ilies.chergui,

I’ve apply changes for tegraparser_v2 for adding OdmLock fuse,
could you please please apply this binary, Topic120747_tegraparser_v2.zip (390.5 KB) for verification,
thanks

1 Like

Thanks @JerryChang
I will try it then I will let you know

Hi @JerryChang
Thank you very much for your help.
I tried the tegraparser_v2 that you shared, it works fine when using the command:

$ tegraparser_v2 --fuse_info ./odmfuse_pkc.xml parse_tests.bin
  • The XML file
$ cat ./odmfuse_pkc.xml
<genericfuse MagicId="0x45535546" version="1.0.0">
<fuse name="OdmLock" size="4" value="0xf" />
<fuse name="ReservedOdm0" size="4" value="0xc489abf9" />
<fuse name="ReservedOdm1" size="4" value="0xe6e0dcba" />
<fuse name="ReservedOdm2" size="4" value="0xf6273951" />
<fuse name="ReservedOdm3" size="4" value="0xab6f1f5d" />
<fuse name="ReservedOdm4" size="4" value="0xee20611b" />
<fuse name="ReservedOdm5" size="4" value="0x5920be04" />
<fuse name="ReservedOdm6" size="4" value="0xff2a98e0" />
<fuse name="ReservedOdm7" size="4" value="0x76d44501" />
</genericfuse>
$ 
  • The result of the command
$ ./Topic120747_tegraparser_v2 --fuse_info ./odmfuse_pkc.xml test_ilies.bin
MagicId=0x45535546 version=0x1
node: name=OdmLock size=4
  value=0xf
node: name=ReservedOdm0 size=4
  value=0xc489abf9
node: name=ReservedOdm1 size=4
  value=0xe6e0dcba
node: name=ReservedOdm2 size=4
  value=0xf6273951
node: name=ReservedOdm3 size=4
  value=0xab6f1f5d
node: name=ReservedOdm4 size=4
  value=0xee20611b
node: name=ReservedOdm5 size=4
  value=0x5920be04
node: name=ReservedOdm6 size=4
  value=0xff2a98e0
node: name=ReservedOdm7 size=4
  value=0x76d44501
$

I will flash my device and I will let you know.

Best regards,
Ilies

1 Like