embedded - hard processor system (hps)
28 TopicsWhy does the Linux* EDAC driver report "Previous Boot UE detected[0x40000]" on Agilex® 7 FPGA F and I-Series SoC FPGA devices?
Description The Linux* EDAC driver (drivers/edac/altera_edac.c) in the SoCFPGA Linux 6.12.11-lts (and earlier versions) may print a false Uncorrectable Error (UE) message during driver probe on Agilex® 7 F/I series SoC FPGA platform, as shown below. EDAC Altera: Previous Boot UE detected[0x40000] @ 0x0 The EDAC driver maps BOOT_SCRATCH_COLD8 (offset address0x220in System Manager, absolute address 0xFFD12220) to S10_SYSMGR_UE_VAL_OFST and treats any non-zero value as evidence of a previous boot UE event. At probe time, the driver checks: if (dberror) { ... } instead of properly masking with: if (dberror & AGX7F_I_DBE_IRQ_MASK) { ... } The valid UE sticky mask AGX7F_I_DBE_IRQ_MASK(0x30002) covers bits 1/16/17 only. When the value of BOOT_SCRATCH_COLD8 is 0x40000 in which bit 18 represents the SDM ACF DDR data rate per the Agilex 7 F/I SoC FPGA register definition, but it’s reported as a DDR UE/DBE by Linux EDAC driver by mistake. The driver does not account for the differences among the various Agilex 7 device series or for future device families. BOOT_SCRATCH_COLD8 bit definitions: Bit field Agilex 7 F/I-Series Agilex 7 M-Series Values / description Usage or source [31] Available as scratch memory DBE Triggered Flag M-Series:0: DDR DBE not triggered; 1: DDR DBE triggered U-Boot ddr_ecc_dbe_status(): evaluates DDR ECC DBE status [30] Available as scratch memory DDR Init in progress M-Series:0: DDR initialization not performed or completed successfully; 1: DDR initialization in progress U-Boot is_ddr_init_hang() checks the bit; ddr_init_inprogress() sets or clears it [29] Available as scratch memory OCRAM_DBE Error Flag M-Series:0: error did not occur; 1: error occurred U-Boot hps_ocram_dbe_status() returns OCRAM DBE status; ddr_init_inprogress() sets or clears it [28:27] Available as scratch memory Number of IO96B instances assigned to HPS M-Series:Written during DDR handoff data population U-Boot update_io96b_assigned_to_hps() [19] Flag indicating that a CPU power domain is about to be turned on; value 1 Flag indicating that a CPU power domain is about to be turned on; value 1 F/I/M-Series:A value of 1 indicates that the CPU power domain is about to be turned on ATF socfpga_pwr_domain_on() [18] ACF DDR data rate set by SDM Available as scratch memory F/I-Series: 0 = half-rate; 1 = quarter-rate U-Boot sdram_mmr_init_full() uses the value to configure DDRIOCTRL [17] ECC_DBE_DDR1 Error Flag ECC_DBE_DDR1 Error Flag F/I/M-Series:0: error did not occur; 1: error occurred ATF cold_reset_for_ecc_dbe() checks the flag; Linux sets it through the ATF SMC handler [16] ECC_DBE_DDR0 Error Flag ECC_DBE_DDR0 Error Flag F/I/M-Series:0: error did not occur; 1: error occurred ATF cold_reset_for_ecc_dbe() checks the flag; Linux sets it through the ATF SMC handler [1] ECC_DBE_OCRAM Error Flag ECC_DBE_OCRAM Error Flag F/I/M-Series:0: error did not occur; 1: error occurred ATF cold_reset_for_ecc_dbe() checks the flag; Linux sets it through the ATF SMC handler Impact: No actual DDR UE event is indicated by 0x40000. The false-positive log does not trigger kernel panic, reboot, or EDAC fault handling. However, the driver executes a full register write of zero to both BOOT_SCRATCH_COLD8 and BOOT_SCRATCH_COLD9 after printing the message, which may clear other valid scratch data (ATF, SDM, DDR progress bits) used by boot software on subsequent resets. Real DDR ECC uncorrectable errors continue to be reported correctly through the runtime ECC interrupt path (ECC_INTSTATUS_DERR @ sysmgr +0xA0). Resolution A patch has been applied to remove the incorrect previous DBE check using the BOOT_SCRATCH_COLD8 register during EDAC driver probe. ES-14508: EDAC/altera: Remove previous DBE check using boot scratch c… · altera-fpga/linux-socfpga@d06daa2 Related Articles A.7. BOOT_SCRATCH_COLD8 - 2025-12-16 linux-socfpga/drivers/edac/altera_edac.c at socfpga-6.12.11-lts · altera-fpga/linux-socfpga9Views0likes0CommentsWhy does the NVMe device report errors after an HPS warm reset on Agilex® 5 ES devices when FPGA reconfiguration is skipped?
Description Due to a problem in the Agilex® 5 ES devices (A5Ex065BxxxxExxR0 and A5Ex065AxxxxExxR0), the FPGA-to-HPS (F2H) bridge can fail after an HPS warm or cold reset, or after a subsequent FPGA reconfiguration, when the System Memory Management Unit (SMMU) is enabled in HPS Boot First mode. To avoid this, some PCIe* Root Port designs skip FPGA reconfiguration in U-Boot after an HPS warm reset and keep the FPGA configuration from the previous boot. When FPGA reconfiguration is skipped, the PCIe Root Port in the FPGA fabric and the attached Non-Volatile Memory Express (NVMe) endpoint are not reset. They keep stale state from the previous boot. When Linux enumerates the PCIe bus and loads the NVMe driver, the stale state might cause the NVMe admin command to time out and the NVMe driver probe to fail. The kernel log shows messages similar to: nvme nvme0: pci function 0000:01:00.0 nvme nvme0: I/O tag 24 (0018) QID 0 timeout, disable controller nvme nvme0: Device not ready; aborting shutdown, CSTS=0x5 nvme nvme0: Identify Controller failed (-4) nvme 0000:01:00.0: probe with driver nvme failed with error -5 The NVMe device still enumerates and its BAR is assigned, but /dev/nvme0n1 is not created. Refer to the section "FPGA-to-HPS (F2H) bridge, HPS warm/cold reset and FPGA reconfiguration issues with SMMU enabled" in the Agilex® 5 ES Device Errata and User Guidelines. Resolution To work around this problem on Agilex 5 ES devices, reset the PCIe Root Port secondary bus and re-enumerate the PCIe devices from Linux after an HPS warm reset. Run these commands as root: Assert a secondary bus reset by setting bit 6 of the Bridge Control register on the Root Port: setpci -s 00:00.0 BRIDGE_CONTROL=40:40 Wait, then release the reset by clearing bit 6: sleep 1 setpci -s 00:00.0 BRIDGE_CONTROL=00:40 Wait for the link to retrain, then remove the Root Port device: sleep 1 echo 1 > /sys/bus/pci/devices/0000:00:00.0/remove Rescan all PCIe buses: echo 1 > /sys/bus/pci/rescan After the rescan, Linux re-enumerates the Root Port and the NVMe device with clean state. This problem is fixed in Agilex 5 production devices (A5Ex065BxxxxExx and A5Ex065AxxxxExx). Additional Information 00:00.0 is the Root Port bus/device/function in the Agilex 5 PCIe Root Port system example design. Run lspci to confirm the Root Port address in your system and replace 00:00.0 if it differs. The setpci value 40:40 uses the value:mask format, so it changes bit 6 only and leaves the other Bridge Control bits unchanged. The PCI Express® Base Specification requires the secondary bus reset to be held for at least 1 ms, and software to wait at least 100 ms after releasing it before sending configuration requests. The sleep 1 commands above meet both requirements. An FPGA power cycle (cold boot) also resets the Root Port and the NVMe device.38Views0likes0CommentsWhy is the HPS I2C SCL clock frequency above 400 kHz in fast mode when using U-Boot?
Description When the HPS I2C controller is configured for fast mode (clock-frequency = <400000>) in U-Boot, the measured SCL frequency might exceed the 400 kHz maximum in the I2C specification (for example, 431 kHz) on SoC FPGA designs. This happens because the U-Boot DesignWare I2C driver (drivers/i2c/designware_i2c.c) calculates the SCL high and low counts from assumed SCL rise and fall times. When the device tree does not specify them, the driver assumes default 300 ns for both in fast mode. The driver subtracts the assumed rise time from the SCL period. If the board's actual SCL rise time is shorter than 300 ns, the unused part of that allowance shortens the period, and SCL runs faster than 400 kHz. The Linux DesignWare I2C driver uses a different calculation and different device tree properties, so the same device tree node can give different SCL frequencies in U-Boot and Linux. Resolution To set the SCL timing to match your board, follow these steps: Measure the SCL and SDA rise times (30%–70%) and fall times (70%–30%) on your board with an oscilloscope, in fast mode. In the U-Boot device tree, add the measured values to the HPS I2C node: &i2c0 { clock-frequency = <400000>; i2c-scl-rising-time-ns = <[measured tr]>; i2c-scl-falling-time-ns = <[measured tf]>; i2c-sda-hold-time-ns = <[required hold, default 300]>; }; For Linux, add the SDA fall time to the same node. The Linux driver uses i2c-sda-falling-time-ns for the SCL high count and i2c-scl-falling-time-ns for the SCL low count, and ignores i2c-scl-rising-time-ns: i2c-sda-falling-time-ns = <[measured tf]>; Rebuild U-Boot and the Linux device tree blob, then re-measure SCL in both U-Boot and Linux to confirm the frequency is at or below 400 kHz and that tLOW ≥ 1.3 µs and tHIGH ≥ 0.6 µs. Note these points when tuning: In U-Boot, enter the actual measured rise time. A larger i2c-scl-rising-time-ns value makes SCL faster, not slower. In U-Boot, i2c-scl-falling-time-ns changes only the high/low duty cycle, not the frequency. In Linux, larger fall-time values make SCL slower. Do not lower clock-frequency below 400000 in U-Boot to slow the bus. Any value below 400000 selects standard mode (100 kHz timing). snps,bus-capacitance-pf has no effect in fast mode. U-Boot ignores it, and Linux uses it only for high-speed mode (3.4 MHz). Additional Information Property U-Boot Linux clock-frequency Sets the target SCL period (default 100 kHz) Selects the speed mode only (default 400 kHz) i2c-scl-rising-time-ns Sets the SCL frequency (default 300 ns in fast mode, 1000 ns in standard mode) Ignored by the DesignWare driver i2c-scl-falling-time-ns Changes the duty cycle only (default 300 ns) Sets the SCL low count (default 300 ns) i2c-sda-falling-time-ns Ignored Sets the SCL high count (default 300 ns) i2c-sda-hold-time-ns Sets the SDA hold time (default 300 ns) Sets the SDA hold time (default: keeps the existing hardware value) snps,bus-capacitance-pf Ignored Used in high-speed mode (3.4 MHz) only31Views0likes0CommentsWhy does the Agilex® 5 FPGA E-Series 065B Modular Development Kit 10GbE System Example Design fail to boot from the SD card with "Card did not respond to voltage select"?
Description Due to a problem in the Agilex® 5 Ethernet System Example Design (SED) for the Agilex® 5 FPGA and SoC E-Series 065B Modular Development Kit (MDK, ordering code MK-A5E065BB32AEA), designed with the Quartus® Prime Pro Edition Software version 26.1 (SED release Q26.1 Rel-1.2), the Hard Processor System (HPS) might fail to boot from the SD card. After DDR calibration succeeds, the U-Boot Secondary Program Loader (SPL) reports: Trying to boot from MMC1 Card did not respond to voltage select! : -110 spl: mmc init failed with error: -95 SPL: failed to boot from all boot devices This happens for two reasons, and both must be corrected: The prebuilt SPL provided with the design (src/sw/artifacts/u-boot-spl-dtb.hex) switches the SD card I/O voltage through an HPS GPIO. On the 065B MDK, the SD card voltage is switched through the I²C GPIO expander. The SPL built by the design's own Yocto flow uses the I²C GPIO expander and works. The HPS configuration in the design does not match the 065B MDK: HPS pins HPS_IOA_1, HPS_IOA_11, HPS_IOB_4 and HPS_IOB_5 are not configured as GPIO, and the main PLL, peripheral PLL and MPU clock overrides are enabled. With this configuration, the SD card fails to initialize even with the Yocto-built SPL. Refer to the Agilex® 5 FPGA E-Series 065B Modular Development Kit 10GbE System Example Design user guide. Resolution To work around this problem in the Quartus® Prime Pro Edition Software version 26.1, follow these steps: 1. In Platform Designer, open the HPS IP (src/hw/src/ip/hps_subsys/agilex_hps.ip). In the pin mux settings, set: HPS_IOA_1 to GPIO0:IO0 HPS_IOA_11 to GPIO0:IO10 HPS_IOB_4 to GPIO1:IO3 HPS_IOB_5 to GPIO1:IO4 2. In the same HPS IP, turn off the main PLL, peripheral PLL and MPU clock overrides. 3. Export the four HPS GPIO signals from the HPS subsystem and add the matching ports to src/hw/src/top.sv. 4. Regenerate the Platform Designer systems and compile the design (make all in src/hw/synth). 5. Build the software with the design's Yocto flow: cd src/sw/yocto . agilex5_mk_a5e065bb32aes1-ETH_1P10G-build.sh build_default 6. Generate the programming files with the Yocto-built SPL instead of the prebuilt src/sw/artifacts/u-boot-spl-dtb.hex: cd src/hw/synth quartus_pfg -c -o hps=on -o hps_path=../../sw/yocto/agilex5_mk_a5e065bb32aes1-gsrd-images/u-boot-agilex5-socdk-gsrd-atf/u-boot-spl-dtb.hex output_files/top.sof output_files/top.rbf For QSPI boot, generate the JIC file with the same SPL: quartus_pfg -c output_files/top.sof output_files/top.jic -o device=MT25QU128 -o flash_loader=A5ED065BB32AE4S -o hps_path=../../sw/yocto/agilex5_mk_a5e065bb32aes1-gsrd-images/u-boot-agilex5-socdk-gsrd-atf/u-boot-spl-dtb.hex -o mode=ASX4 -o hps=1 7. Write the Yocto-built SD card image (sdimage.tar.gz) to the SD card, then program top.hps.rbf over JTAG or top.hps.jic into the QSPI flash. This problem is scheduled to be fixed in a future release of the Agilex 5 Ethernet System Example Design for the Agilex 5 E-Series 065B Modular Development Kit. Additional Information The problem was reproduced on two Agilex 5 E-Series 065B Modular Development Kit boards. The 065B Golden System Reference Design (GSRD) boots from the SD card on the same boards and SD card. Changing only the SPL, or only the HPS configuration, is not sufficient. With both changes, the design boots from the SD card and Linux runs normally. The HPS Ethernet throughput with the corrected design matches the published figure for the design (1.35 Gbit/s TCP transmit at MTU 1500).29Views0likes0CommentsWhy is data transfer performance low when using the HPS DMA Controller?
Description Due to the design of the Hard Processor System (HPS) Direct Memory Access Controller (DMAC) in Altera FPGA Agilex® 7, Agilex® 5, and Agilex® 3 devices, data transfer throughput across the HPS-to-FPGA (H2F) and Lightweight HPS-to-FPGA (LWH2F) bridges can appear low-sometimes as low as approximately half of the theoretical maximum-when you use the HPS DMAC for transfers via the H2F or LWH2F path. The generic DMA controller in the HPS is optimized and sized for peripheral data movement within the HPS complex and may not move data near the maximum theoretical throughput across the H2F or LWH2F bridges. Resolution To work around this limitation when higher throughput is required between the HPS and FPGA fabric, follow these steps: Evaluate a fabric-based DMA controller for data transfers between the HPS and FPGA fabric. Measure the resulting throughput against your application bandwidth requirements to determine whether the fabric-based DMA meets your needs. This behavior reflects HPS DMAC sizing for bridge traffic; it is not scheduled to be changed in a Quartus® Prime software release.44Views0likes0CommentsWhy does Quartus® Prime Pro give an error when trying to route HPS reset signals, such as s2f_rst or s2f_cold_rst, to the Fabric using the localized Sector Clock Network?
Description Due to device architecture requirements in Altera® SoC FPGA families with a Hard Processor System (HPS), the Quartus® Prime Pro Edition Software version 25.3.1 reports a fitter routing error when you try to route certain HPS-to-FPGA reset signals to the FPGA fabric using the localized Sector Clock Network instead of the Global Clock Network. In the Agilex® FPGA architecture, there is a device-wide Global Clock Network (meant for high fan-out signals) and a localized Sector Clock Network (meant for low fan-out, smaller regional scope, or localized logic structures). Certain signals, such as s2f_rst or s2f_cold_rst, are restricted to be only on the Global Clock Network. For example, if you use: set_instance_assignment -name GLOBAL_SIGNAL OFF -to ...|hps_inst|s2f_cold_rst Quartus reports an error similar to: Error (170084): Can't route signal "...|hps_inst|s2f_cold_rst" to atom ... Resolution Certain signals, such as s2f_rst or s2f_cold_rst, are restricted to be only on the Global Clock Network. To work around this routing error in the Quartus® Prime Pro Edition Software: Remove any instance assignment that sets GLOBAL_SIGNAL to OFF for HPS-to-FPGA reset outputs (for example, s2f_rst or s2f_cold_rst). Recompile the design and allow Quartus to route these reset signals on the Global Clock Network. This behavior reflects device architecture and fitter rules; it is not scheduled to be changed to allow HPS-to-FPGA reset signals on the Sector Clock Network.66Views0likes0CommentsWhy the Error Injection using Linux debugfs interface causes SError and kernel panic on Agilex® 5 Ethernet ECC?
Description Due to a problem in the EDAC (Error Detection and Correction) driver, Error Injection using the Linux debugfs interface on Agilex® 5 Ethernet ECC can cause a fatal SError and kernel panic. The error injection command below logs a correctable error (CE), then panics: echo c > /sys/kernel/debug/edac/emac2-tx-ecc/altr_trigger Example symptomatic prints: SError Interrupt on CPU..., far: 0xbe000411 Kernel panic - not syncing: Asynchronous SError Interrupt The same path can also affect other Port-A-only ECC blocks that use the INTTEST register (for example emac*, usb1*, and ocram uncorrectable inject). This issue is impacting Agilex® 5 SoC FPGA devices and Quartus® Prime software of version 26.1.1 (Images that include the ES-406 unconditional INTTEST Port B write) until the fix below is present. Resolution To workaround this issue for 26.1.1 release, apply the patch by following the instructions below: 1. git clone the repo altera-fpga/linux-socfpga: Linux development repository for socfpga 2. git checkout socfpga-6.18.20-lts 3. run: git format-patch to get the patch Make sure the commit is included in the patch: ES-14714: EDAC/altera: skip INTTEST Port B write when unused · altera-fpga/linux-socfpga@7726132 e.g Using commit ID for - ES-14714: EDAC/altera: skip INTTEST Port B write when unused git format-patch -1 772613293c40ce9051798847682c262e59b37243 4. Use “git am” to apply the patch onto your source code.105Views0likes0CommentsWhy is the LPDDR5 option unavailable in the External Memory Interfaces for HPS IP in Quartus® Prime Pro Edition Software version 26.1.1 for Agilex® 3 SoC FPGA?
Description In Quartus® Prime Pro Edition Software version 26.1.1, the LPDDR5 option is not available in the External Memory Interfaces for HPS IP for Agilex® 3 SoC FPGA device because support for this option has not been enabled for the IP. Resolution A patch is available to resolve this issue in Quartus Prime Pro Edition Software version 26.1.1. To install the fix: Download Patch 1.02 for your operating system. Install Patch 1.02 into your Quartus Prime Pro Edition Software version 26.1.1. The patch files are available below: quartus-26.1.1-1.02-windows.exe quartus-26.1.1-1.02-linux.run After installing the patch, the option LPDDR5 will be available in the External Memory Interfaces for HPS IP for Agilex 3 SoC FPGA device.234Views0likes0CommentsWhy does the Agilex® 7 FPGA HPS EMIF and fabric EMIF hang after core reconfiguration when both interfaces share the same IO bank in x72 configuration?
Description Due to a problem in the Quartus® Prime Pro Edition Software version 24.2, when Agilex® 7 FPGA F-Series and I-Series HPS EMIF and fabric EMIF share the same IO bank in x72 configuration and the design operates in HPS-first mode, the initial configuration can succeed, but subsequent core reconfigurations can cause the fabric EMIF calibration firmware to hang for designs targeting in Agilex® 7 FPGA F-Series and I-Series devices. The observed failure signature is that, after the FPGA is reconfigured without a full board power cycle, the fabric EMIF no longer responds correctly and the calibration flow does not assert cal_success or cal_fail. Resolution A patch is available to fix this problem for the Quartus® Prime Pro Edition Software version 24.2. Download and install patch 0.70fw below. quartus-24.2-0.70fw-linux.zip quartus-24.2-0.70fw-readme.zip quartus-24.2-0.70fw-windows.zip A patch is available to fix this problem for the Quartus® Prime Pro Edition Software version 25.1.1. Download and install patch 1.54fw below. quartus-25.1.1-1.54fw-linux.zip quartus-25.1.1-1.54fw-readme.zip quartus-25.1.1-1.54fw-windows.zip This problem is resolved in Quartus® Prime Pro Edition Software version 26.1.1.106Views0likes0CommentsWhy does Arria® 10 HPS IP generation fail with missing mgc_common_axi.sv in Quartus® Prime Pro 24.1/24.2?
Description Due to a problem in the Quartus® Prime Pro Edition Software versions 24.1 and 24.2, Arria® 10 HPS IP generation may fail with an error similar to: Error: add_fileset_file: no such file .../ip/altera/mentor_vip_ae/axi3/bfm/mgc_common_axi.sv This occurs because AXI3 Mentor Graphics BFM collateral was removed starting in Quartus Prime Pro 24.1, while the Arria 10 HPS generation flow still referenced the removed AXI3 BFM file. Associated Quartus Suite bug: QS-569165. Resolution To resolve this issue, upgrade to Quartus Prime Pro Edition Software version 24.3, regenerate the Platform Designer system/IP output files, and rerun compilation.71Views0likes0Comments