Skip to content

Add AMD Versal Gen 2 (VEK385) target - #992

Open
night1rider wants to merge 3 commits into
wolfSSL:masterfrom
night1rider:versal-gen-2-parity
Open

night1rider wants to merge 3 commits into
wolfSSL:masterfrom
night1rider:versal-gen-2-parity

Conversation

@night1rider

@night1rider night1rider commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Adds wolfBoot support for the AMD Versal Gen 2 VEK385 board as a new target, TARGET=versal2.

  • wolfBoot runs at EL2 after TF-A (BL31), like the Versal Gen 1 port, with A/B updates on the OSPI flash. It boots the test app or a signed Linux FIT.
  • The VEK385 is a wolfHAL board (WOLFHAL=1 BOARD=vek385). The UART, OSPI, OSPI DMA and NOR flash drivers come from wolfHAL ([reg, test] Use 32-bit register accesses on all targets wolfHAL#62, [uart, pl011, versal2, test] Add an Arm PL011 UART driver wolfHAL#63, [spimem, flash, cadence_ospi, versal2, test] Add a SPI memory type with Cadence OSPI and NOR flash drivers wolfHAL#64), so lib/wolfHAL moves to current main.
  • hal/wolfhal.c gets ext_flash_* with a partition guard: program and erase only work inside BOOT, UPDATE and SWAP.
  • The second commit is the board support: a flash reset for OSPI boot, the BIF, the JTAG script, a script that makes the board Linux DTB and the board docs. Images are written to the flash with AMD's program_flash, as for Zynq-7000.
  • The third commit adds host unit tests for the wolfHAL glue: the ext_flash code and partition guard, uart_write and the internal flash calls. test-configs.yml gets build jobs for the two new configs, plus a no-DMA and an EL1 build.
  • The bigger QEMU boot and update tests are not in this PR. They need QEMU built from source, so they are going into the testing repo as a nightly job.
  • The STM32WBA board file moves to the whal_Reg32_* calls of the newer wolfHAL. The STM32WB and STM32WBA wolfHAL builds still pass.

Copilot AI balanced review requested due to automatic review settings November 17, 2026 23:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@night1rider night1rider changed the title Versal gen 2 parity Versal gen 2 Add AMD Versal Gen 2 (VEK385) target Nov 17, 2026
@night1rider night1rider changed the title Versal gen 2 Add AMD Versal Gen 2 (VEK385) target Add AMD Versal Gen 2 (VEK385) target Nov 17, 2026
@night1rider night1rider self-assigned this Nov 17, 2026

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #992

Scan targets checked: wolfboot-src, wolfboot-bugs
Not reviewed (no scan target covers them): .github/workflows/test-configs.yml, .gitignore, arch.mk, config/examples/versal2_vek385.config, config/examples/versal2_vek385_linux.config, docs/Targets.md, docs/wolfHAL.md, hal/boards/vek385/board.mk, hal/boards/vek385/wolfHAL_board.h, hal/versal2.h, hal/versal2.ld, lib/wolfHAL, options.mk, src/boot_aarch64_start.S, test-app/Makefile, tools/scripts/versal2/board/mk_board_dtb.sh, tools/scripts/versal2/board/ospi_tool/Makefile, tools/scripts/versal2/board/ospi_tool/ospi_tool.ld, tools/scripts/versal2/board/ospi_tool/start.S, tools/scripts/versal2/board/program_jtag.tcl and 2 more
Coverage: 5 of 7 in-scope changed file(s) opened by the reviewer; not opened: hal/boards/stm32wba55cg_nucleo/wolfHAL_board.c, test-app/app_versal2.c

Findings: 3
3 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Reported findings require changes before merge.

Review tier: Max

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #992

Scan targets checked: wolfboot-src, wolfboot-bugs
Not reviewed (no scan target covers them): .github/workflows/test-configs.yml, .github/workflows/test-external-library-paths.yml, .gitignore, arch.mk, config/examples/versal2_vek385.config, config/examples/versal2_vek385_linux.config, docs/Targets.md, docs/wolfHAL.md, hal/boards/vek385/board.mk, hal/boards/vek385/wolfHAL_board.h, hal/versal2.h, hal/versal2.ld, lib/wolfHAL, options.mk, src/boot_aarch64_start.S, test-app/Makefile, tools/scripts/versal2/board/mk_board_dtb.sh, tools/scripts/versal2/board/ospi_tool/Makefile, tools/scripts/versal2/board/ospi_tool/ospi_tool.ld, tools/scripts/versal2/board/ospi_tool/start.S and 3 more
Coverage: 1 of 3 in-scope changed file(s) opened by the reviewer; not opened: tools/scripts/versal2/board/ospi_tool/ospi_tool.c, tools/unit-tests/unit-wolfhal-ext-flash.c

Fenrir result: Approved ✅

No new issues found in the changed files.

Advisory only — this automated result does not count as a GitHub approval.

Review tier: Lite

@wolfSSL-Fenrir-bot
wolfSSL-Fenrir-bot dismissed their stale review November 18, 2026 03:37

Fenrir's latest completed scan found no issues; clearing the prior automated change request.

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #992

Scan targets checked: wolfboot-src, wolfboot-bugs
Not reviewed (no scan target covers them): .github/workflows/test-configs.yml, .github/workflows/test-external-library-paths.yml, .gitignore, arch.mk, config/examples/versal2_vek385.config, config/examples/versal2_vek385_linux.config, docs/Targets.md, docs/wolfHAL.md, hal/boards/vek385/board.mk, hal/boards/vek385/wolfHAL_board.h, hal/versal2.h, hal/versal2.ld, lib/wolfHAL, src/boot_aarch64_start.S, test-app/Makefile, tools/scripts/versal2/board/mk_board_dtb.sh, tools/scripts/versal2/board/ospi_tool/Makefile, tools/scripts/versal2/board/ospi_tool/ospi_tool.ld, tools/scripts/versal2/board/ospi_tool/start.S, tools/scripts/versal2/board/program_jtag.tcl and 2 more
Coverage: 3 of 8 in-scope changed file(s) opened by the reviewer; not opened: hal/boards/stm32wba55cg_nucleo/wolfHAL_board.c, hal/boards/vek385/wolfHAL_board.c, src/boot_aarch64.c, test-app/app_versal2.c, tools/scripts/versal2/board/ospi_tool/ospi_tool.c

Fenrir result: Approved ✅

No new issues found in the changed files.

Advisory only — this automated result does not count as a GitHub approval.

Review tier: Lite

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #992

Scan targets checked: wolfboot-src, wolfboot-bugs
Not reviewed (no scan target covers them): .github/workflows/test-configs.yml, .github/workflows/test-external-library-paths.yml, .gitignore, arch.mk, config/examples/versal2_vek385.config, config/examples/versal2_vek385_linux.config, docs/Targets.md, docs/wolfHAL.md, hal/boards/vek385/board.mk, hal/boards/vek385/wolfHAL_board.h, hal/versal2.h, hal/versal2.ld, lib/wolfHAL, src/boot_aarch64_start.S, test-app/Makefile, tools/scripts/versal2/board/mk_board_dtb.sh, tools/scripts/versal2/board/ospi_tool/Makefile, tools/scripts/versal2/board/ospi_tool/ospi_tool.ld, tools/scripts/versal2/board/ospi_tool/start.S, tools/scripts/versal2/board/program_jtag.tcl and 2 more
Coverage: 1 of 4 in-scope changed file(s) opened by the reviewer; not opened: hal/boards/vek385/wolfHAL_board.c, tools/scripts/versal2/board/ospi_tool/ospi_tool.c, tools/unit-tests/unit-wolfhal-ext-flash.c

Fenrir result: Approved ✅

No new issues found in the changed files.

Advisory only — this automated result does not count as a GitHub approval.

Review tier: Lite

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #992

Scan targets checked: wolfboot-src, wolfboot-bugs
Not reviewed (no scan target covers them): .github/workflows/test-configs.yml, .github/workflows/test-external-library-paths.yml, .gitignore, arch.mk, config/examples/versal2_vek385.config, config/examples/versal2_vek385_linux.config, docs/Targets.md, docs/wolfHAL.md, hal/boards/vek385/board.mk, hal/boards/vek385/wolfHAL_board.h, hal/versal2.h, hal/versal2.ld, lib/wolfHAL, src/boot_aarch64_start.S, test-app/Makefile, tools/scripts/versal2/mk_board_dtb.sh, tools/scripts/versal2/program_jtag.tcl, tools/scripts/versal2/versal2_boot.bif, tools/unit-tests/Makefile
Coverage: 2 of 7 in-scope changed file(s) opened by the reviewer; not opened: hal/boards/stm32wba55cg_nucleo/wolfHAL_board.c, hal/boards/vek385/wolfHAL_board.c, src/boot_aarch64.c, test-app/app_versal2.c, tools/unit-tests/unit-wolfhal-ext-flash.c

Fenrir result: Approved ✅

No new issues found in the changed files.

Advisory only — this automated result does not count as a GitHub approval.

Review tier: Lite

@night1rider
night1rider force-pushed the versal-gen-2-parity branch 4 times, most recently from 9e84fd9 to c884123 Compare November 19, 2026 20:47
TARGET=versal2 runs at EL2 after BL31 as a wolfHAL board (BOARD=vek385).
hal/wolfhal.c gains ext_flash_* with a partition guard. Configs and docs.
Resets the flash out of the PLM's octal DDR mode at init. Adds the JTAG
BIF and script, the Linux DTB script and FIT source, and the board docs.
Host unit tests for the ext_flash code and partition guard, uart_write
and the internal flash calls of hal/wolfhal.c, on mock wolfHAL devices.

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #992

Scan targets checked: wolfboot-src, wolfboot-bugs
Not reviewed (no scan target covers them): .github/workflows/test-configs.yml, .github/workflows/test-external-library-paths.yml, .gitignore, Makefile, arch.mk, config/examples/versal2_vek385.config, config/examples/versal2_vek385_linux.config, docs/HAL.md, docs/Targets.md, docs/wolfHAL.md, hal/boards/vek385/board.mk, hal/boards/vek385/wolfHAL_board.h, hal/versal2.h, hal/versal2.its, hal/versal2.ld, lib/wolfHAL, src/boot_aarch64_start.S, test-app/Makefile, tools/scripts/versal2/mk_board_dtb.sh, tools/scripts/versal2/program_jtag.tcl and 2 more
Coverage: 1 of 2 in-scope changed file(s) opened by the reviewer; not opened: test-app/app_versal2.c

Fenrir result: Approved ✅

No new issues found in the changed files.

Advisory only — this automated result does not count as a GitHub approval.

Review tier: Lite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants