Skip to content

Commit 934f088

Browse files
pamauryHU90m
authored andcommitted
[doc] Replace old snippets & pkgmrg_cmd shortcodes
The 'snippets' shortcode can be replaced with mdbook's built in #include pre-processor. The 'pkgmgr_cmd' shortcode is only used once and can be replaced with a command that doesn't need to change when `apt_requirements.txt` is updated. `util/rewrite_frontmatter.py` can be removed because it won't be needed again. Signed-off-by: Amaury Pouly <[email protected]> Co-authored-by: Hugo McNally <[email protected]>
1 parent f6298b3 commit 934f088

File tree

7 files changed

+17
-77
lines changed

7 files changed

+17
-77
lines changed

doc/guides/getting_started/src/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ have a minimum of **32GiB of physical RAM** and at least **512GiB of SSD/HDD sto
5858
A number of software packages from the distribution's package manager are required.
5959
On Ubuntu 20.04, the required packages can be installed with the following command.
6060

61-
{{< pkgmgr_cmd "apt" >}}
61+
```sh
62+
sed -e '/^$/d' -e '/^#/d' ./apt-requirements.txt | sudo apt install -y
63+
```
6264

6365
Some tools in this repository are written in Python 3 and require Python dependencies to be installed through `pip`.
6466
We recommend installing the latest version of `pip` and `setuptools` (especially if on older systems such as Ubuntu 18.04) using:

hw/ip/lc_ctrl/README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ They exist only after specific events, and are restored to normal once the devic
151151

152152
The individual signals summarized in the table below are described in the following subsections.
153153

