Skip to content

Commit cd134c3

Browse files
rivos-eblotloiclefort
authored andcommitted
[ot] scripts/opentitan: otptool.py: fix a bug that hid some fields with --show
Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
1 parent 0935784 commit cd134c3

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

scripts/opentitan/ot/otp/partition.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,15 @@ def emit(fmt, *args):
164164
if itdef.get('ismubi'):
165165
emit('%-46s (decoded) %s',
166166
name, str(OtpMap.MUBI8_BOOLEANS.get(ival, ival)))
167-
elif itsize == 4 and ival in OtpMap.HARDENED_BOOLEANS:
167+
continue
168+
if itsize == 4 and ival in OtpMap.HARDENED_BOOLEANS:
168169
emit('%-46s (decoded) %s',
169170
name, str(OtpMap.HARDENED_BOOLEANS[ival]))
170-
else:
171-
emit('%-46s %x', name, ival)
171+
continue
172+
emit('%-46s %x', name, ival)
173+
if self._digest_bytes is not None:
174+
emit('%-46s %s', f'{pname}:DIGEST',
175+
hexlify(self._digest_bytes).decode())
172176

173177

174178
class OtpLifecycleExtension(OtpPartitionDecoder):

0 commit comments

Comments
 (0)