Hard Processor System Booting User Guide: Agilex™ 3 and Agilex™ 5 SoCs

ID 813762
Date 5/09/2025
Public
Document Table of Contents

4.12. QSPI Controller Ownership Selection Impact on the HPS Software

Starting with release 25.1, Quartus® Prime Pro Edition software enables the selection of QSPI controller ownership for Agilex™ 5 devices. Since the QSPI controller is shared between the HPS and SDM, this feature allows or prevents the HPS from gaining ownership after sending the QSPI_DIRECT command through the HPS-to-SDM mailbox. This enhances security for features that rely on the SDM owning the QSPI controller.

In Quartus® Prime Pro Edition software, the configuration value set from the Device and Pin Options > Configuration > QSPI Ownership menu is included in the IO section of the bitstream generated from the hardware design build. The following diagram illustrates this setting in Quartus Pro:

Figure 37. 

At power-up, the QSPI controller ownership is assigned by default to the SDM. When the bitstream is consumed by the SDM, it reads and retains this setting internally. Whenever the HPS sends the QSPI_DIRECT command to request the QSPI ownership (typically sent by the FSBL), the SDM uses the value to determine whether to grant or reject the HPS's request for ownership.

When QSPI Ownership is assigned to the HPS from Quartus, the SDM grants ownership to the HPS upon request. Once the HPS gains ownership, it can directly use the QSPI controller to access the QSPI flash device, while the SDM loses access to the QSPI controller, blocking any dependent features. The HPS retains ownership until a power cycle, HPS reset, or RSU reconfiguration event occurs. If your application running on the HPS needs to use the QSPI controller (e.g., to store or load components from the QSPI flash device), you must configure QSPI Ownership in your hardware project to HPS mode.

When QSPI Ownership is assigned to the SDM from Quartus, the SDM rejects any ownership requests from the HPS, responding with QSPI_OWNED_BY_SDM_IN_USER_MODE (0x8F) to the QSPI_DIRECT command. This ensures the SDM retains ownership of the QSPI controller, preventing the HPS from performing direct access. In this scenario, the HPS software must be configured at build time to prevent any access to the QSPI controller.

The following table provides the recommended configuration to prevent HPS software components from accessing the QSPI controller when QSPI Ownership is set to SDM from Quartus:

Table 17.  Recommended Configuration for HPS Software to Prevent QSPI Controller Access When Ownership is Set to SDM
  ATF U-Boot Linux
Disable access of QSPI Controller from HPS SW

From Build configuration:

SOCFPGA_BOOT_SOURCE_QSPI=0
From Build configuration:
  • CONFIG_CADENCE_QSPI=n
  • CONFIG_CADENCE_QSPI=n

From device tree:

qspi:
spi@108d2000 
{
  status = "disabled";
}

Refer to A.2.2.1. Feature Availability under SDM/HPS Ownership of Quad SPI Controller in the Hard Processor System Technical Reference Manual: Agilex 5 SoCs for information about the features supported in each of the configuration options.

Note: The QSPI ownership selection feature is not backward compatible. Therefore, for Remote System Update, do not use QSPI image bitstreams created before the 25.1 release alongside those created with 25.1 and later releases.