Skip to content

Commit 9dcdc75

Browse files
committed
[ot] docs/opentitan: fix typos and rewrap markdown text to 100 column when possible.
Signed-off-by: Emmanuel Blot <[email protected]>
1 parent 510ea33 commit 9dcdc75

25 files changed

+200
-172
lines changed

docs/opentitan/cfggen.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Extras:
5151

5252
`OTDIR` is a required positional argument which should point to the root directory of the OpenTitan
5353
repository to analyze. It is used to generate the path towards the required files to parse, each of
54-
which can be overidden with options `-c`, `-l` and `-t`.
54+
which can be overridden with options `-c`, `-l` and `-t`.
5555

5656
* `-a` specify one or more actions to execute. Default is to generate a configuration file. It is
5757
also possible to emit the list of module input clocks in a plain text format.
@@ -69,7 +69,7 @@ which can be overidden with options `-c`, `-l` and `-t`.
6969

7070
* `-S` path to the generated file that contains all the "secret" constants of the _top_.
7171

72-
* `-s` specify a SoC identifier for OT platforms with mulitple SoCs
72+
* `-s` specify a SoC identifier for OT platforms with multiple SoCs
7373

7474
* `-T` specify the OpenTitan _top_ name, such as `darjeeling`, `earlgrey`, ... This option is
7575
mandatory if `-t` is not specified. An OTDIR root directory should be specified with this option.

docs/opentitan/darjeeling.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ qemu-system-riscv32 -M ot-darjeeling -display none -serial mon:stdio \
125125
-drive if=mtd,bus=1,file=flash.raw,format=raw
126126
````
127127

128-
where `otp-rma.raw` contains the RMA OTP image and `flash.raw` contains the signed binary file of the
129-
ROM_EXT and the BL0. See [`otptool.py`](otptool.md) and [`flashgen.py`](flashgen.md) tools to
128+
where `otp-rma.raw` contains the RMA OTP image and `flash.raw` contains the signed binary file of
129+
the ROM_EXT and the BL0. See [`otptool.py`](otptool.md) and [`flashgen.py`](flashgen.md) tools to
130130
generate the `.raw` image files.
131131

132132
See [`rom_ctrl.md`](rom_ctrl.md) for information on ROM option.
@@ -144,7 +144,7 @@ See [`tools.md`](tools.md)
144144
is set to 10 MHz. This option is very useful/mandatory to run many OpenTitan tests that rely on
145145
time or CPU cycle to validate features. Using `-icount` option slows down execution speed though,
146146
so it is not recommended to use it when the main goal is to develop SW to run on the virtual
147-
machine. An alternative is to use `-icount shift=auto`, which offers fatest emulation execution,
147+
machine. An alternative is to use `-icount shift=auto`, which offers fastest emulation execution,
148148
while preserving an accurate ratio between the vCPU clock and the virtual devices.
149149

150150
* `no_epmp_cfg=true` can be appended to the machine option switch, _i.e._
@@ -301,7 +301,7 @@ It is possible to limit the number of times the VM reboots the guest. This optio
301301
during the development process when an issue in the early FW stages - such as the ROM - causes an
302302
endless reboot cycles of the guest.
303303

304-
To limit the reboot cyckes, use the `-global ot-rstmgr.fatal_reset=<N>` option, where `N` is an
304+
To limit the reboot cycles, use the `-global ot-rstmgr.fatal_reset=<N>` option, where `N` is an
305305
unsigned integer. This option forces the QEMU VM to exit the N^th^ time the reset manager receives
306306
a reset request, rather than rebooting the whole machine endlessly as the default behavior.
307307

@@ -358,6 +358,6 @@ are loaded from a raw binary file (`.bin`, `.signed.bin`, ...). However the
358358
[`flashgen.py`](flashgen.md) script implements a workaround for this feature, please refer to this
359359
script for more details.
360360

361-
Finally, a Rust demangler has been added to QEMU, which enables the QEMU integrated dissambler to
361+
Finally, a Rust demangler has been added to QEMU, which enables the QEMU integrated disassembler to
362362
emit the demangled names of the Rust symbols for Rust-written guest applications rather than their
363363
mangled versions as stored in the ELF file.

docs/opentitan/devproxy.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,8 @@ Write a buffer to a memory device
771771

772772
Resume execution if the VM is currently stopped.
773773

774-
When VM is started in stod mode `-S`, proxy can be used to configure the VM before kicking off the vCPUs.
774+
When VM is started in stod mode `-S`, proxy can be used to configure the VM before kicking off the
775+
vCPUs.
775776

776777
##### Request
777778
```

docs/opentitan/dtm.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Memory:
4848
-f, --file FILE file to read/write data for memory access
4949
-D, --data DATA data to write using memory access
5050
-e, --elf ELF load ELF file into memory
51-
-F, --fast-mode do not check system bus status while transfering
51+
-F, --fast-mode do not check system bus status while transferring
5252
5353
Extras:
5454
-v, --verbose increase verbosity
@@ -67,7 +67,7 @@ Extras:
6767
* `-c` read and report a CSR from the Ibex core.
6868

6969
* `-D` data to write, useful with `--mem` option in write mode. Mutually exclusive with `--file`.
70-
Data may be specifed as an decimal or hexadecimal integer, limited to 32-bit integers. It is also
70+
Data may be specified as an decimal or hexadecimal integer, limited to 32-bit integers. It is also
7171
possible to use `:` followed with a string of hexadecimal nibbles (without 0x prefix).
7272

7373
* `-d` only useful to debug the script, reports any Python traceback to the standard error stream.
@@ -76,7 +76,7 @@ Extras:
7676

7777
* `-F` assume System Bus can cope with received data pace. This feature increases transfer data
7878
rate by bypassing SB status check. However it may cause the transfer to fail in case System Bus
79-
becomes busy while data are transfered.
79+
becomes busy while data are transferred.
8080

8181
* `-f` specify the file to read from or write to when option `--mem` is used. Mutually exclusive
8282
with option `--data`.

docs/opentitan/earlgrey.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ features are implemented.
7878
* AST
7979
* configurable clock sources
8080
* GPIO
81-
* Connections with pinmux not implemented (need to be ported from [Darjeeling](darjeeling.md) version)
81+
* Connections with pinmux not implemented (need to be ported from [Darjeeling](darjeeling.md)
82+
version)
8283
* Lifecycle controller
8384
* only forwards LC state from OTP (need to be ported from [Darjeeling](darjeeling.md) version)
8485
* Power Manager
@@ -121,8 +122,8 @@ qemu-system-riscv32 -M ot-earlgrey -display none -serial mon:stdio \
121122
-drive if=mtd,bus=2,file=flash.raw,format=raw
122123
````
123124

124-
where `otp-rma.raw` contains the RMA OTP image and `flash.raw` contains the signed binary file of the
125-
ROM_EXT and the BL0. See [`otptool.py`](otptool.md) and [`flashgen.py`](flashgen.md) tools to
125+
where `otp-rma.raw` contains the RMA OTP image and `flash.raw` contains the signed binary file of
126+
the ROM_EXT and the BL0. See [`otptool.py`](otptool.md) and [`flashgen.py`](flashgen.md) tools to
126127
generate the `.raw` image files.
127128

128129
See [`rom_ctrl.md`](rom_ctrl.md) for information on ROM option.
@@ -322,6 +323,6 @@ are loaded from a raw binary file (`.bin`, `.signed.bin`, ...). However the
322323
[`flashgen.py`](flashgen.md) script implements a workaround for this feature, please refer to this
323324
script for more details.
324325

325-
Finally, a Rust demangler has been added to QEMU, which enables the QEMU integrated dissambler to
326+
Finally, a Rust demangler has been added to QEMU, which enables the QEMU integrated disassembler to
326327
emit the demangled names of the Rust symbols for Rust-written guest applications rather than their
327328
mangled versions as stored in the ELF file.

docs/opentitan/flashgen.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Files:
3131
-t, --otdesc OTDESC OpenTitan style file descriptor, may be repeated
3232
-T, --ignore-time Discard time checking on ELF files
3333
-U, --unsafe-elf Discard sanity checking on ELF files
34-
-A, --accept-invalid Blindy accept invalid input files
34+
-A, --accept-invalid Blindly accept invalid input files
3535
3636
Extra:
3737
-v, --verbose increase verbosity

docs/opentitan/gpio.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ stream the GPIO input and output pins.
3535

3636
This CharDev device can be used to stimulate the GPIO and perform unit tests.
3737

38-
To connect the GPIO to its optional characted device, use the following QEMU option
38+
To connect the GPIO to its optional character device, use the following QEMU option
3939

4040
```
4141
-chardev type,id=gpio -global ot-gpio-$OTMACHINE.chardev=gpio
@@ -68,8 +68,8 @@ where:
6868
3. `CR` is the carriage return character (0x0d)
6969
4. `LF` is the line feed character, or end-of-line (0x0a)
7070

71-
Each frame is delimited with `LF` characters. `CR` are ignored and accepted to ease compatibity with
72-
some terminals but are useless.
71+
Each frame is delimited with `LF` characters. `CR` are ignored and accepted to ease compatibility
72+
with some terminals but are useless.
7373

7474
The hex value represents the 32-bit GPIO values.
7575

@@ -117,4 +117,3 @@ Note: the first serial port of the board is reserved to its debug console.
117117
### Testing
118118

119119
See the [gpiodev.py](gpiodev.md) script.
120-

docs/opentitan/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ ninja qemu-img
2626
* `--enable-cocoa` should be used on macOS hosts
2727

2828
* `--extra-cflags=-Wno-deprecated-declarations` and
29-
`--extra-ldflags=-Wl,-no_warn_duplicate_libraries` may be required to build on recent relases of
29+
`--extra-ldflags=-Wl,-no_warn_duplicate_libraries` may be required to build on recent releases of
3030
macOS (QEMU issues which are not related to the OpenTitan port)
3131

3232
### Useful build options

