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
{{ message }}
Repository navigation
Commit aef57a1
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/Targets.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5290,6 +5290,22 @@ Key configuration options in `config/examples/versal_vmk180.config`:
5290
5290
-`EXT_FLASH=1` - External flash support
5291
5291
-`ELF=1` - ELF loading support
5292
5292
5293
+
### System Watchdog (SWDT/WWDT)
5294
+
5295
+
Versal has two system watchdog timers: `LPD_SWDT` at `0xFF120000` (wired for the RPU) and `FPD_SWDT` at `0xFD4D0000` (for the APU). `WATCHDOG=1` has wolfBoot reprogram, refresh and settle one of them, for a design that arms it from its `.cdo` so a hung bootloader resets the board.
5296
+
5297
+
| Option | Default | Meaning |
5298
+
|--------|---------|---------|
5299
+
|`WATCHDOG`|`0`| Manage the watchdog through wolfBoot's boot and settle it before the OS. |
5300
+
|`WATCHDOG_TIMEOUT_MS`|`30000`| Timeout to program. It has to exceed a signature verify, which is one call with no loop to refresh from. |
5301
+
|`WATCHDOG_BASE`|`0xFD4D0000`| Instance to use; `0xFF120000` is the LPD one. |
5302
+
|`WATCHDOG_CLK_HZ`|`150000000`| Counting clock, `FPD_LSBUS` or `LPD_LSBUS`. The default is the rate the VMK180 reference design uses, not the 100 MHz its device tree advertises; below the real rate the window shortens in proportion, so a design with a different lsbus divider must set this. |
5303
+
|`WATCHDOG_HANDOFF`|`0`| Leave it armed with a full window for an OS that will take it over, instead of stopping it. The OS watchdog node then has to be enabled and its driver servicing it. |
5304
+
5305
+
The default stops the watchdog in `hal_prepare_boot()`, as U-Boot does before it boots Linux. wolfBoot reprograms the timer with no closed (first) window so that its own refreshes - from the hash, decompression, flash and disk loops via `wolfBoot_watchdog_feed()` - are always legal. A refresh or a disable is only honored while the open (second) window is current, elsewhere the hardware records a bad event and ignores a disable, so both wait for that window and report rather than assume. Window and generic mode are both handled and a generic-mode watchdog stays generic; Q&A mode is reported and left alone.
5306
+
5307
+
The PDI must release the block's reset and clock (`CRF.RST_FPD_SWDT` at `0xFD1A0314`, `CRL.RST_LPD_SWDT` at `0xFF5E034C`); wolfBoot makes no EEMI calls. Without `WATCHDOG` it neither reads nor writes the block, since a read of one still in reset can abort at EL2 - so a CDO-armed watchdog is only handled in a `WATCHDOG=1` build.
Copy file name to clipboardExpand all lines: docs/compile.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -538,6 +538,10 @@ iterating over a range of flash sectors and erasing them one at a time. Setting
538
538
single HAL flash erase invocation with a larger erase length versus the iterative approach. On targets where multi-sector erases are more performant, this option can be used to dramatically speed up the
539
539
image swap procedure.
540
540
541
+
### Hardware watchdog
542
+
543
+
`WATCHDOG=1` tells the HAL to manage a hardware watchdog across wolfBoot's own boot, with `WATCHDOG_TIMEOUT_MS` as the timeout it programs. wolfBoot calls `wolfBoot_watchdog_feed()` from its hash, decompression, flash copy/erase and disk read loops; the weak default in `src/libwolfboot.c` is a no-op that a HAL overrides, and without `WATCHDOG` the calls compile out. A signature verify is one blocking call with no loop to refresh from, so the timeout has to exceed it. Which watchdog a target drives, and what it does with it at the handoff, is per-HAL: see `hal/versal.c`, `hal/mpfs250.c`, `hal/s32k1xx.c`, `hal/renesas-rx.c` and the per-target options in [Targets.md](Targets.md).
544
+
541
545
### Building with the ARM Compiler for Embedded (armclang)
542
546
543
547
wolfBoot can be built with the [ARM Compiler for Embedded](https://developer.arm.com/Tools%20and%20Software/Arm%20Compiler%20for%20Embedded)
0 commit comments