Forum Discussion

torstein18's avatar
torstein18
Icon for Occasional Contributor rankOccasional Contributor
2 months ago

Store custom keys on SDM Agilex3

Hi

I know it's possible to store encryption and siging keys on the SDM for fpga firmware decryption and authentication, but is it possible to store my own keys on it?

I will use the key to decrypt my own software files on the HPS, so I need some way to send the ecrypted software to the SDM then the SDM will use the key to decrypt it and send it back.

Is there any documentation or tutorial for this?

13 Replies

  • FawazJ_Altera's avatar
    FawazJ_Altera
    Icon for Frequent Contributor rankFrequent Contributor

    Hello,

    You can download the GHRD of Agilex® 5 FPGA E-Series 013B Development Kit, QPDS26.1.1 using the commands below:

    git clone --branch QPDS26.1.1_REL_GSRD_PR https://github.com/altera-fpga/agilex5e-ed-gsrd.git
    cd dk-a5e013bm16aea/baseline-a55

     

    Thank you,

    Fawaz

    • torstein18's avatar
      torstein18
      Icon for Occasional Contributor rankOccasional Contributor

      I have read trough the documentation, but I still don't understand how I can send commands to the SDM from linux running on the HPS. Do I need to install any drivers or do some changes to the device tree. Here is the device tree node I have for the SDM:

      firmware {
      		svc {
      			compatible = "intel,agilex5-svc";
      			method = "smc";
      			memory-region = <&service_reserved>;
      			iommus = <&smmu 10>;
      			interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
      			interrupt-parent = <&intc>;
      			altr,smmu_enable_quirk;
      
      			fpga_mgr: fpga-mgr {
      				compatible = "intel,agilex5-soc-fpga-mgr";
      				altr,smmu_enable_quirk;
      			};
      
      			temp_volt: hwmon {
      				compatible = "intel,soc64-hwmon";
      			};
      
      			fcs_config: fcs-config {
      				compatible = "intel,agilex5-soc-fcs-config";
      			};
      		};
      	};

      I have installed the FCS driver:

      root@agilex3:~# zcat /proc/config.gz | grep FCS
      CONFIG_ALTERA_SOCFPGA_FCS_DEBUG=y
      CONFIG_CRYPTO_DEV_INTEL_FCS=y

      Is there any other drivers I need?

      • SueC_Altera's avatar
        SueC_Altera
        Icon for Contributor rankContributor

        Hi torstein18​ - please take a look at this example: 

        I have to put a screen shot instead of a link get around the forum restrictions.  It is on altera-fpga.github.io

        Sue

    • torstein18's avatar
      torstein18
      Icon for Occasional Contributor rankOccasional Contributor

      Ok, I will check it out when I get an NDA