154-
{{< snippet "lc_ctrl_function_signals_table.md" >}}
154+
{{#include doc/lc_ctrl_function_signals_table.md}}
155155

156156
Signals marked with an asterisk (Y\*) are only asserted under certain conditions as explained in detail below.
157157

@@ -232,7 +232,7 @@ For details on the clock switch, please see [clkmgr](../clkmgr/README.md#life-cy
232232

233233
The individual signals summarized in the table below are described in the following subsections.
234234

235-
{{< snippet "lc_ctrl_access_signals_table.md" >}}
235+
{{#include doc/lc_ctrl_access_signals_table.md}}
236236

237237
Signals marked with an asterisk (Y\*) are only asserted under certain conditions as explained in detail below.
238238

@@ -267,7 +267,7 @@ The following is a list of all life cycle related collateral stored in OTP.
267267
Most collateral also contain associated metadata to indicate when the collateral is restricted from further software access, see [accessibility summary](#otp-accessibility-summary-and-impact-of-provision_en) for more details.
268268
Since not all collateral is consumed by the life cycle controller, the consuming agent is also shown.
269269

270-
{{< snippet "lc_ctrl_otp_collateral.md" >}}
270+
{{#include doc/lc_ctrl_otp_collateral.md}}
271271

272272
The TOKENs and KEYS are considered secret data and are stored in [wrapped format](#conditional-transitions).
273273
Before use, the secrets are unwrapped.
@@ -313,7 +313,7 @@ These are
313313

314314
The table below summarizes the software accessibility of all life cycle collateral.
315315

316-
{{< snippet "lc_ctrl_otp_accessibility.md" >}}
316+
{{#include doc/lc_ctrl_otp_accessibility.md}}
317317

318318
Note that CREATOR_SEED_SW_RW_EN is set to OFF if SECRET2_DIGEST has a nonzero value in PROD, PROD_END and DEV states.
319319
SEED_HW_RD_EN only becomes active if SECRET2_DIGEST has a nonzero value in DEV, PROD, PROD_END and RMA states.
@@ -325,11 +325,11 @@ As it pertains to life cycle, the flash contains two sets of important collatera
325325
They are enumerated in the table below.
326326
Just as with OTP, the consumer and usage of each is also described.
327327

328-
{{< snippet "lc_ctrl_flash_collateral.md" >}}
328+
{{#include doc/lc_ctrl_flash_collateral.md}}
329329

330330
Each collateral belongs to a separate flash partition, the table below enumerates the partition and whether the partition is memory mapped.
331331

332-
{{< snippet "lc_ctrl_flash_partitions.md" >}}
332+
{{#include doc/lc_ctrl_flash_partitions.md}}
333333

334334
The general flash partition refers to any software managed storage in flash, and is not a specific carve out in the non-memory mapped area.
335335

@@ -342,7 +342,7 @@ It is expected that ROM_ext during secure boot programs the protection correctly
342342
The CREATOR_DATA partitions however, are further qualified based on the personalization state of the device.
343343
Just as with OTP, the table below enumerates accessibility of flash collateral.
344344

345-
{{< snippet "lc_ctrl_flash_accessibility.md" >}}
345+
{{#include doc/lc_ctrl_flash_accessibility.md}}
346346

347347
Note that CREATOR_SEED_SW_RW_EN is set to OFF if SECRET2_DIGEST has a nonzero value in PROD, PROD_END and DEV states.
348348
SEED_HW_RD_EN only becomes active if SECRET2_DIGEST has a nonzero value in DEV, PROD, PROD_END and RMA states.
@@ -503,7 +503,7 @@ See [pinmux documentation](../pinmux/README.md#strap-sampling-and-tap-isolation)
503503
The encoding of the life-cycle state is used both for OTP storage and as part of the FSM state in the life cycle controller.
504504
In other words the state stored within OTP is not re-encoded before it is consumed as part of the life cycle controller FSM state.
505505

506-
{{< snippet "lc_ctrl_encoding_table.md" >}}
506+
{{#include doc/lc_ctrl_encoding_table.md}}
507507

508508
Any decoding that does not fall into the table above is considered **INVALID**.
509509

@@ -537,7 +537,7 @@ The second readout pass uses a linearly increasing address sequence, whereas the
537537
The life cycle transition counter has 24 strokes where each stroke maps to one 16bit OTP word.
538538
The strokes are similarly encoded as the life cycle state in the sense that upon the first transition attempt, all words are initialized with unique Cx values that can later be overwritten with unique Dx values without producing an ECC error.
539539

540-
{{< snippet "lc_ctrl_counter_table.md" >}}
540+
{{#include doc/lc_ctrl_counter_table.md}}
541541

542542
Upon each life cycle transition attempt, the life cycle controller **FIRST** increments the transition counter before initiating any token hashing and comparison operations.
543543

hw/ip/otp_ctrl/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Thus the security of both volatile (OTP controller) and non-volatile (OTP IP) st
103103

104104
The OTP controller for OpenTitan contains the seven logical partitions shown below.
105105

106-
{{< snippet "otp_ctrl_partitions.md" >}}
106+
{{#include doc/otp_ctrl_partitions.md}}
107107

108108
Generally speaking, the production life cycle of a device is split into 5 stages "Manufacturing" -> "Calibration and Testing" -> "Provisioning" -> "Mission" -> "RMA".
109109
OTP values are usually programmed during "Calibration and Testing", "Provisioning" and "RMA" stages, as explained below.
@@ -928,14 +928,14 @@ Hence, a read access to those windows will take in the order of 10-20 cycles unt
928928

929929
Sizes below are specified in multiples of 32bit words.
930930

931-
{{< snippet "otp_ctrl_mmap.md" >}}
931+
{{#include doc/otp_ctrl_mmap.md}}
932932

933933
Note that since the content in the SECRET* partitions are scrambled using a 64bit PRESENT cipher, read and write access through the DAI needs to occur at a 64bit granularity.
934934
Also, all digests (no matter whether they are SW or HW digests) have an access granule of 64bit.
935935

936936
The table below lists digests locations, and the corresponding locked partitions.
937937

938-
{{< snippet "otp_ctrl_digests.md" >}}
938+
{{#include doc/otp_ctrl_digests.md}}
939939

940940
Write access to the affected partition will be locked if the digest has a nonzero value.
941941

hw/ip/pinmux/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ The tables below summarize the pinout and pinmux connectivity for certain top-le
372372

373373
### Top Earlgrey
374374

375-
{{< snippet "../../../top_earlgrey/ip/pinmux/doc/autogen/targets.md" >}}
375+
{{#include ../../top_earlgrey/ip/pinmux/doc/autogen/targets.md}}
376376

377377
## Device Interface Functions (DIFs)
378378

hw/top_earlgrey/ip/ast/README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ device from physical attacks or manipulation.
1010
At a high level, AST communicates with a number of OpenTitan comportable
1111
modules. See diagram below.
1212

13-
<img src="./media/image1.png"
14-
style="width:7.08333in;height:5.60417in" />
13+
![Analog Sensor Top Diagram](./doc/top_diagram.png)
1514

1615
In the following sections, each family of connection is briefly
1716
described and explained. Note, the analog connections to AST are not

util/rewrite_frontmatter.py

-61
This file was deleted.

0 commit comments

Comments
 (0)