docs/opentitan/jtagmbx.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ index 2ab28deac..0e84418d9 100644
155155
@@ -1882,6 +1882,8 @@ static int examine(struct target *target)
156156
return ERROR_FAIL;
157157
}
158-
158+
159159
+ target->state = TARGET_UNAVAILABLE;
160160
+ return ERROR_OK;
161161
/* Reset the Debug Module. */
@@ -168,11 +168,11 @@ index 5bae01d5f..786f2520a 100644
168168
@@ -3167,6 +3167,8 @@ int riscv_openocd_poll(struct target *target)
169169
{
170170
LOG_TARGET_DEBUG_IO(target, "Polling all harts.");
171-
171+
172172
+ return ERROR_OK;
173173
+
174174
struct list_head *targets;
175-
175+
176176
LIST_HEAD(single_target_list);
177177
```
178178

@@ -236,7 +236,7 @@ the JTAG mailbox.
236236

237237
Note: `devproxy.py` needs to be found within the Python path, using for example
238238
```sh
239-
exprot PYTHONPATH=${QEMU_SOURCE_PATH}/scripts/opentitan
239+
export PYTHONPATH=${QEMU_SOURCE_PATH}/scripts/opentitan
240240
```
241241

242242
### Troubleshooting

docs/opentitan/keymgr-dpe.md

Lines changed: 40 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -79,22 +79,37 @@ Depending on the execution mode, the following options are available:
7979
This mode can be used to generate a single output key, which can be stored into an output file.
8080

8181
```
82-
usage: keymgr-dpe.py generate [-h] [-b HEXSTR] [-g {HW,SW}] -k HEXSTR [-o OUTPUT] [-R NAME] -s HEXSTR -t {AES,KMAC,OTBN,NONE}
82+
usage: keymgr-dpe.py [-h] -c CFG -j HJSON [-l SV] [-m VMEM] [-R RAW] [-r ROM]
83+
[-e BITS] [-z SIZE] [-v] [-d]
84+
{generate,execute,verify} ...
85+
86+
QEMU OT tool to generate Key Manager DPE keys.
87+
88+
positional arguments:
89+
{generate,execute,verify}
90+
Execution mode
91+
generate generate a key
92+
execute execute sequence
93+
verify verify execution log
8394
8495
options:
8596
-h, --help show this help message and exit
86-
-b, --swbindings HEXSTR
87-
SW bindings, may be repeated
88-
-g, --gen-out {HW,SW}
89-
generation output (default: auto)
90-
-k, --key-version HEXSTR
91-
Key version
92-
-o, --output OUTPUT output file with generated key
93-
-R, --rust-const NAME
94-
Rust constant name for the generated key
95-
-s, --salt HEXSTR Salt
96-
-t, --target {AES,KMAC,OTBN,NONE}
97-
destination device
97+
98+
Files:
99+
-c, --config CFG input QEMU OT config file
100+
-j, --otp-map HJSON input OTP controller memory map file
101+
-l, --lifecycle SV input lifecycle system verilog file
102+
-m, --vmem VMEM input VMEM file
103+
-R, --raw RAW input QEMU OTP raw image file
104+
-r, --rom ROM input ROM image file, may be repeated
105+
106+
Parameters:
107+
-e, --ecc BITS ECC bit count (default: 6)
108+
-z, --rom-size SIZE ROM image size in bytes, may be repeated
109+
110+
Extras:
111+
-v, --verbose increase verbosity
112+
-d, --debug enable debug mode
98113
```
99114

100115
### Arguments
@@ -105,9 +120,17 @@ options:
105120
is automatically padded with zero bytes up to the maximum software binding size supported by the
106121
HW.
107122

123+
* `-c` specify a QEMU [configuration file](otcfg.md) from which to read all the cryptographic
124+
constants. See the [`cfggen.py`](cfggen.md) tool to generate such a file.
125+
108126
* `-g` specify the kind of generation to perform. If not specified, it is inferred from the `-t`
109127
target option.
110128

129+
* `-j` specify the path to the HJSON OTP controller map file, usually named `otp_ctrl_mmap.hjson`.
130+
131+
* `-l` specify the life cycle system verilog file, usually named `lc_ctrl_state_pkg.sv`, that
132+
defines the encoding of the life cycle states.
133+
111134
* `-k` the version of the key to generate
112135

113136
* `-o` specify the output file path for the generated key
@@ -212,9 +235,10 @@ options:
212235
### Arguments
213236

214237
* `-l` specify the execution log to verify. The execution log is expected to contain the output of
215-
a test that has run on the OpenTitan platform. It should emit a syntax identitical to the format
216-
described in the [Execute options](#execute-options) section, _i.e._ an INI-like syntax. To distinguish INI
217-
syntax from any other log output, each line of interest should be prefixed with a `T> ` marker.
238+
a test that has run on the OpenTitan platform. It should emit a syntax identical to the format
239+
described in the [Execute options](#execute-options) section, _i.e._ an INI-like syntax. To
240+
distinguish INI syntax from any other log output, each line of interest should be prefixed with a
241+
`T> ` marker.
218242

219243
[`pyot.py`](pyot.md) script may be used to generate the log file, see `--log-file` option or the
220244
`log_file` test parameter.

0 commit comments

Comments
 (0)