Skip to content

Add Agilex 5 FCS and wolfBoot integration - #846

Draft
aidangarske wants to merge 2 commits into
wolfSSL:masterfrom
aidangarske:agilex5-tfa-port
Draft

Add Agilex 5 FCS and wolfBoot integration#846
aidangarske wants to merge 2 commits into
wolfSSL:masterfrom
aidangarske:agilex5-tfa-port

Conversation

@aidangarske

@aidangarske aidangarske commented Aug 6, 2026

Copy link
Copy Markdown
Member

Description

  • Adds the Altera Agilex 5 013B wolfBoot port for the GSRD SD-card boot flow
  • Preserves the existing SPL and TF-A responsibilities for DDR, clocks, resets, PSCI, and EL3
  • Loads wolfBoot as the signed BL33 payload at 0x80200000
  • Adds Agilex 5 SDHCI and platform initialization support
  • Integrates signed Linux FIT images with wolfBoot verification
  • Adds a four-partition WIC layout with initialized A and B image slots
  • Adds Yocto/meta-wolfSSL integration, CI coverage, and customer bring-up documentation
  • Validated the generated WIC through the customer Kas build and on Agilex 5 hardware

partner pr: wolfSSL/meta-wolfssl#177

Copilot AI lite review requested due to automatic review settings August 6, 2026 23:19

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.

Pull request overview

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Adds an Altera Agilex 5 (013B) port and integration points to boot wolfBoot as BL33 in the GSRD SD-card flow, including SDHCI/platform init, memory mapping, example FIT artifacts, and CI build coverage.

Changes:

  • Adds Agilex 5 HAL (C + header), linker script, FIT example, and a BL33 smoke-test app.
  • Updates AArch64 startup/MMU mappings and SDHCI behavior to support Agilex 5 boot/SD timing.
  • Updates disk-boot logging and adds docs/config + GitHub Actions build coverage for the new target.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
test-app/app_agilex5.c Adds a BL33 smoke-test app for Agilex 5 (timer + EL print).
src/update_disk.c Improves disk-boot debug output (block size + pointer-format prints).
src/sdhci.c Adds command-line reset, inhibit timeouts, optional post-command delay, and CMD8 retry logic.
src/boot_aarch64_start.S Adds Agilex 5 include, adjusts CNTFRQ/RVBAR handling, and adds Agilex 5 MMU mappings.
src/boot_aarch64.c Adds Agilex 5 HAL include selection for AArch64 boot code.
include/sdhci.h Adds reset bit definitions and new SDHCI tuning/behavior macros.
hal/agilex5.ld New linker script matching BL33 placement at 0x80200000.
hal/agilex5.its Example FIT description for Agilex 5 Linux payload (kernel + DTB).
hal/agilex5.h New Agilex 5 target configuration and platform constants.
hal/agilex5.c New Agilex 5 HAL implementation (timer, UART, DT fixups, SDHCI PHY + DMA cache ops).
docs/Targets.md Documents the new Agilex 5 target and references Agilex5 bring-up doc.
docs/Agilex5.md Adds bring-up and integration documentation (GSRD/FIT/WIC/test order/CI).
config/examples/agilex5_013b_sdcard.config Adds a buildable example config for Agilex 5 SD-card boot flow.
arch.mk Adds Agilex 5 AArch64 flags + target-specific bootloader responsibilities.
.github/workflows/test-configs.yml Adds Agilex 5 config to existing CI matrix via reusable workflow.
.github/workflows/test-build-agilex5.yml Adds a dedicated Agilex 5 build workflow (path-filtered).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test-app/app_agilex5.c

hal_init();
wolfBoot_printf("\nAgilex 5 BL33 smoke test\n");
wolfBoot_printf("Current EL: %d (expected 2)\n", current_el());
Comment thread test-app/app_agilex5.c
Comment on lines +50 to +51
wolfBoot_printf("Generic timer advanced by %d us\n",
(uint32_t)(now - start));
Comment thread src/update_disk.c
Comment on lines 384 to 388

/* Choose partition with higher version */
selected = (pB_ver_u > pA_ver_u) ? 1 : 0;

#ifdef WOLFBOOT_FSP
Comment thread src/sdhci.c
Comment on lines 530 to 533

int sdhci_cmd(uint32_t cmd_index, uint32_t cmd_arg, uint8_t resp_type)
{
/* send command */
Comment thread hal/agilex5.c
Comment on lines +314 to +319
for (addr = start; addr < end; addr += CACHE_LINE_SIZE) {
if (is_write != 0)
__asm__ volatile("dc cvac, %0" : : "r"(addr) : "memory");
else
__asm__ volatile("dc civac, %0" : : "r"(addr) : "memory");
}
Comment thread docs/Agilex5.md
SDM -> U-Boot SPL -> TF-A BL31/EL3 -> wolfBoot BL33/EL2 -> signed Linux FIT
```

SPL remains responsible for DDR, clocks, resets, pinmux, the SD6HC PHY and
Comment thread src/boot_aarch64_start.S
Comment on lines +90 to 93
#if defined(TARGET_versal) || defined(TARGET_agilex5)
/* Versal: RVBAR is handled by PLM, not accessible from APU in JTAG mode */
/* Cortex-A72 timestamp clock frequency (from Versal HW) */
/* BL31 has already programmed CNTFRQ_EL0 on BL33-entry platforms. */
.set counterfreq, 100000000
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.

2 participants