@@ -6,11 +6,12 @@ controller virtual device.
66## Usage
77
88```` text
9- usage: otptool.py [-h] [-j HJSON] [-m VMEM] [-l SV] [-o C ] [-r RAW]
9+ usage: otptool.py [-h] [-j HJSON] [-m VMEM] [-l SV] [-o FILE ] [-r RAW]
1010 [-k {auto,otp,fuz}] [-e BITS] [-C CONFIG] [-c INT] [-i INT]
11- [-w] [-n] [-s] [-E] [-D] [-U] [--empty PARTITION]
12- [--erase PART:FIELD] [--clear-bit CLEAR_BIT]
13- [--set-bit SET_BIT] [--toggle-bit TOGGLE_BIT] [--fix-ecc]
11+ [-w] [-n] [-f PART:FIELD] [--no-version] [-s] [-E] [-D] [-U]
12+ [--empty PARTITION] [--erase PART:FIELD]
13+ [--clear-bit CLEAR_BIT] [--set-bit SET_BIT]
14+ [--toggle-bit TOGGLE_BIT] [--fix-ecc]
1415 [-G {LCVAL,LCTPL,PARTS,REGS}] [-v] [-d]
1516
1617QEMU OT tool to manage OTP files.
2223 -j, --otp-map HJSON input OTP controller memory map file
2324 -m, --vmem VMEM input VMEM file
2425 -l, --lifecycle SV input lifecycle system verilog file
25- -o, --output C output filename for C file generation
26+ -o, --output FILE output filename (default to stdout)
2627 -r, --raw RAW QEMU OTP raw image file
2728
2829Parameters:
@@ -34,6 +35,9 @@ Parameters:
3435 -i, --iv INT initialization vector for Present scrambler
3536 -w, --wide use wide output, non-abbreviated content
3637 -n, --no-decode do not attempt to decode OTP fields
38+ -f, --filter PART:FIELD
39+ filter which OTP fields are shown
40+ --no-version do not report the OTP image version
3741
3842Commands:
3943 -s, --show show the OTP content
@@ -107,6 +111,9 @@ Fuse RAW images only use the v1 type.
107111* ` -e ` specify how many bits are used in the VMEM file to store ECC information. Note that ECC
108112 information is not stored in the QEMU RAW file for now.
109113
114+ * ` -f ` select which partition(s) and partition field(s) should be shown when option ` -s ` is used.
115+ When not specified, all partitions and fields are reported.
116+
110117* ` -i ` specify the initialization vector for the Present scrambler used for partition digests.
111118 This value is "usually" found within the ` hw/ip/otp_ctrl/rtl/otp_ctrl_part_pkg.sv ` OT file,
112119 from the last entry of ` RndCnstDigestIV ` array, _ i.e._ item 0. It is used along with option
@@ -153,15 +160,20 @@ Fuse RAW images only use the v1 type.
153160 contain long sequence of bytes. If repeated, the empty long fields are also printed in full, as
154161 a sequence of empty bytes.
155162
163+ * ` --clear-bit ` clears the specified bit in the OTP data. This flag may be repeated. This option is
164+ only intended to corrupt the OTP content so that HW & SW behavior may be exercised should such
165+ a condition exists. See [ Bit position syntax] ( #bit-syntax ) for how to specify a bit.
166+
156167* ` --empty ` reset a whole parition, including its digest if any and ECC bits. This option is only
157168 intended for test purposes. This flag may be repeated. Partition(s) can be specified either by
158169 their index or their name.
159170
160171* ` --erase ` reset a specific field within a partition. The flag may be repeated.
161172
162- * ` --clear-bit ` clears the specified bit in the OTP data. This flag may be repeated. This option is
163- only intended to corrupt the OTP content so that HW & SW behavior may be exercised should such
164- a condition exists. See [ Bit position syntax] ( #bit-syntax ) for how to specify a bit.
173+ * ` --no-version ` disable OTP image version reporting when ` -s ` is used.
174+
175+ * ` --fix-ecc ` may be used to rebuild the ECC values for all slots that have been modified using the
176+ ECC modification operations, and any detected error.
165177
166178* ` --set-bit ` sets the specified bit in the OTP data. This flag may be repeated. This option is
167179 only intended to corrupt the OTP content so that HW & SW behavior may be exercised should such
@@ -171,9 +183,6 @@ Fuse RAW images only use the v1 type.
171183 is only intended to corrupt the OTP content so that HW & SW behavior may be exercised should such
172184 a condition exists. See [ Bit position syntax] ( #bit-syntax ) for how to specify a bit.
173185
174- * ` --fix-ecc ` may be used to rebuild the ECC values for all slots that have been modified using the
175- ECC modification operations, and any detected error.
176-
177186All modification features can only be performed on RAW image, VMEM images are never modified. To
178187modify RAW file content, either a VMEM file is required in addition to the RAW file as the data
179188source, or the ` -U ` is required to tell that the RAW file should be read, modified and written back.
0 commit comments