Knowledge Base Article
Why does the ATF to Linux* Direct boot flow fail to boot from SD/eMMC in Quartus® Prime Pro version 25.1.1 and earlier when ATF is built with ARM* GCC compiler version 12.2 or higher on Agilex® 5 FPGA or Agilex® 3 FPGA devices?
Description
Due to a problem in the optimization process of the ARM GCC compiler, versions 12.2 and higher, the Arm Trusted Firmware (ATF) SD/eMMC Cadence driver for Agilex® 5 FPGA and Agilex® 3 FPGA devices, in Quartus® Prime Pro Edition releases 25.1.1 and earlier, fails to send commands to SD cards or eMMC devices during the ATF to Linux Direct boot flow.
The root cause is improper memory alignment of the ADMA2 descriptor address (requires 8-byte alignment for 64-bit addressing mode). GCC 12.2+ optimization introduces this misalignment.
Resolution
To work around this problem in Quartus Prime Pro Edition software version 25.1.1 and earlier, use one of the following options:
- In drivers/cadence/emmc/cdns_sdmmc.c, add __aligned(8) to the cdns_desc array for CONFIG_DMA_ADDR_T_64BIT.
- Build ATF with ARM GCC compiler version 11.3 or earlier.
- Disable optimizations when building ATF using CFLAGS="-O0" (may increase boot time).
The problem has been fixed starting with Quartus Prime Pro Edition software version 25.3.
Updated 4 months ago
Version 6.0No CommentsBe the first to comment