Skip to content

Commit ee3c313

Browse files
dgarskedanielinux
authored andcommitted
Versal port cleanups
1 parent dad2888 commit ee3c313

14 files changed

Lines changed: 551 additions & 700 deletions

File tree

.github/workflows/test-configs.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,12 @@ jobs:
572572
arch: aarch64
573573
config-file: ./config/examples/zynqmp.config
574574

575+
versal_vmk180_test:
576+
uses: ./.github/workflows/test-build-aarch64.yml
577+
with:
578+
arch: aarch64
579+
config-file: ./config/examples/versal_vmk180.config
580+
575581
sim_wolfhsm_test:
576582
uses: ./.github/workflows/test-build.yml
577583
with:

docs/Targets.md

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2041,7 +2041,7 @@ make
20412041
If you don't already have prebuilt firmware, clone the Xilinx prebuilt firmware repository:
20422042

20432043
```sh
2044-
git clone --branch xlnx_rel_v2024.1 https://github.com/Xilinx/soc-prebuilt-firmware.git
2044+
git clone --branch xlnx_rel_v2024.2 https://github.com/Xilinx/soc-prebuilt-firmware.git
20452045
export PREBUILT_DIR=$(pwd)/../soc-prebuilt-firmware/vmk180-versal
20462046
```
20472047

@@ -2066,7 +2066,7 @@ The BIF file (`boot_wolfboot.bif`) references files using relative paths in the
20662066

20672067
### Flashing QSPI
20682068

2069-
Flash `BOOT.BIN` to QSPI flash using one of the following methods:
2069+
Flash `BOOT.BIN` to QSPI flash using your preferred method. For example:
20702070

20712071
- **Vitis**: Use the Hardware Manager to program the QSPI flash via JTAG. Load `BOOT.BIN` and program to QSPI32 flash memory.
20722072

@@ -2093,15 +2093,33 @@ VMK180 uses dual parallel MT25QU01GBBB flash (128MB each, 256MB total). The QSPI
20932093

20942094
```sh
20952095
# Build and sign the test application
2096-
make test-app/image.bin
20972096
make test-app/image_v1_signed.bin
20982097
```
20992098

21002099
The signed test application will be at `test-app/image_v1_signed.bin`.
21012100

2102-
### Flashing Test Application
2101+
**Test Application Details:**
2102+
- Uses generic `boot_arm64_start.S` startup code (shared with other AArch64 platforms)
2103+
- Uses generic `AARCH64.ld` linker script with `@WOLFBOOT_LOAD_ADDRESS@` placeholder
2104+
- Displays current exception level (EL) and firmware version
2105+
- Entry point: `_start` (in `boot_arm64_start.S`) which sets up stack, clears BSS, and calls `main()`
2106+
2107+
### Firmware Update Testing
2108+
2109+
wolfBoot supports firmware updates using the UPDATE partition. The bootloader automatically selects the image with the higher version number from either the BOOT or UPDATE partition.
21032110

2104-
After flashing `BOOT.BIN` to QSPI offset 0x0, flash the signed test app to the boot partition at offset `0x800000` using your preferred method.
2111+
**Partition Layout:**
2112+
- BOOT partition: `0x800000`
2113+
- UPDATE partition: `0x3400000`
2114+
- For RAM-based boot (Versal), images are loaded to `WOLFBOOT_LOAD_ADDRESS` (`0x10000000`)
2115+
2116+
**Update Behavior:**
2117+
- wolfBoot checks both BOOT and UPDATE partitions on boot
2118+
- Selects the partition with the higher version number
2119+
- Falls back to the other partition if verification fails
2120+
- The test application displays the firmware version it was signed with
2121+
2122+
To test firmware updates, build and sign the test application with different version numbers, then flash them to the appropriate partitions using your preferred method.
21052123

21062124
### Example Boot Output
21072125

@@ -2131,7 +2149,8 @@ Booting at 0x10000000
21312149
===========================================
21322150
wolfBoot Test Application - AMD Versal
21332151
===========================================
2134-
2152+
Current EL: 1
2153+
Firmware Version: 2 (0x00000002)
21352154
Application running successfully!
21362155
21372156
Entering idle loop...

0 commit comments

Comments
 (0)