This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM6548: Loading system firmware to the DMSC controller

Part Number: AM6548

Hi,

We are using XAM6548BACDXEAFS1 on our custom board and trying to load system firmware to the DMSC controller.

 We have our own application running on the MCU R5 processor. The application is signed with the 'x509CertificateGen.ps1' script and the 'k3_dev_mpk.pem' key from Texas instrument PDK (version 8.0.0.36). The application starts fine, but when the system firmware is loaded to the DMSC controller it fails. The system firmware file we are trying to load is 'sysfw_sr2-hs-enc.bin' using 'Sciclient_loadFirmware' (both from PDK version 8.0.0.36). 'Sciclient_loadFirmware' returns CSL_EFAIL (-1).

Why is "Sciclient_loadFirmware" failing and what can we do to fix it?

Regards

Johnny Mostraum

  • Hi,

    Correction of the Sitara chip we use. It shall be AM6548BACDXEAFS1.

    Regards

    Johnny Mostraum

  • I will assign this to our security/DMSC expert , but as we discussed we may need additional information on differences between pre production vs production parts ( device type, silicon revision, and pictures) as well will like to understand if you are using secure boot functionality and if so how with or without TI dummy keys etc

    Thanks

  • Hi,

    In pre-production we use AM6548BACDXEAF (no problem loading system firmware) and in production AM6548BACDXEAFS1. As I understand both are silicon revision 2.

    The MCU application is signed with the 'x509CertificateGen.ps1' script and the 'k3_dev_mpk.pem' key from Texas instrument PDK (version 8.0.0.36).

    Regards Johnny

  • Hello Johnny

    S1: High-Security device, Secure Boot Supported

    So does your product need secure boot and if so have you previously tried the secure boot flow with TI dummy keys and done any key writing etc?

    It sounds to be that all your previous development was on GP (non secure boot parts) , so this will not work as is for S1 parts.

    S1: 

  • Hi,

    We have always signed our application on the pre-production GP device (maybe we don’t need that?). But whether we sign with random key or the k3_dev_mpk.pem key, the application starts on both the GP and HS devices.

    But when it comes to loading the system firmware to the DMSC (Sciclient_loadFirmware), it fails on the HS device.

    We have used system firmware files from TI PDK version 8.0.0.36 (..\ti.pdk.am65xx\ti\drv\sciclient\soc\V0).

    On the GP device we load the sysfw_sr2.bin (OK).

    On the HS device we load the sysfw_sr2-hs-enc.bin (FAILS).

    Random key:

     powershell -executionpolicy unrestricted\
                            -command '..\ti.pdk.am65xx\ti\build\makerules\x509CertificateGen.ps1'\
                            -b 'mcuapp.bin' -o 'mcuapp.tiimage'\
                            -c R5 -l 0x41C00100 -d DEBUG -j DBG_FULL_ENABLE -m SPLIT_MODE
    OpenSSL 1.1.1l  24 Aug 2021
    
    
    Mode                 LastWriteTime         Length Name
    ----                 -------------         ------ ----
    d-----        31.05.2023     14:44                rtcp1prod
    Checking for OpenSSL...
    OpenSSL 1.1.1l  24 Aug 2021
    Generating random key...
    R5 Certificate being generated :
            X509_CFG = ..\x509-temp.cert
            KEY = ..\eckey.pem
            BIN = mcuapp.bin
            CERT TYPE = R5, 1
            CORE ID = 16
            LOADADDR = 0x41C00100
            IMAGE_SIZE = 325176
            BOOT_OPTIONS = 2
            SHA OID  is 2.16.840.1.101.3.4.2.3
            SHA  is ef0241345d2104cbd6d9228037be7a3ac68e6b577f40c49a82a7a5c48cf70476b19129c1aa17f6441d92ae0dfc26128d5bfdbc2d400d820ebdd12ebaafbd8d64
    SUCCESS: Image mcuapp.tiimage generated. Good to boot
    

    k3_dev_mpk.pem:

    powershell -executionpolicy unrestricted\
                            -command '..\ti.pdk.am65xx\ti\build\makerules\x509CertificateGen.ps1'\
                            -b 'mcuapp.bin' -o 'mcuapp.tiimage'\
                            -c R5 -l 0x41C00100 -d DEBUG -j DBG_FULL_ENABLE -m SPLIT_MODE\
                            -k '..\ti.pdk.am65xx\ti\build\makerules\k3_dev_mpk.pem'
    OpenSSL 1.1.1l  24 Aug 2021
    
    
    Mode                 LastWriteTime         Length Name
    ----                 -------------         ------ ----
    d-----        31.05.2023     14:51                rtcp1prod
    Checking for OpenSSL...
    OpenSSL 1.1.1l  24 Aug 2021
    R5 Certificate being generated :
            X509_CFG = ..\x509-temp.cert
            KEY = ..\ti.pdk.am65xx\ti\build\makerules\k3_dev_mpk.pem
            BIN = mcuapp.bin
            CERT TYPE = R5, 1
            CORE ID = 16
            LOADADDR = 0x41C00100
            IMAGE_SIZE = 325176
            BOOT_OPTIONS = 2
            SHA OID  is 2.16.840.1.101.3.4.2.3
            SHA  is fcfacfa25f6a7d586db886b52c517196205261c2e49421696d210fbbea4538148dff3805b9650036fe9125c8dc7a0f62155d7eb8156714a31a804677d9b3f924
    SUCCESS: Image mcuapp.tiimage generated. Good to boot
    

    Regards Johnny

  • Hello Johnny,
    Device type for AM65x SoC:
    - GP (General Purpose)
    - HS (High Security) with two sub-types
    ++ HS-FS (Field Securable)
    ++ HS-SE (Security Enforced)

    The high-level flow summary for secure boot starting from HS-FS:
    1/. Program the user key set with TI OTP key-writer tool
    2/. HS-FS is converted to HS-SE once the user's key set is successfully programmed on HS-FS
    3/. SW needs to be signed with user's key set in order to secure boot on HS-SE
    Note that
    - VPP pin needs to be supplied with 1.8v when programming OTP efuse in step 1/.
    - User needs to have the secure key server setup, and integration for user key provisioning, code signing...for step 1/. and 3/.

    The P/N "AM6548BACDXEAFS1" is production HS-FS, and additional development/integration work is expected to use it.

    Best,
    -Hong

  • Hi,

    We have tested booting from UART on our HW with HS device with \pdk_am65xx_08_02_00_21\ (RTOS SDK), loading the following precompiled SBL and sysfw using Tera Term XMODEM:

    .\pdk_am65xx_08_02_00_21\packages\ti\boot\sbl\binary\am65xx_idk\uart\bin\sbl_uart_img_mcu1_0_release.tiimage

    .\pdk_am65xx_08_02_00_21\packages\ti\drv\sciclient\soc\V0\sysfw_sr2-hs-enc.bin

    Log extract from UART:

    7ee98bfa53d98b29d577e0c154eece8ef9ef3ab93d35ddcb8df3edf349
    SBL Revision: 01.00.10.01 (Mar 23 2022 - 12:20:16)
    Waiting for sysfw.bin ...
    SYSFW load...FAILED
    

    Why does sysfw fail? Isn’t the sysfw signed correct for our HS device?

    What we have done is taken from '5.2.8.3. Startup via UART’ in the PDK user guide:

    https://software-dl.ti.com/processor-sdk-rtos/esd/AM65X/08_02_00_05/exports/docs/pdk_am65xx_08_02_00_21/docs/userguide/am65xx/boot/boot_k3.html#building-the-sbl-and-its-components

    Regards Johnny

  • Hello Johnny,
    As we discussed in the call yesterday, we'd recommend to stay with non-S1 version SoC.
    Best,
    -Hong