You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: IDE/XilinxSDK/README.md
+135-3Lines changed: 135 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -233,15 +233,147 @@ Note: To generate a report of a boot.bin use the `bootgen_utility` or after 2022
233
233
`bootgen -arch zynqmp -read BOOT.BIN`
234
234
235
235
236
-
# CSU Support
236
+
## CSU Support
237
+
238
+
The Configuration Security Unit (CSU) is a dedicate core that contains security functions like PUF, SHA3, RSA, Tamper Protection. These registers can only be accessed through the PMU, which is a separate dedicated core. If operating from LE2 or lower the calls must be done through the BL31 (TF-A) SIP service to elevate privledges.
239
+
240
+
Access to most CSU registers can be done by setting the `-DSECURE_ACCESS_VAL=1` build option.
237
241
238
-
Enabling PMU firmware support for access to the CSU.
239
242
In PetaLinux menuconfig under PMU Configuration add compiler flag `-DSECURE_ACCESS_VAL=1`.
243
+
240
244
```sh
241
245
petalinux-build -c pmufw
242
-
petalinux-build
243
246
```
244
247
248
+
### CSU PUF
249
+
250
+
The PUF (Physically Unclonable Function) provides a way to generate a unique key for encryption specific to the device. It is useful for wrapping other keys to pair/bind them and allows external storage of the encrypted key.
251
+
252
+
This feature is enabled with `CFLAGS_EXTRA+=-DCSU_PUF_ROT`.
253
+
254
+
For PUF functionality a patch must be applied to the PMUFW to enable access to the PUF registers. See `pm_mmio_access.c` patch below:
When RSA authentication is enabled the JTAG feature is disabled in the PMU. To re-enable it (assuming eFuse allows it) build with `CFLAGS_EXTRA+=-DDEBUG_CSU=2` and apply the PMUFW patches below.
287
+
288
+
To patch the PMUFW from PetaLinux use the following steps (for 2022.1 or later):
289
+
290
+
Based on instructions from: https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/2587197506/Zynq+UltraScale+MPSoC+JTAG+Enable+in+U-Boot
#defineCSU_PUF_STATUS_OVERFLOW_MASK0x30000000/* Overflow, if bits are not 0. Reduce SHUT[SOPEN] value. */
492
-
#defineCSU_PUF_STATUS_AUX_MASK0x0FFFFFF0/* During provisioning, auxiliary sundrome bits are stored here and must be written to the eFuse or boot image. */
493
-
#defineCSU_PUF_STATUS_KEY_RDY_MASK0x00000008
494
-
#defineCSU_PUF_STATUS_KEY_ZERO_MASK0x00000002/* Indicates that the PUF key has been zeroized */
495
-
#defineCSU_PUF_STATUS_SYN_WRD_RDY_MASK0x00000001 /* Indicates a syndrome word is ready in the PUF_WORD register. */
489
+
#defineCSU_PUF_CFG1_INIT0x0C230090U/* 4K */
490
+
#defineCSU_PUF_SHUTTER_INIT0x00100005E
491
+
492
+
#defineCSU_PUF_STATUS_OVERFLOW_MASK(0x3U << 28) /* Overflow, if bits are not 0. Reduce SHUT[SOPEN] value. */
493
+
#defineCSU_PUF_STATUS_AUX_MASK(0xFFFFFFU << 4)/* During provisioning, auxiliary sundrome bits are stored here and must be written to the eFuse or boot image. */
494
+
#defineCSU_PUF_STATUS_KEY_RDY_MASK(0x1U << 3) /* Indicates that the key is ready */
495
+
#defineCSU_PUF_STATUS_KEY_ZERO_MASK(0x1U << 1) /* Indicates that the PUF key has been zeroized */
496
+
#defineCSU_PUF_STATUS_SYN_WRD_RDY_MASK(0x1U << 0) /* Indicates a syndrome word is ready in the PUF_WORD register */
0 commit comments