Skip to content

Commit a0bdd38

Browse files
committed
Versal port cleanups
1 parent eb34c4f commit a0bdd38

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
@@ -1923,7 +1923,7 @@ make
19231923
If you don't already have prebuilt firmware, clone the Xilinx prebuilt firmware repository:
19241924

19251925
```sh
1926-
git clone --branch xlnx_rel_v2024.1 https://github.com/Xilinx/soc-prebuilt-firmware.git
1926+
git clone --branch xlnx_rel_v2024.2 https://github.com/Xilinx/soc-prebuilt-firmware.git
19271927
export PREBUILT_DIR=$(pwd)/../soc-prebuilt-firmware/vmk180-versal
19281928
```
19291929

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

19491949
### Flashing QSPI
19501950

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

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

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

19761976
```sh
19771977
# Build and sign the test application
1978-
make test-app/image.bin
19791978
make test-app/image_v1_signed.bin
19801979
```
19811980

19821981
The signed test application will be at `test-app/image_v1_signed.bin`.
19831982

1984-
### Flashing Test Application
1983+
**Test Application Details:**
1984+
- Uses generic `boot_arm64_start.S` startup code (shared with other AArch64 platforms)
1985+
- Uses generic `AARCH64.ld` linker script with `@WOLFBOOT_LOAD_ADDRESS@` placeholder
1986+
- Displays current exception level (EL) and firmware version
1987+
- Entry point: `_start` (in `boot_arm64_start.S`) which sets up stack, clears BSS, and calls `main()`
1988+
1989+
### Firmware Update Testing
1990+
1991+
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.
19851992

1986-
After flashing `BOOT.BIN` to QSPI offset 0x0, flash the signed test app to the boot partition at offset `0x800000` using your preferred method.
1993+
**Partition Layout:**
1994+
- BOOT partition: `0x800000`
1995+
- UPDATE partition: `0x3400000`
1996+
- For RAM-based boot (Versal), images are loaded to `WOLFBOOT_LOAD_ADDRESS` (`0x10000000`)
1997+
1998+
**Update Behavior:**
1999+
- wolfBoot checks both BOOT and UPDATE partitions on boot
2000+
- Selects the partition with the higher version number
2001+
- Falls back to the other partition if verification fails
2002+
- The test application displays the firmware version it was signed with
2003+
2004+
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.
19872005

19882006
### Example Boot Output
19892007

@@ -2013,7 +2031,8 @@ Booting at 0x10000000
20132031
===========================================
20142032
wolfBoot Test Application - AMD Versal
20152033
===========================================
2016-
2034+
Current EL: 1
2035+
Firmware Version: 2 (0x00000002)
20172036
Application running successfully!
20182037
20192038
Entering idle loop...

0 commit comments

Comments
 (0)