Skip to content

Commit 665d5c1

Browse files
committed
Versal port cleanups
1 parent 1b731b7 commit 665d5c1

File tree

14 files changed

+551
-700
lines changed

14 files changed

+551
-700
lines changed

.github/workflows/test-configs.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,12 @@ jobs:
548548
arch: aarch64
549549
config-file: ./config/examples/zynqmp.config
550550

551+
versal_vmk180_test:
552+
uses: ./.github/workflows/test-build-aarch64.yml
553+
with:
554+
arch: aarch64
555+
config-file: ./config/examples/versal_vmk180.config
556+
551557
sim_wolfhsm_test:
552558
uses: ./.github/workflows/test-build.yml
553559
with:

docs/Targets.md

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

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

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

19481948
### Flashing QSPI
19491949

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

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

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

19751975
```sh
19761976
# Build and sign the test application
1977-
make test-app/image.bin
19781977
make test-app/image_v1_signed.bin
19791978
```
19801979

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

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

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

19872005
### Example Boot Output
19882006

@@ -2012,7 +2030,8 @@ Booting at 0x10000000
20122030
===========================================
20132031
wolfBoot Test Application - AMD Versal
20142032
===========================================
2015-
2033+
Current EL: 1
2034+
Firmware Version: 2 (0x00000002)
20162035
Application running successfully!
20172036
20182037
Entering idle loop...

0 commit comments

Comments
 (0)