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.

AM62A7-Q1: Occasional SBL Authentication Failure

Part Number: AM62A7-Q1
Other Parts Discussed in Thread: UNIFLASH

Hi TI Experts,

Customer is working on AM62A SDK9.2 SBL, and they are using HS-FS device.

They have tried setting the device type in devconfig.mak shown below to GP and HS separately, but both will have the occasional authentication failure that will be discussed later.

No matter setting device type to GP or HS, we will get the following xxxx_release.appimage.hs_fs. We have tried both the hs_fs image got from GP device type & HS device type, but both will have occasional authentication failure that will be described later.

When the occasional authentication failure happens, the corresponding error log shows below.

May I know if you have any suggestions for this problem please?

Thanks a lot,

Kevin

  • Hi Kevin,

    There are multiple points of failure in Bootloader_verifyMulticoreImage function. It may be the case the image itself is read incorrectly in the DDR and so the Certificate length might be read incorrectly leading to the failure even before any request to TIFS for image authentication.

      

    Can you ask the customer to check what is the value of Image Length (imageLen) and Certificate Length (certLen) at the time of authentication failure.

    Regards,

    Prashant

  • Hi Prashant 

    I check the imageLen and certLen,they are valid. 

    The error from function of Bootloader_socAuthImage return value is 0xffffffff

    the Debug log following 

    [sbl_emmc_linux_stage1] step 1
    [sbl_emmc_linux_stage1] step 2
    [sbl_emmc_linux_stage1] step 3
    [sbl emmc linux stage1] Enter App_loadImages Functions
    [sbl emmc linux stage1] App_loadImages step 1
    [Bootloader] Enter Function of Bootloader_parseMultiCoreAppImage...
    [Bootloader:Bootloader_parseMultiCoreAppImage] HS Device : VerifyMulticoreImage
    [Bootloader] Enter Function of Bootloader_verifyMulticoreImage...
    [Bootloader:Bootloader_verifyMulticoreImage] The bootMedia is 0xb0070003
    [Bootloader:Bootloader_verifyMulticoreImage] The bootMedia is Flash or EMMC
    [Bootloader:Bootloader_verifyMulticoreImage] certLen = 0x676
    [Bootloader:Bootloader_verifyMulticoreImage] imageLen = 0xe754
    [Bootloader:Bootloader_verifyMulticoreImage] authStatus = 0xffffffff
    ERROR: Bootloader_verifyMulticoreImage:660: Failed to authenticate Image
    [sbl emmc linux stage1] App_loadImages step 2
    [sbl emmc linux stage1] App_loadImages step 3
    [sbl emmc linux stage1] App_loadImages step 6
    [sbl_emmc_linux_stage1] Some tests have failed!!
    

  • Hi Prashant

    I debug find the issue location in function of Sciclient_procBootAuthAndStart

    I add some debug info following 

    int32_t Sciclient_procBootAuthAndStart(
                const struct tisci_msg_proc_auth_boot_req * authBootCfg,
                uint32_t timeout)
    {
        int32_t retVal = CSL_PASS;
    
        struct tisci_msg_proc_auth_boot_resp response = {0};
        DebugP_log("[DM-sciclient] Enter Function of Sciclient_procBootAuthAndStart... \r\n");
        Sciclient_ReqPrm_t reqParam = {0};
        reqParam.messageType    = (uint16_t) TISCI_MSG_PROC_AUTH_BOOT;
        reqParam.flags          = (uint32_t) TISCI_MSG_FLAG_AOP;
        reqParam.pReqPayload    = (const uint8_t *) authBootCfg;
        reqParam.reqPayloadSize = (uint32_t) sizeof (struct tisci_msg_proc_auth_boot_req);
        reqParam.timeout        = (uint32_t) timeout;
    
        Sciclient_RespPrm_t respParam = {0};
        respParam.flags           = (uint32_t) 0;   /* Populated by the API */
        respParam.pRespPayload    = (uint8_t *) &response;
        respParam.respPayloadSize = (uint32_t) sizeof (response);
    
        retVal = Sciclient_service(&reqParam, &respParam);
        DebugP_log("[Bootloader:Sciclient_procBootAuthAndStart]  retVal = 0x%x,respParam.flags = 0x%x\r\n",retVal,respParam.flags);
        if((retVal != CSL_PASS) ||
            ((respParam.flags & TISCI_MSG_FLAG_ACK) != TISCI_MSG_FLAG_ACK))
        {
            retVal = CSL_EFAIL;
        }
        return retVal;
    }

    And the debug output info following

    [sbl_emmc_linux_stage1] step 1
    [sbl_emmc_linux_stage1] step 2
    [sbl_emmc_linux_stage1] step 3
    [sbl emmc linux stage1] Enter App_loadImages Functions
    [sbl emmc linux stage1] App_loadImages step 1
    [Bootloader] Enter Function of Bootloader_parseMultiCoreAppImage...
    [Bootloader:Bootloader_parseMultiCoreAppImage] HS Device : VerifyMulticoreImage
    [Bootloader] Enter Function of Bootloader_verifyMulticoreImage...
    [Bootloader:Bootloader_verifyMulticoreImage] The bootMedia is 0xb0070003
    [Bootloader:Bootloader_verifyMulticoreImage] The bootMedia is Flash or EMMC
    [Bootloader:Bootloader_verifyMulticoreImage] certLen = 0x676
    [Bootloader:Bootloader_verifyMulticoreImage] imageLen = 0xe754
    [Bootloader:Bootloader_verifyMulticoreImage] certLoadAddr = 0x84000000
    [Bootloader] Enter Function of Bootloader_socAuthImage...
    [DM-sciclient] Enter Function of Sciclient_procBootAuthAndStart...
    [DM-sciclient] Enter Function of Sciclient_service...
    [DM-sciclient] Running the function of Sciclient_serviceGetThreadIds and ret = 0x0...
    [DM-sciclient] Running the function of Sciclient_servicePrepareHeader and ret = 0x0...
    [DM-sciclient] msgType = 0xc120...
    [Bootloader:Sciclient_procBootAuthAndStart]  retVal = 0x0,respParam.flags = 0x0
    [Bootloader:Bootloader_verifyMulticoreImage] authStatus = 0xffffffff
    ERROR: Bootloader_verifyMulticoreImage:661: Failed to authenticate Image
    [sbl emmc linux stage1] App_loadImages step 2
    [sbl emmc linux stage1] App_loadImages step 3
    [sbl emmc linux stage1] App_loadImages step 6
    [sbl_emmc_linux_stage1] Some tests have failed!!
    

  • Hi Tom,

    Thank you for the detailed debugging.

    Before proceeding further, I would like to have some clarifications.

    The issue was first reported in the authentication of the sbl_uart_uniflash_stage2 appimage. But, the latest logs show the sbl_emmc_linux_stage1 failing to authenticate probably the MCU appimage. So, are you seeing authentication failure in both cases?

    Also, just to confirm the authentication failures are random and not occuring every time?

    Additionally, are you working with a custom board or the TI AM62A EVM?

    Regards,

    Prashant

  • Hi Prashant

    Yes,The issue found in sbl_uart_uniflash_stage1 and sbl_emmc_linux_stage1.

    I test the EVM,it not happen this issue.

    BR

    Tom

  • I test the EVM,it not happen this issue.

    Do you mean the issue is occuring on your custom board only?

    Also, you did not clarify if the authentication failures are random or occuring on each POR? If random, could you tell the percentage of the random failures?

  • Yes,it happen in custom board. this is random failures。The probability of occurrence is about 50% when the debugging information is not added, and the probability drops to about 10% after the debugging information is added

    I debugging,because requuest the sciclient,but is not response the ACK,so it failure。 please refer above debug info

  • Hi Prashant

    I use the guideline and it report error,the error info following

     28/05/2024   16:22.14   /drives/c/ti/mcu_plus_sdk_am62ax_09_01_00_39   master  gmake -s -C tools/sysfw/boardcfg SOC=am62ax
    "Build Board Configuration Obj Files"
    "Create unsigned Board Configuration binary"
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
            LC_ALL = "zh_CN.UTF-8",
            LC_CTYPE = "zh_CN.UTF-8",
            LANG = "zh_CN.UTF-8"
        are supported and installed on your system.
    perl: warning: Falling back to the system default locale ("Chinese (Simplified)_China.936").
    Load address not computed for file that does not have a segment table at XML_TI_OFD.pm line 1441.
    Use of uninitialized value in multiplication (*) at script/mkhex4bin.pl line 295.
    "Sign Board Configuration with GP key"
    "  (note: GP board configuration not ACTUALLY signed with anything)"
    "Generate include-able header file from signed Board Configuration"
    "Build Board Configuration Obj Files"
    "Create unsigned Board Configuration binary"
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
            LC_ALL = "zh_CN.UTF-8",
            LC_CTYPE = "zh_CN.UTF-8",
            LANG = "zh_CN.UTF-8"
        are supported and installed on your system.
    perl: warning: Falling back to the system default locale ("Chinese (Simplified)_China.936").
    Load address not computed for file that does not have a segment table at XML_TI_OFD.pm line 1441.
    Use of uninitialized value in multiplication (*) at script/mkhex4bin.pl line 295.
    "Sign Board Configuration with GP key"
    "  (note: GP board configuration not ACTUALLY signed with anything)"
    "Generate include-able header file from signed Board Configuration"
    "Build Board Configuration Obj Files"
    "Create unsigned Board Configuration binary"
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
            LC_ALL = "zh_CN.UTF-8",
            LC_CTYPE = "zh_CN.UTF-8",
            LANG = "zh_CN.UTF-8"
        are supported and installed on your system.
    perl: warning: Falling back to the system default locale ("Chinese (Simplified)_China.936").
    Load address not computed for file that does not have a segment table at XML_TI_OFD.pm line 1441.
    Use of uninitialized value in multiplication (*) at script/mkhex4bin.pl line 295.
    "Sign Board Configuration with GP key"
    "  (note: GP board configuration not ACTUALLY signed with anything)"
    "Generate include-able header file from signed Board Configuration"
    "Build Board Configuration Obj Files"
    "Create unsigned Board Configuration binary"
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
            LC_ALL = "zh_CN.UTF-8",
            LC_CTYPE = "zh_CN.UTF-8",
            LANG = "zh_CN.UTF-8"
        are supported and installed on your system.
    perl: warning: Falling back to the system default locale ("Chinese (Simplified)_China.936").
    Load address not computed for file that does not have a segment table at XML_TI_OFD.pm line 1441.
    Use of uninitialized value in multiplication (*) at script/mkhex4bin.pl line 295.
    "Sign Board Configuration with GP key"
    "  (note: GP board configuration not ACTUALLY signed with anything)"
    "Generate include-able header file from signed Board Configuration"
    SYSFW Boardcfg blob created at C:\ti\mcu_plus_sdk_am62ax_09_01_00_39\source\drivers\sciclient\sciclient_default_boardcfg\am62ax\boardcfg_blob.bin
    SYSFW Boardcfg blob created at C:\ti\mcu_plus_sdk_am62ax_09_01_00_39\source\drivers\sciclient\sciclient_default_boardcfg\am62ax\boardcfg_sbldata_blob.bin
    

  • Hi Prashant

    I try two times,one is not report error but it output the TISCI Trace,following 

    [sbl uart uniflash stage1] recv the sbl_uart_uniflash stage2 image...
    [sbl uart uniflash stage1] recv the sbl_uart_uniflash stage2 image Done!!!
    [Bootloader:Bootloader_parseMultiCoreAppImage] HS Device : VerifyMulticoreImage
    [Bootloader:Bootloader_verifyMulticoreImage] The bootMedia is 0xb0070001
    [Bootloader:Bootloader_verifyMulticoreImage] certLoadAddr = 0x84000000
    [DM:SCICLIENT] Request Sciclient_service for msgType = 0xc120...
    [DM:SCICLIENT] Request Sciclient_serviceSecureProxy for msgType = 0xc120...
    [DM:SCICLIENT:Sciclient_procBootAuthAndStart] retVal = 0x0,respParam.flags = 0x2
    [Bootloader:Bootloader_verifyMulticoreImage] authStatus = 0x0
    [sbl uart uniflash stage1] App_loadSelfcoreImage function : Bootloader_parseMultiCoreAppImage return status 0...
    [DM:SCICLIENT] Request Sciclient_service for msgType = 0x10c...
    0x6180010C
    0x61C00079
    0x612F7CA7
    0x612F7CA7
    [DM:SCICLIENT] Request Sciclient_service for msgType = 0x10e...
    0x6180010E
    0x61C00079
    [sbl uart uniflash stage1] Loading the sbl_uart_uniflash_stage2 image to WKP core...
    [sbl uart uniflash stage1] Loading the sbl_uart_uniflash_stage2 image Done and Response message for XMODEM...
    
    
    [sbl uart uniflash stage2] Init has been Done!!!
    ERROR: Board_flashOpen:201: FLASH open failed for instance 0 !!!
    

    And one is report a authenticate error,it output TISCI Trace,following

    [sbl uart uniflash stage1] recv the sbl_uart_uniflash stage2 image...
    [sbl uart uniflash stage1] recv the sbl_uart_uniflash stage2 image Done!!!
    [Bootloader:Bootloader_parseMultiCoreAppImage] HS Device : VerifyMulticoreImage
    [Bootloader:Bootloader_verifyMulticoreImage] The bootMedia is 0xb0070001
    [Bootloader:Bootloader_verifyMulticoreImage] certLoadAddr = 0x84000000
    [DM:SCICLIENT] Request Sciclient_service for msgType = 0xc120...
    [DM:SCICLIENT] Request Sciclient_serviceSecureProxy for msgType = 0xc120...
    [DM:SCICLIENT:Sciclient_procBootAuthAndStart] retVal = 0x0,respParam.flags = 0x0
    [DM:SCICLIENT:Sciclient_procBootAuthAndStart] Sciclient_procBootAuthAndStart request is NOACK
    [Bootloader:Bootloader_verifyMulticoreImage] authStatus = 0xffffffff
    ERROR: Bootloader_verifyMulticoreImage:658: Failed to authenticate Image
    [sbl uart uniflash stage1] App_loadSelfcoreImage function : Bootloader_parseMultiCoreAppImage return status -1...
    [sbl uart uniflash stage1] Loading the sbl_uart_uniflash_stage2 image to WKP core...
    [sbl uart uniflash stage1] Loading the sbl_uart_uniflash_stage2 image Done and Response message for XMODEM...
    

    Please help anaysis,Thanks

    BR

    Tom

  • Hi Tom,

    The TIFS logs, if enabled, are collected from the memory as described here

    https://software-dl.ti.com/tisci/esd/latest/4_trace/trace.html#trace-memory-buffer-location

    Also, if you are working with a HSFS device type, please make sure the DEVICE_TYPE is set to GP only as the DEVICE_TYPE=HS is for HSSE devices.

    Regards,

    Prashant

  • My device is HSFS and the device type setting to GP also.

    When i enable the TIFS log,from the Wakeup UART0 output some TIFS log,please refer

  • Hi Tom,

    When i enable the TIFS log,from the Wakeup UART0 output some TIFS log,please refer

    Those are DM logs. The TIFS logs will be separate and collected from the its defined memory buffer.

    I would like you to trap the execution in an infinite loop after the authentication failure and collect the TIFS logs.

  • What collect TIFS log from memory buffer?

  • What collect TIFS log from memory buffer?

    You could use any debugger to collect the logs.

    Or you could dump them with the following function

    void dump_tifs_logs()
    {
        #define TIFS_LOGS_BUFFER_ADDR 0x4405F000
        #define TIFS_LOGS_BUFFER_SIZE 0x1000
    
        uint8_t* ptr = (uint8_t*)TIFS_LOGS_BUFFER_ADDR;
    
        DebugP_log("\r\n<<TIFS_LOGS\r\n");
    
        for(int32_t i = 0; i < TIFS_LOGS_BUFFER_SIZE; i++)
        {
            DebugP_log("%c", *ptr);
            ptr++;
        }
    
        DebugP_log("\r\nTIFS_LOGS\r\n");
    }

  • Hi Prashant

    When happen ERROR: Bootloader_verifyMulticoreImage:675: Failed to authenticate Image Errors,the memory buffer output info following:

    [DM:SCICLIENT] Request Sciclient_service for msgType = 0x2...
    [DM:SCICLIENT] Request Sciclient_serviceSecureProxy for msgType = 0x2...
    [DM:SCICLIENT] Sciclient_sendMessage,thread = 23
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 2
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 103022594
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 2
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 774975033
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 1982672184
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 808335664
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 942681649
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 1867196448
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 1260416111
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 1634492783
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 41
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 16973833
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 2049
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 0
    
    DMSC Firmware Version 9.1.8--v09.01.08 (Kool Koala)
    DMSC Firmware revision 0x9
    DMSC ABI revision 3.1
    
    [sbl uart uniflash stage1] recv the sbl_uart_uniflash stage2 image...
    [sbl uart uniflash stage1] recv the sbl_uart_uniflash stage2 image Done!!!
    [Bootloader:Bootloader_parseMultiCoreAppImage] HS Device : VerifyMulticoreImage
    [Bootloader:Bootloader_verifyMulticoreImage] The bootMedia is 0xb0070001
    [Bootloader:Bootloader_verifyMulticoreImage] certLoadAddr = 0x84000000
    [DM:SCICLIENT] Request Sciclient_service for msgType = 0xc120...
    [DM:SCICLIENT] Request Sciclient_serviceSecureProxy for msgType = 0xc120...
    [DM:SCICLIENT] Sciclient_sendMessage,thread = 23
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 0
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 35963168
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 0
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 774975033
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 1982672184
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 808335664
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 0
    [DM:SCICLIENT:Sciclient_procBootAuthAndStart] retVal = 0x0,respParam.flags = 0x0
    [DM:SCICLIENT:Sciclient_procBootAuthAndStart] Sciclient_procBootAuthAndStart request is NOACK
    [Bootloader:Bootloader_verifyMulticoreImage] authStatus = 0xffffffff
    
    <<TIFS_LOGS
    0x4F8A0000
              0x4F8B0000
                        0x4F80001C
                                  0x4F8A0000
                                            0x4F8B0000
                                                      0x4F8000C8
                                                                0x4003007
                                                                         0x4400918
                                                                                  0x20800000
                                                                                            0x30800001
                                                                                                      0x4F8A00FF
                                                                                                                0x4F8B0001
                                                                                                                          0x4F80001C
                                                                                                                                    0x4C40001C
                                                                                                                                              0x4C40001C
                                                                                                                                                        0x4C40001C
                                                                                                                                                                  0x4C40001C
                                                                                                                                                                            0x4C40001C
                                                                                                                                                                                      0x4C40001C
                                                                                                                                                                                                0x4C40001C
                                                                                                                                                                                                          0x4C40001C
                                                                                                                                                                                                                    0x4C40001C
            0x4C40001C
                      0x4C40001C
                                0x4C40001C
                                          0x4C40001C
                                                    0x4C40001C
                                                              0x4C40001C
                                                                        0x4C40001C
                                                                                  0x4C40001C
                                                                                            0x4C40001C
                                                                                                      0x4C40001C
                                                                                                                0x4C40001C
                                                                                                                          0x4F8A00FF
                                                                                                                                    0x4F8B0001
                                                                                                                                              0x4F8000C8
                                                                                                                                                        0x4F8A00FF
                                                                                                                                                                  0x4F8B0001
                                                                                                                                                                            0x4F80001A
                                                                                                                                                                                      0x4F8A00FF
                                                                                                                                                                                                0x4F8B0001
                                                                                                                                                                                                          0x4F80001E
                                                                                                                                                                                                                    0x4F8A00FF
            0x4F8B0001
                      0x4F8000C7
                                0x4F8A00FF
                                          0x4F8B0001
                                                    0x4F80001A
                                                              0x4F8A00FF
                                                                        0x4F8B0001
                                                                                  0x4F80001E
                                                                                            0x4F8A00FF
                                                                                                      0x4F8B0001
                                                                                                                0x4F8000C7
                                                                                                                          0x429000
                                                                                                                                  0x820024
                                                                                                                                          0x420021
                                                                                                                                                  0x820024
                                                                                                                                                          0x42000C
                                                                                                                                                                  0x820024
                                                                                                                                                                          0x4F8A00FF
                                                                                                                                                                                    0x4F8B0001
                                                                                                                                                                                              0x4F80001C
                                                                                                                                                                                                        0x4F8A00FF
                                                                                                                                                                                                                  0x4F8B0001
          0x4F8000C8
                    0x4F8A00FF
                              0x4F8B0001
                                        0x4F80001A
                                                  0x4F8A00FF
                                                            0x4F8B0001
                                                                      0x4F80001E
                                                                                0x4F8A00FF
                                                                                          0x4F8B0001
                                                                                                    0x4F8000C7
                                                                                                              0x4F8A00FF
                                                                                                                        0x4F8B0001
                                                                                                                                  0x4F80001A
                                                                                                                                            0x4F8A00FF
                                                                                                                                                      0x4F8B0001
                                                                                                                                                                0x4F80001E
                                                                                                                                                                          0x4F8A00FF
                                                                                                                                                                                    0x4F8B0001
                                                                                                                                                                                              0x4F8000C7
                                                                                                                                                                                                        0x420002
                                                                                                                                                                                                                0x820024
      0x4003007
               0x4400918
                        FWL Bit  0x4
                                    Exception addr  0x45B09000
                                                              FWL Exception  0x1008000
                                                                                       0x90000
                                                                                               0x400A78
                                                                                                        0x0
                                                                                                            0xFF922D4
                                                                                                                      0x8
    
                                                                                                                         0x420002
                                                                                                                                 0x820024
                                                                                                                                         0x4003007
                                                                                                                                                  0x4400918
                                                                                                                                                           0x42C120
                                                                                                                                                                   0x820024
                                                                                                                                                                           0x20C00004
    
    TIFS_LOGS
    ERROR: Bootloader_verifyMulticoreImage:675: Failed to authenticate Image
    [sbl uart uniflash stage1] App_loadSelfcoreImage function : Bootloader_parseMultiCoreAppImage return status -1...
    [sbl uart uniflash stage1] Loading the sbl_uart_uniflash_stage2 image to WKP core...
    [sbl uart uniflash stage1] Loading the sbl_uart_uniflash_stage2 image Done and Response message for XMODEM...
    

    Please help analysis~

    BR

    Tom

  • Hi Tom,

    Thank you for the logs.

    On parsing the logs, we have the following

    0x0042C120: BasePort: TISCI_MSG_RECEIVED(TISCI Message interrupt handled): Queue ID: 2 Message ID: c120
    0x00820024: BasePort: TISCI_MSG_SENDER_HOST_ID(Message from secure host received): Queue ID: 2 Host ID: 36
    0x20C00004: Security: SEC_BOOT(Points of failures during secure boot api call): 0x01 => Certificate length > ASN1P_IMAX, 0x02 => Issue fetching certificate, 0x3 => Issue with Hash operation, 0x4 => Hash comparison fails: 0

    It looks like the cause of failure is the Hash Comparison probably due to the corrupted image.

    I would think this is mostly a DDR issue. The image is first read into DDR before requesting authentication. So, in case your DDR configurations are not stable then this may cause the image being read incorrectly at times resulting in the authentication failure. Even a single byte corruption in enough for this failure.

    So, the question is have you done any stress testing of your DDR?

    Regards,

    Prashant

  • Hi Tom,

    Let's focus on the DDR part. Before diving into stress testing the DDR, could you please try out the following.

    Assuming authentication of `sbl_uart_uniflash_stage2`, apply the following patch, which modifies stage1 linker.cmd, to store the read image at a different location than the load address after the authentication.

    diff --git a/examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage1/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/linker.cmd b/examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage1/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/linker.cmd
    index 31088ce..d9aabe0 100644
    --- a/examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage1/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/linker.cmd
    +++ b/examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage1/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/linker.cmd
    @@ -73,5 +73,5 @@ MEMORY
         R5F_TCMB0: ORIGIN = 0x41010000 , LENGTH = 0x00008000 */
         HSM_RAM_VECS: ORIGIN = 0x43C00000 , LENGTH = 0x100
         HSM_RAM  : ORIGIN = 0x43C00100 , LENGTH = 0x3c800 - 0x100
    -    DDR      : ORIGIN = 0x84000000 , LENGTH = 0x800000
    +    DDR      : ORIGIN = 0x88000000 , LENGTH = 0x800000
     }
    

    This should read the image as it is at 0x88000000 and then request for authentication. If the authentication is successful, the final image is then loaded at the different address 0x84000000.

    So, the idea here is when the authentication failure happens, save the read image at 0x88000000 probably using debugger and compare it against the golden image available in PC. If they differs, it will confirm the DDR is the issue here otherwise we will have to look elsewhere.

    Regards,

    Prashant

  • Just in case, there are other ways to confirm if the image is read correctly.

    You could integrate a simple software based CRC32 computation in the application. Then, just before the authentication request, compute the CRC32 checksum of the image read in DDR. In the case of authentication failure, compare the computed CRC32 with the CRC32 of the golden image.

    We don't have code for CRC32 but you should be able to find it on internet. If found, I would think this approach is better than the previous one.

  • When use the uart uniflash programs,the xds110 not connect the board,so not have the tools can be dump the ddr data .

  • When use the uart uniflash programs,the xds110 not connect the board,so not have the tools can be dump the ddr data .

    I could not understand. Do you not have any external or on-board debugger for your board? If you do, you could connect to the core after the failure and read the data from DDR.

  • This program is based on the serial port flashing program and the flashing program is running on the DM-R5F core, because the chip is a FS_HS chip, each boot needs to wait for the SYSFW firmware, so when developing SBL, you can't use the XDS110 debugger, not that there is no debugging interface on the board.

    So not dump the raw data via XDS110

  • That is not correct. You could connect to DM-R5F core anytime in the boot flow.

    What I would like you to do is trap the execution in an infinite loop as soon as the authentication failure happens. Then, use the debugger to connect to the DM-R5F core and dump the image from DDR.

  • Hi Prashant

    I use the checksum to check the From uart data and after verify data,The checksum calculated twice is really not the same. 

    Then i use the debug log trace the uart data and after verify data,somethingmagical happend. When there is an error and when there is no error, the two data are different

    the no error log following :

    [sbl uart uniflash stage1] ddr init status :  v1:0x0...
    [DM:SCICLIENT] Request Sciclient_service for msgType = 0x2...
    [DM:SCICLIENT] Request Sciclient_serviceSecureProxy for msgType = 0x2...
    [DM:SCICLIENT] Sciclient_sendMessage,thread = 23
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 2
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 103022594
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 2
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 774975033
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 1982672184
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 808335664
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 942681649
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 1867196448
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 1260416111
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 1634492783
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 41
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 16973833
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 2049
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 0
    
    DMSC Firmware Version 9.1.8--v09.01.08 (Kool Koala)
    DMSC Firmware revision 0x9
    DMSC ABI revision 3.1
    
    [sbl uart uniflash stage1] recv the sbl_uart_uniflash stage2 image...
    gUniflashFileBuf = 0x30,gUniflashFileBuf_bk = 0x30 ...
    gUniflashFileBuf = 0x82,gUniflashFileBuf_bk = 0x82 ...
    gUniflashFileBuf = 0x6,gUniflashFileBuf_bk = 0x6 ...
    gUniflashFileBuf = 0x72,gUniflashFileBuf_bk = 0x72 ...
    gUniflashFileBuf = 0x30,gUniflashFileBuf_bk = 0x30 ...
    gUniflashFileBuf = 0x82,gUniflashFileBuf_bk = 0x82 ...
    gUniflashFileBuf = 0x4,gUniflashFileBuf_bk = 0x4 ...
    gUniflashFileBuf = 0x5a,gUniflashFileBuf_bk = 0x5a ...
    gUniflashFileBuf = 0xa0,gUniflashFileBuf_bk = 0xa0 ...
    gUniflashFileBuf = 0x3,gUniflashFileBuf_bk = 0x3 ...
    gUniflashFileBuf = 0x2,gUniflashFileBuf_bk = 0x2 ...
    gUniflashFileBuf = 0x1,gUniflashFileBuf_bk = 0x1 ...
    gUniflashFileBuf = 0x2,gUniflashFileBuf_bk = 0x2 ...
    gUniflashFileBuf = 0x2,gUniflashFileBuf_bk = 0x2 ...
    gUniflashFileBuf = 0x14,gUniflashFileBuf_bk = 0x14 ...
    gUniflashFileBuf = 0x58,gUniflashFileBuf_bk = 0x58 ...
    gUniflashFileBuf = 0x7b,gUniflashFileBuf_bk = 0x7b ...
    gUniflashFileBuf = 0xa8,gUniflashFileBuf_bk = 0xa8 ...
    gUniflashFileBuf = 0x5c,gUniflashFileBuf_bk = 0x5c ...
    gUniflashFileBuf = 0x25,gUniflashFileBuf_bk = 0x25 ...
    gUniflashFileBuf = 0x49,gUniflashFileBuf_bk = 0x49 ...
    gUniflashFileBuf = 0x65,gUniflashFileBuf_bk = 0x65 ...
    gUniflashFileBuf = 0xc6,gUniflashFileBuf_bk = 0xc6 ...
    gUniflashFileBuf = 0xd9,gUniflashFileBuf_bk = 0xd9 ...
    gUniflashFileBuf = 0x4c,gUniflashFileBuf_bk = 0x4c ...
    gUniflashFileBuf = 0xa0,gUniflashFileBuf_bk = 0xa0 ...
    gUniflashFileBuf = 0xc7,gUniflashFileBuf_bk = 0xc7 ...
    gUniflashFileBuf = 0x8f,gUniflashFileBuf_bk = 0x8f ...
    gUniflashFileBuf = 0x29,gUniflashFileBuf_bk = 0x29 ...
    gUniflashFileBuf = 0x3b,gUniflashFileBuf_bk = 0x3b ...
    gUniflashFileBuf = 0x7b,gUniflashFileBuf_bk = 0x7b ...
    gUniflashFileBuf = 0xd6,gUniflashFileBuf_bk = 0xd6 ...
    gUniflashFileBuf = 0x44,gUniflashFileBuf_bk = 0x44 ...
    gUniflashFileBuf = 0x74,gUniflashFileBuf_bk = 0x74 ...
    gUniflashFileBuf = 0x5,gUniflashFileBuf_bk = 0x5 ...
    gUniflashFileBuf = 0x30,gUniflashFileBuf_bk = 0x30 ...
    gUniflashFileBuf = 0xd,gUniflashFileBuf_bk = 0xd ...
    gUniflashFileBuf = 0x6,gUniflashFileBuf_bk = 0x6 ...
    gUniflashFileBuf = 0x9,gUniflashFileBuf_bk = 0x9 ...
    gUniflashFileBuf = 0x2a,gUniflashFileBuf_bk = 0x2a ...
    gUniflashFileBuf = 0x86,gUniflashFileBuf_bk = 0x86 ...
    gUniflashFileBuf = 0x48,gUniflashFileBuf_bk = 0x48 ...
    gUniflashFileBuf = 0x86,gUniflashFileBuf_bk = 0x86 ...
    gUniflashFileBuf = 0xf7,gUniflashFileBuf_bk = 0xf7 ...
    gUniflashFileBuf = 0xd,gUniflashFileBuf_bk = 0xd ...
    gUniflashFileBuf = 0x1,gUniflashFileBuf_bk = 0x1 ...
    gUniflashFileBuf = 0x1,gUniflashFileBuf_bk = 0x1 ...
    gUniflashFileBuf = 0xd,gUniflashFileBuf_bk = 0xd ...
    gUniflashFileBuf = 0x5,gUniflashFileBuf_bk = 0x5 ...
    gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x0 ...
    gUniflashFileBuf = 0x30,gUniflashFileBuf_bk = 0x30 ...
    gUniflashFileBuf = 0x81,gUniflashFileBuf_bk = 0x81 ...
    gUniflashFileBuf = 0x90,gUniflashFileBuf_bk = 0x90 ...
    gUniflashFileBuf = 0x31,gUniflashFileBuf_bk = 0x31 ...
    gUniflashFileBuf = 0xb,gUniflashFileBuf_bk = 0xb ...
    gUniflashFileBuf = 0x30,gUniflashFileBuf_bk = 0x30 ...
    gUniflashFileBuf = 0x9,gUniflashFileBuf_bk = 0x9 ...
    gUniflashFileBuf = 0x6,gUniflashFileBuf_bk = 0x6 ...
    gUniflashFileBuf = 0x3,gUniflashFileBuf_bk = 0x3 ...
    gUniflashFileBuf = 0x55,gUniflashFileBuf_bk = 0x55 ...
    gUniflashFileBuf = 0x4,gUniflashFileBuf_bk = 0x4 ...
    gUniflashFileBuf = 0x6,gUniflashFileBuf_bk = 0x6 ...
    gUniflashFileBuf = 0x13,gUniflashFileBuf_bk = 0x13 ...
    gUniflashFileBuf = 0x2,gUniflashFileBuf_bk = 0x2 ...
    gUniflashFileBuf = 0x55,gUniflashFileBuf_bk = 0x55 ...
    gUniflashFileBuf = 0x53,gUniflashFileBuf_bk = 0x53 ...
    gUniflashFileBuf = 0x31,gUniflashFileBuf_bk = 0x31 ...
    gUniflashFileBuf = 0xb,gUniflashFileBuf_bk = 0xb ...
    gUniflashFileBuf = 0x30,gUniflashFileBuf_bk = 0x30 ...
    gUniflashFileBuf = 0x9,gUniflashFileBuf_bk = 0x9 ...
    gUniflashFileBuf = 0x6,gUniflashFileBuf_bk = 0x6 ...
    gUniflashFileBuf = 0x3,gUniflashFileBuf_bk = 0x3 ...
    gUniflashFileBuf = 0x55,gUniflashFileBuf_bk = 0x55 ...
    gUniflashFileBuf = 0x4,gUniflashFileBuf_bk = 0x4 ...
    gUniflashFileBuf = 0x8,gUniflashFileBuf_bk = 0x8 ...
    gUniflashFileBuf = 0xc,gUniflashFileBuf_bk = 0xc ...
    gUniflashFileBuf = 0x2,gUniflashFileBuf_bk = 0x2 ...
    gUniflashFileBuf = 0x53,gUniflashFileBuf_bk = 0x53 ...
    gUniflashFileBuf = 0x43,gUniflashFileBuf_bk = 0x43 ...
    gUniflashFileBuf = 0x31,gUniflashFileBuf_bk = 0x31 ...
    gUniflashFileBuf = 0x11,gUniflashFileBuf_bk = 0x11 ...
    gUniflashFileBuf = 0x30,gUniflashFileBuf_bk = 0x30 ...
    gUniflashFileBuf = 0xf,gUniflashFileBuf_bk = 0xf ...
    gUniflashFileBuf = 0x6,gUniflashFileBuf_bk = 0x6 ...
    gUniflashFileBuf = 0x3,gUniflashFileBuf_bk = 0x3 ...
    gUniflashFileBuf = 0x55,gUniflashFileBuf_bk = 0x55 ...
    gUniflashFileBuf = 0x4,gUniflashFileBuf_bk = 0x4 ...
    gUniflashFileBuf = 0x7,gUniflashFileBuf_bk = 0x7 ...
    gUniflashFileBuf = 0xc,gUniflashFileBuf_bk = 0xc ...
    gUniflashFileBuf = 0x8,gUniflashFileBuf_bk = 0x8 ...
    gUniflashFileBuf = 0x4e,gUniflashFileBuf_bk = 0x4e ...
    gUniflashFileBuf = 0x65,gUniflashFileBuf_bk = 0x65 ...
    gUniflashFileBuf = 0x77,gUniflashFileBuf_bk = 0x77 ...
    gUniflashFileBuf = 0x20,gUniflashFileBuf_bk = 0x20 ...
    gUniflashFileBuf = 0x59,gUniflashFileBuf_bk = 0x59 ...
    gUniflashFileBuf = 0x6f,gUniflashFileBuf_bk = 0x6f ...
    gUniflashFileBuf = 0x72,gUniflashFileBuf_bk = 0x72 ...
    gUniflashFileBuf = 0x6b,gUniflashFileBuf_bk = 0x6b ...
    gUniflashFileBuf = 0x31,gUniflashFileBuf_bk = 0x31 ...
    gUniflashFileBuf = 0x21,gUniflashFileBuf_bk = 0x21 ...
    [sbl uart uniflash stage1] raw data checksum is 116...
    [sbl uart uniflash stage1] recv the sbl_uart_uniflash stage2 image Done!!!
    [Bootloader:Bootloader_parseMultiCoreAppImage] HS Device : VerifyMulticoreImage
    [Bootloader:Bootloader_verifyMulticoreImage] The bootMedia is 0xb0070001
    [Bootloader:Bootloader_verifyMulticoreImage] certLen = 0x676
    [Bootloader:Bootloader_verifyMulticoreImage] certLoadAddr = 0x84000000
    [DM:SCICLIENT] Request Sciclient_service for msgType = 0xc120...
    [DM:SCICLIENT] Request Sciclient_serviceSecureProxy for msgType = 0xc120...
    [DM:SCICLIENT] Sciclient_sendMessage,thread = 23
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 2
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 35963168
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 2
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 0
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 0
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 0
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 0
    [DM:SCICLIENT:Sciclient_procBootAuthAndStart] retVal = 0x0,respParam.flags = 0x2
    [Bootloader:Bootloader_verifyMulticoreImage] authStatus = 0x0
    errcode = 0x2,index = 0,data = 0x4d,gUniflashFileBuf = 0x4d,gUniflashFileBuf_bk = 0x30 ...
    errcode = 0x2,index = 1,data = 0x53,gUniflashFileBuf = 0x53,gUniflashFileBuf_bk = 0x82 ...
    errcode = 0x2,index = 2,data = 0x54,gUniflashFileBuf = 0x54,gUniflashFileBuf_bk = 0x6 ...
    errcode = 0x2,index = 3,data = 0x52,gUniflashFileBuf = 0x52,gUniflashFileBuf_bk = 0x72 ...
    errcode = 0x2,index = 4,data = 0x1,gUniflashFileBuf = 0x1,gUniflashFileBuf_bk = 0x30 ...
    errcode = 0x2,index = 5,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x82 ...
    errcode = 0x2,index = 6,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x4 ...
    errcode = 0x2,index = 7,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x5a ...
    errcode = 0x2,index = 8,data = 0x37,gUniflashFileBuf = 0x37,gUniflashFileBuf_bk = 0xa0 ...
    errcode = 0x2,index = 9,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x3 ...
    errcode = 0x2,index = 10,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x2 ...
    errcode = 0x2,index = 11,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x1 ...
    errcode = 0x2,index = 12,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x2 ...
    errcode = 0x2,index = 13,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x2 ...
    errcode = 0x2,index = 14,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x14 ...
    errcode = 0x2,index = 15,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x58 ...
    errcode = 0x2,index = 16,data = 0x4,gUniflashFileBuf = 0x4,gUniflashFileBuf_bk = 0x7b ...
    errcode = 0x2,index = 17,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0xa8 ...
    errcode = 0x2,index = 18,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x5c ...
    errcode = 0x2,index = 19,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x25 ...
    errcode = 0x2,index = 20,data = 0x20,gUniflashFileBuf = 0x20,gUniflashFileBuf_bk = 0x49 ...
    errcode = 0x2,index = 21,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x65 ...
    errcode = 0x2,index = 22,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0xc6 ...
    errcode = 0x2,index = 23,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0xd9 ...
    errcode = 0x2,index = 24,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x4c ...
    errcode = 0x2,index = 25,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0xa0 ...
    errcode = 0x2,index = 26,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0xc7 ...
    errcode = 0x2,index = 27,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x8f ...
    errcode = 0x2,index = 28,data = 0x4d,gUniflashFileBuf = 0x4d,gUniflashFileBuf_bk = 0x29 ...
    errcode = 0x2,index = 29,data = 0x45,gUniflashFileBuf = 0x45,gUniflashFileBuf_bk = 0x3b ...
    errcode = 0x2,index = 30,data = 0x4e,gUniflashFileBuf = 0x4e,gUniflashFileBuf_bk = 0x7b ...
    errcode = 0x2,index = 31,data = 0x44,gUniflashFileBuf = 0x44,gUniflashFileBuf_bk = 0xd6 ...
    errcode = 0x2,index = 32,data = 0x52,gUniflashFileBuf = 0x52,gUniflashFileBuf_bk = 0x44 ...
    errcode = 0x2,index = 33,data = 0x50,gUniflashFileBuf = 0x50,gUniflashFileBuf_bk = 0x74 ...
    errcode = 0x2,index = 34,data = 0x52,gUniflashFileBuf = 0x52,gUniflashFileBuf_bk = 0x5 ...
    errcode = 0x2,index = 35,data = 0x43,gUniflashFileBuf = 0x43,gUniflashFileBuf_bk = 0x30 ...
    errcode = 0x2,index = 36,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0xd ...
    errcode = 0x2,index = 37,data = 0x64,gUniflashFileBuf = 0x64,gUniflashFileBuf_bk = 0x6 ...
    errcode = 0x2,index = 38,data = 0xb3,gUniflashFileBuf = 0xb3,gUniflashFileBuf_bk = 0x9 ...
    errcode = 0x2,index = 39,data = 0x9d,gUniflashFileBuf = 0x9d,gUniflashFileBuf_bk = 0x2a ...
    errcode = 0x2,index = 40,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x86 ...
    errcode = 0x2,index = 41,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x48 ...
    errcode = 0x2,index = 42,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x86 ...
    errcode = 0x2,index = 43,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0xf7 ...
    errcode = 0x2,index = 44,data = 0x5,gUniflashFileBuf = 0x5,gUniflashFileBuf_bk = 0xd ...
    errcode = 0x2,index = 45,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x1 ...
    errcode = 0x2,index = 46,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x1 ...
    errcode = 0x2,index = 47,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0xd ...
    errcode = 0x2,index = 48,data = 0x1,gUniflashFileBuf = 0x1,gUniflashFileBuf_bk = 0x5 ...
    errcode = 0x0,index = 49,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x0 ...
    errcode = 0x2,index = 50,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x30 ...
    errcode = 0x2,index = 51,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x81 ...
    errcode = 0x2,index = 52,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x90 ...
    errcode = 0x2,index = 53,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x31 ...
    errcode = 0x2,index = 54,data = 0xb0,gUniflashFileBuf = 0xb0,gUniflashFileBuf_bk = 0xb ...
    errcode = 0x2,index = 55,data = 0x9d,gUniflashFileBuf = 0x9d,gUniflashFileBuf_bk = 0x30 ...
    errcode = 0x2,index = 56,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x9 ...
    errcode = 0x2,index = 57,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x6 ...
    errcode = 0x2,index = 58,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x3 ...
    errcode = 0x2,index = 59,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x55 ...
    errcode = 0x2,index = 60,data = 0x70,gUniflashFileBuf = 0x70,gUniflashFileBuf_bk = 0x4 ...
    errcode = 0x2,index = 61,data = 0x18,gUniflashFileBuf = 0x18,gUniflashFileBuf_bk = 0x6 ...
    errcode = 0x2,index = 62,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x13 ...
    errcode = 0x2,index = 63,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x2 ...
    errcode = 0x2,index = 64,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x55 ...
    errcode = 0x2,index = 65,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x53 ...
    errcode = 0x2,index = 66,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x31 ...
    errcode = 0x2,index = 67,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0xb ...
    errcode = 0x2,index = 68,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x30 ...
    errcode = 0x2,index = 69,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x9 ...
    errcode = 0x2,index = 70,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x6 ...
    errcode = 0x2,index = 71,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x3 ...
    errcode = 0x2,index = 72,data = 0x24,gUniflashFileBuf = 0x24,gUniflashFileBuf_bk = 0x55 ...
    errcode = 0x2,index = 73,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x4 ...
    errcode = 0x2,index = 74,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x8 ...
    errcode = 0x2,index = 75,data = 0x2f,gUniflashFileBuf = 0x2f,gUniflashFileBuf_bk = 0xc ...
    errcode = 0x2,index = 76,data = 0x24,gUniflashFileBuf = 0x24,gUniflashFileBuf_bk = 0x2 ...
    errcode = 0x2,index = 77,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x53 ...
    errcode = 0x2,index = 78,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x43 ...
    errcode = 0x2,index = 79,data = 0x2f,gUniflashFileBuf = 0x2f,gUniflashFileBuf_bk = 0x31 ...
    errcode = 0x2,index = 80,data = 0x24,gUniflashFileBuf = 0x24,gUniflashFileBuf_bk = 0x11 ...
    errcode = 0x2,index = 81,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x30 ...
    errcode = 0x2,index = 82,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0xf ...
    errcode = 0x2,index = 83,data = 0x2f,gUniflashFileBuf = 0x2f,gUniflashFileBuf_bk = 0x6 ...
    errcode = 0x2,index = 84,data = 0x24,gUniflashFileBuf = 0x24,gUniflashFileBuf_bk = 0x3 ...
    errcode = 0x2,index = 85,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x55 ...
    errcode = 0x2,index = 86,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x4 ...
    errcode = 0x2,index = 87,data = 0x2f,gUniflashFileBuf = 0x2f,gUniflashFileBuf_bk = 0x7 ...
    errcode = 0x0,index = 88,data = 0xc,gUniflashFileBuf = 0xc,gUniflashFileBuf_bk = 0xc ...
    errcode = 0x2,index = 89,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x8 ...
    errcode = 0x2,index = 90,data = 0x40,gUniflashFileBuf = 0x40,gUniflashFileBuf_bk = 0x4e ...
    errcode = 0x2,index = 91,data = 0x2e,gUniflashFileBuf = 0x2e,gUniflashFileBuf_bk = 0x65 ...
    errcode = 0x2,index = 92,data = 0xc,gUniflashFileBuf = 0xc,gUniflashFileBuf_bk = 0x77 ...
    errcode = 0x2,index = 93,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x20 ...
    errcode = 0x2,index = 94,data = 0x40,gUniflashFileBuf = 0x40,gUniflashFileBuf_bk = 0x59 ...
    errcode = 0x2,index = 95,data = 0x2e,gUniflashFileBuf = 0x2e,gUniflashFileBuf_bk = 0x6f ...
    errcode = 0x2,index = 96,data = 0x14,gUniflashFileBuf = 0x14,gUniflashFileBuf_bk = 0x72 ...
    errcode = 0x2,index = 97,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x6b ...
    errcode = 0x2,index = 98,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x31 ...
    errcode = 0x2,index = 99,data = 0x2f,gUniflashFileBuf = 0x2f,gUniflashFileBuf_bk = 0x21 ...
    [sbl uart uniflash stage1] verify fail : raw data checksum is 15...
    [sbl uart uniflash stage1] App_loadSelfcoreImage function : Bootloader_parseMultiCoreAppImage return status 0...
    [DM:SCICLIENT] Request Sciclient_service for msgType = 0x10c...
    0x6180010C
    0x61C00079
    0x612F7CA7
    0x612F7CA7
    [DM:SCICLIENT] Request Sciclient_service for msgType = 0x10e...
    0x6180010E
    0x61C00079
    [sbl uart uniflash stage1] Loading the sbl_uart_uniflash_stage2 image to WKP core...
    [sbl uart uniflash stage1] Loading the sbl_uart_uniflash_stage2 image Done and Response message for XMODEM...
    
    
    [sbl uart uniflash stage2] Init has been Done!!!
    ERROR: Board_flashOpen:201: FLASH open failed for instance 0 !!!
    

    the error log following 

    [sbl uart uniflash stage1] ddr init status :  v1:0x0...
    [DM:SCICLIENT] Request Sciclient_service for msgType = 0x2...
    [DM:SCICLIENT] Request Sciclient_serviceSecureProxy for msgType = 0x2...
    [DM:SCICLIENT] Sciclient_sendMessage,thread = 23
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 2
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 103022594
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 2
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 774975033
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 1982672184
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 808335664
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 942681649
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 1867196448
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 1260416111
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 1634492783
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 41
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 16973833
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 2049
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 0
    
    DMSC Firmware Version 9.1.8--v09.01.08 (Kool Koala)
    DMSC Firmware revision 0x9
    DMSC ABI revision 3.1
    
    [sbl uart uniflash stage1] recv the sbl_uart_uniflash stage2 image...
    gUniflashFileBuf = 0x30,gUniflashFileBuf_bk = 0x30 ...
    gUniflashFileBuf = 0x82,gUniflashFileBuf_bk = 0x82 ...
    gUniflashFileBuf = 0x6,gUniflashFileBuf_bk = 0x6 ...
    gUniflashFileBuf = 0x72,gUniflashFileBuf_bk = 0x72 ...
    gUniflashFileBuf = 0x30,gUniflashFileBuf_bk = 0x30 ...
    gUniflashFileBuf = 0x82,gUniflashFileBuf_bk = 0x82 ...
    gUniflashFileBuf = 0x4,gUniflashFileBuf_bk = 0x4 ...
    gUniflashFileBuf = 0x5a,gUniflashFileBuf_bk = 0x5a ...
    gUniflashFileBuf = 0xa0,gUniflashFileBuf_bk = 0xa0 ...
    gUniflashFileBuf = 0x3,gUniflashFileBuf_bk = 0x3 ...
    gUniflashFileBuf = 0x2,gUniflashFileBuf_bk = 0x2 ...
    gUniflashFileBuf = 0x1,gUniflashFileBuf_bk = 0x1 ...
    gUniflashFileBuf = 0x2,gUniflashFileBuf_bk = 0x2 ...
    gUniflashFileBuf = 0x2,gUniflashFileBuf_bk = 0x2 ...
    gUniflashFileBuf = 0x14,gUniflashFileBuf_bk = 0x14 ...
    gUniflashFileBuf = 0x58,gUniflashFileBuf_bk = 0x58 ...
    gUniflashFileBuf = 0x7b,gUniflashFileBuf_bk = 0x7b ...
    gUniflashFileBuf = 0xa8,gUniflashFileBuf_bk = 0xa8 ...
    gUniflashFileBuf = 0x5c,gUniflashFileBuf_bk = 0x5c ...
    gUniflashFileBuf = 0x25,gUniflashFileBuf_bk = 0x25 ...
    gUniflashFileBuf = 0x49,gUniflashFileBuf_bk = 0x49 ...
    gUniflashFileBuf = 0x65,gUniflashFileBuf_bk = 0x65 ...
    gUniflashFileBuf = 0xc6,gUniflashFileBuf_bk = 0xc6 ...
    gUniflashFileBuf = 0xd9,gUniflashFileBuf_bk = 0xd9 ...
    gUniflashFileBuf = 0x4c,gUniflashFileBuf_bk = 0x4c ...
    gUniflashFileBuf = 0xa0,gUniflashFileBuf_bk = 0xa0 ...
    gUniflashFileBuf = 0xc7,gUniflashFileBuf_bk = 0xc7 ...
    gUniflashFileBuf = 0x8f,gUniflashFileBuf_bk = 0x8f ...
    gUniflashFileBuf = 0x29,gUniflashFileBuf_bk = 0x29 ...
    gUniflashFileBuf = 0x3b,gUniflashFileBuf_bk = 0x3b ...
    gUniflashFileBuf = 0x7b,gUniflashFileBuf_bk = 0x7b ...
    gUniflashFileBuf = 0xd6,gUniflashFileBuf_bk = 0xd6 ...
    gUniflashFileBuf = 0x44,gUniflashFileBuf_bk = 0x44 ...
    gUniflashFileBuf = 0x74,gUniflashFileBuf_bk = 0x74 ...
    gUniflashFileBuf = 0x5,gUniflashFileBuf_bk = 0x5 ...
    gUniflashFileBuf = 0x30,gUniflashFileBuf_bk = 0x30 ...
    gUniflashFileBuf = 0xd,gUniflashFileBuf_bk = 0xd ...
    gUniflashFileBuf = 0x6,gUniflashFileBuf_bk = 0x6 ...
    gUniflashFileBuf = 0x9,gUniflashFileBuf_bk = 0x9 ...
    gUniflashFileBuf = 0x2a,gUniflashFileBuf_bk = 0x2a ...
    gUniflashFileBuf = 0x86,gUniflashFileBuf_bk = 0x86 ...
    gUniflashFileBuf = 0x48,gUniflashFileBuf_bk = 0x48 ...
    gUniflashFileBuf = 0x86,gUniflashFileBuf_bk = 0x86 ...
    gUniflashFileBuf = 0xf7,gUniflashFileBuf_bk = 0xf7 ...
    gUniflashFileBuf = 0xd,gUniflashFileBuf_bk = 0xd ...
    gUniflashFileBuf = 0x1,gUniflashFileBuf_bk = 0x1 ...
    gUniflashFileBuf = 0x1,gUniflashFileBuf_bk = 0x1 ...
    gUniflashFileBuf = 0xd,gUniflashFileBuf_bk = 0xd ...
    gUniflashFileBuf = 0x5,gUniflashFileBuf_bk = 0x5 ...
    gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x0 ...
    gUniflashFileBuf = 0x30,gUniflashFileBuf_bk = 0x30 ...
    gUniflashFileBuf = 0x81,gUniflashFileBuf_bk = 0x81 ...
    gUniflashFileBuf = 0x90,gUniflashFileBuf_bk = 0x90 ...
    gUniflashFileBuf = 0x31,gUniflashFileBuf_bk = 0x31 ...
    gUniflashFileBuf = 0xb,gUniflashFileBuf_bk = 0xb ...
    gUniflashFileBuf = 0x30,gUniflashFileBuf_bk = 0x30 ...
    gUniflashFileBuf = 0x9,gUniflashFileBuf_bk = 0x9 ...
    gUniflashFileBuf = 0x6,gUniflashFileBuf_bk = 0x6 ...
    gUniflashFileBuf = 0x3,gUniflashFileBuf_bk = 0x3 ...
    gUniflashFileBuf = 0x55,gUniflashFileBuf_bk = 0x55 ...
    gUniflashFileBuf = 0x4,gUniflashFileBuf_bk = 0x4 ...
    gUniflashFileBuf = 0x6,gUniflashFileBuf_bk = 0x6 ...
    gUniflashFileBuf = 0x13,gUniflashFileBuf_bk = 0x13 ...
    gUniflashFileBuf = 0x2,gUniflashFileBuf_bk = 0x2 ...
    gUniflashFileBuf = 0x55,gUniflashFileBuf_bk = 0x55 ...
    gUniflashFileBuf = 0x53,gUniflashFileBuf_bk = 0x53 ...
    gUniflashFileBuf = 0x31,gUniflashFileBuf_bk = 0x31 ...
    gUniflashFileBuf = 0xb,gUniflashFileBuf_bk = 0xb ...
    gUniflashFileBuf = 0x30,gUniflashFileBuf_bk = 0x30 ...
    gUniflashFileBuf = 0x9,gUniflashFileBuf_bk = 0x9 ...
    gUniflashFileBuf = 0x6,gUniflashFileBuf_bk = 0x6 ...
    gUniflashFileBuf = 0x3,gUniflashFileBuf_bk = 0x3 ...
    gUniflashFileBuf = 0x55,gUniflashFileBuf_bk = 0x55 ...
    gUniflashFileBuf = 0x4,gUniflashFileBuf_bk = 0x4 ...
    gUniflashFileBuf = 0x8,gUniflashFileBuf_bk = 0x8 ...
    gUniflashFileBuf = 0xc,gUniflashFileBuf_bk = 0xc ...
    gUniflashFileBuf = 0x2,gUniflashFileBuf_bk = 0x2 ...
    gUniflashFileBuf = 0x53,gUniflashFileBuf_bk = 0x53 ...
    gUniflashFileBuf = 0x43,gUniflashFileBuf_bk = 0x43 ...
    gUniflashFileBuf = 0x31,gUniflashFileBuf_bk = 0x31 ...
    gUniflashFileBuf = 0x11,gUniflashFileBuf_bk = 0x11 ...
    gUniflashFileBuf = 0x30,gUniflashFileBuf_bk = 0x30 ...
    gUniflashFileBuf = 0xf,gUniflashFileBuf_bk = 0xf ...
    gUniflashFileBuf = 0x6,gUniflashFileBuf_bk = 0x6 ...
    gUniflashFileBuf = 0x3,gUniflashFileBuf_bk = 0x3 ...
    gUniflashFileBuf = 0x55,gUniflashFileBuf_bk = 0x55 ...
    gUniflashFileBuf = 0x4,gUniflashFileBuf_bk = 0x4 ...
    gUniflashFileBuf = 0x7,gUniflashFileBuf_bk = 0x7 ...
    gUniflashFileBuf = 0xc,gUniflashFileBuf_bk = 0xc ...
    gUniflashFileBuf = 0x8,gUniflashFileBuf_bk = 0x8 ...
    gUniflashFileBuf = 0x4e,gUniflashFileBuf_bk = 0x4e ...
    gUniflashFileBuf = 0x65,gUniflashFileBuf_bk = 0x65 ...
    gUniflashFileBuf = 0x77,gUniflashFileBuf_bk = 0x77 ...
    gUniflashFileBuf = 0x20,gUniflashFileBuf_bk = 0x20 ...
    gUniflashFileBuf = 0x59,gUniflashFileBuf_bk = 0x59 ...
    gUniflashFileBuf = 0x6f,gUniflashFileBuf_bk = 0x6f ...
    gUniflashFileBuf = 0x72,gUniflashFileBuf_bk = 0x72 ...
    gUniflashFileBuf = 0x6b,gUniflashFileBuf_bk = 0x6b ...
    gUniflashFileBuf = 0x31,gUniflashFileBuf_bk = 0x31 ...
    gUniflashFileBuf = 0x21,gUniflashFileBuf_bk = 0x21 ...
    [sbl uart uniflash stage1] raw data checksum is 116...
    [sbl uart uniflash stage1] recv the sbl_uart_uniflash stage2 image Done!!!
    [Bootloader:Bootloader_parseMultiCoreAppImage] HS Device : VerifyMulticoreImage
    [Bootloader:Bootloader_verifyMulticoreImage] The bootMedia is 0xb0070001
    [Bootloader:Bootloader_verifyMulticoreImage] certLen = 0x676
    [Bootloader:Bootloader_verifyMulticoreImage] certLoadAddr = 0x84000000
    [DM:SCICLIENT] Request Sciclient_service for msgType = 0xc120...
    [DM:SCICLIENT] Request Sciclient_serviceSecureProxy for msgType = 0xc120...
    [DM:SCICLIENT] Sciclient_sendMessage,thread = 23
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 0
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 35963168
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 0
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 774975033
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 1982672184
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 808335664
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 0
    [DM:SCICLIENT:Sciclient_procBootAuthAndStart] retVal = 0x0,respParam.flags = 0x0
    [DM:SCICLIENT:Sciclient_procBootAuthAndStart] Sciclient_procBootAuthAndStart request is NOACK
    [Bootloader:Bootloader_verifyMulticoreImage] authStatus = 0xffffffff
    errcode = 0x2,index = 0,data = 0x4d,gUniflashFileBuf = 0x4d,gUniflashFileBuf_bk = 0x30 ...
    errcode = 0x2,index = 1,data = 0x53,gUniflashFileBuf = 0x53,gUniflashFileBuf_bk = 0x82 ...
    errcode = 0x2,index = 2,data = 0x54,gUniflashFileBuf = 0x54,gUniflashFileBuf_bk = 0x6 ...
    errcode = 0x2,index = 3,data = 0x52,gUniflashFileBuf = 0x52,gUniflashFileBuf_bk = 0x72 ...
    errcode = 0x2,index = 4,data = 0x1,gUniflashFileBuf = 0x1,gUniflashFileBuf_bk = 0x30 ...
    errcode = 0x2,index = 5,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x82 ...
    errcode = 0x2,index = 6,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x4 ...
    errcode = 0x2,index = 7,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x5a ...
    errcode = 0x2,index = 8,data = 0x37,gUniflashFileBuf = 0x37,gUniflashFileBuf_bk = 0xa0 ...
    errcode = 0x2,index = 9,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x3 ...
    errcode = 0x2,index = 10,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x2 ...
    errcode = 0x2,index = 11,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x1 ...
    errcode = 0x2,index = 12,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x2 ...
    errcode = 0x2,index = 13,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x2 ...
    errcode = 0x2,index = 14,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x14 ...
    errcode = 0x2,index = 15,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x58 ...
    errcode = 0x2,index = 16,data = 0x4,gUniflashFileBuf = 0x4,gUniflashFileBuf_bk = 0x7b ...
    errcode = 0x2,index = 17,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0xa8 ...
    errcode = 0x2,index = 18,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x5c ...
    errcode = 0x2,index = 19,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x25 ...
    errcode = 0x2,index = 20,data = 0x20,gUniflashFileBuf = 0x20,gUniflashFileBuf_bk = 0x49 ...
    errcode = 0x2,index = 21,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x65 ...
    errcode = 0x2,index = 22,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0xc6 ...
    errcode = 0x2,index = 23,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0xd9 ...
    errcode = 0x2,index = 24,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x4c ...
    errcode = 0x2,index = 25,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0xa0 ...
    errcode = 0x2,index = 26,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0xc7 ...
    errcode = 0x2,index = 27,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x8f ...
    errcode = 0x2,index = 28,data = 0x4d,gUniflashFileBuf = 0x4d,gUniflashFileBuf_bk = 0x29 ...
    errcode = 0x2,index = 29,data = 0x45,gUniflashFileBuf = 0x45,gUniflashFileBuf_bk = 0x3b ...
    errcode = 0x2,index = 30,data = 0x4e,gUniflashFileBuf = 0x4e,gUniflashFileBuf_bk = 0x7b ...
    errcode = 0x2,index = 31,data = 0x44,gUniflashFileBuf = 0x44,gUniflashFileBuf_bk = 0xd6 ...
    errcode = 0x2,index = 32,data = 0x52,gUniflashFileBuf = 0x52,gUniflashFileBuf_bk = 0x44 ...
    errcode = 0x2,index = 33,data = 0x50,gUniflashFileBuf = 0x50,gUniflashFileBuf_bk = 0x74 ...
    errcode = 0x2,index = 34,data = 0x52,gUniflashFileBuf = 0x52,gUniflashFileBuf_bk = 0x5 ...
    errcode = 0x2,index = 35,data = 0x43,gUniflashFileBuf = 0x43,gUniflashFileBuf_bk = 0x30 ...
    errcode = 0x2,index = 36,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0xd ...
    errcode = 0x2,index = 37,data = 0x64,gUniflashFileBuf = 0x64,gUniflashFileBuf_bk = 0x6 ...
    errcode = 0x2,index = 38,data = 0xb3,gUniflashFileBuf = 0xb3,gUniflashFileBuf_bk = 0x9 ...
    errcode = 0x2,index = 39,data = 0x9d,gUniflashFileBuf = 0x9d,gUniflashFileBuf_bk = 0x2a ...
    errcode = 0x2,index = 40,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x86 ...
    errcode = 0x2,index = 41,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x48 ...
    errcode = 0x2,index = 42,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x86 ...
    errcode = 0x2,index = 43,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0xf7 ...
    errcode = 0x2,index = 44,data = 0x5,gUniflashFileBuf = 0x5,gUniflashFileBuf_bk = 0xd ...
    errcode = 0x2,index = 45,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x1 ...
    errcode = 0x2,index = 46,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x1 ...
    errcode = 0x2,index = 47,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0xd ...
    errcode = 0x2,index = 48,data = 0x1,gUniflashFileBuf = 0x1,gUniflashFileBuf_bk = 0x5 ...
    errcode = 0x0,index = 49,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x0 ...
    errcode = 0x2,index = 50,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x30 ...
    errcode = 0x2,index = 51,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x81 ...
    errcode = 0x2,index = 52,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x90 ...
    errcode = 0x2,index = 53,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x31 ...
    errcode = 0x2,index = 54,data = 0xb0,gUniflashFileBuf = 0xb0,gUniflashFileBuf_bk = 0xb ...
    errcode = 0x2,index = 55,data = 0x9d,gUniflashFileBuf = 0x9d,gUniflashFileBuf_bk = 0x30 ...
    errcode = 0x2,index = 56,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x9 ...
    errcode = 0x2,index = 57,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x6 ...
    errcode = 0x2,index = 58,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x3 ...
    errcode = 0x2,index = 59,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x55 ...
    errcode = 0x2,index = 60,data = 0x70,gUniflashFileBuf = 0x70,gUniflashFileBuf_bk = 0x4 ...
    errcode = 0x2,index = 61,data = 0x18,gUniflashFileBuf = 0x18,gUniflashFileBuf_bk = 0x6 ...
    errcode = 0x2,index = 62,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x13 ...
    errcode = 0x2,index = 63,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x2 ...
    errcode = 0x2,index = 64,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x55 ...
    errcode = 0x2,index = 65,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x53 ...
    errcode = 0x2,index = 66,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x31 ...
    errcode = 0x2,index = 67,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0xb ...
    errcode = 0x2,index = 68,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x30 ...
    errcode = 0x2,index = 69,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x9 ...
    errcode = 0x2,index = 70,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x6 ...
    errcode = 0x2,index = 71,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x3 ...
    errcode = 0x2,index = 72,data = 0x24,gUniflashFileBuf = 0x24,gUniflashFileBuf_bk = 0x55 ...
    errcode = 0x2,index = 73,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x4 ...
    errcode = 0x2,index = 74,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x8 ...
    errcode = 0x2,index = 75,data = 0x2f,gUniflashFileBuf = 0x2f,gUniflashFileBuf_bk = 0xc ...
    errcode = 0x2,index = 76,data = 0x24,gUniflashFileBuf = 0x24,gUniflashFileBuf_bk = 0x2 ...
    errcode = 0x2,index = 77,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x53 ...
    errcode = 0x2,index = 78,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x43 ...
    errcode = 0x2,index = 79,data = 0x2f,gUniflashFileBuf = 0x2f,gUniflashFileBuf_bk = 0x31 ...
    errcode = 0x2,index = 80,data = 0x24,gUniflashFileBuf = 0x24,gUniflashFileBuf_bk = 0x11 ...
    errcode = 0x2,index = 81,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x30 ...
    errcode = 0x2,index = 82,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0xf ...
    errcode = 0x2,index = 83,data = 0x2f,gUniflashFileBuf = 0x2f,gUniflashFileBuf_bk = 0x6 ...
    errcode = 0x2,index = 84,data = 0x24,gUniflashFileBuf = 0x24,gUniflashFileBuf_bk = 0x3 ...
    errcode = 0x2,index = 85,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x55 ...
    errcode = 0x2,index = 86,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x4 ...
    errcode = 0x2,index = 87,data = 0x2f,gUniflashFileBuf = 0x2f,gUniflashFileBuf_bk = 0x7 ...
    errcode = 0x0,index = 88,data = 0xc,gUniflashFileBuf = 0xc,gUniflashFileBuf_bk = 0xc ...
    errcode = 0x2,index = 89,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x8 ...
    errcode = 0x2,index = 90,data = 0x40,gUniflashFileBuf = 0x40,gUniflashFileBuf_bk = 0x4e ...
    errcode = 0x2,index = 91,data = 0x2e,gUniflashFileBuf = 0x2e,gUniflashFileBuf_bk = 0x65 ...
    errcode = 0x2,index = 92,data = 0xc,gUniflashFileBuf = 0xc,gUniflashFileBuf_bk = 0x77 ...
    errcode = 0x2,index = 93,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x20 ...
    errcode = 0x2,index = 94,data = 0x40,gUniflashFileBuf = 0x40,gUniflashFileBuf_bk = 0x59 ...
    errcode = 0x2,index = 95,data = 0x2e,gUniflashFileBuf = 0x2e,gUniflashFileBuf_bk = 0x6f ...
    errcode = 0x2,index = 96,data = 0x14,gUniflashFileBuf = 0x14,gUniflashFileBuf_bk = 0x72 ...
    errcode = 0x2,index = 97,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x6b ...
    errcode = 0x2,index = 98,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x31 ...
    errcode = 0x2,index = 99,data = 0x2f,gUniflashFileBuf = 0x2f,gUniflashFileBuf_bk = 0x21 ...
    [sbl uart uniflash stage1] verify fail : raw data checksum is 15...
    ERROR: Bootloader_verifyMulticoreImage:712: Failed to authenticate Image
    [sbl uart uniflash stage1] App_loadSelfcoreImage function : Bootloader_parseMultiCoreAppImage return status -1...
    [sbl uart uniflash stage1] Loading the sbl_uart_uniflash_stage2 image to WKP core...
    [sbl uart uniflash stage1] Loading the sbl_uart_uniflash_stage2 image Done and Response message for XMODEM...
    

    Why happen this case?? and in the SYSFW has been modifiey the DDR data ?

  • HI 

    I check whole DDR from 0x8400000 to 0x8480000,the debug code following 

     {
        uint8_t errststus = 0x00;
        uint8_t sum = 0x00;
        uint8_t *data = (uint8_t*)certLoadAddr;
        for(int32_t i = 0; i < 0x800000; i++)
        // for(int32_t i = 0; i < 0x19d8; i++)
        {
            sum = sum + *data;
            if((*data != gUniflashFileBuf[i]) && (*data != gUniflashFileBuf_bk[i]))
            {
                errststus = 0x03;
            }
            else if(*data != gUniflashFileBuf[i]) 
            {
                errststus = 0x01;
            }
            else if(*data != gUniflashFileBuf_bk[i]) 
            {
                errststus = 0x02;
            }
            else
            {
                errststus = 0x00;
            }
            if(errststus!= 0x00)
            {
                DebugP_log("errcode = 0x%x,index = %d,data = 0x%x,gUniflashFileBuf = 0x%x,gUniflashFileBuf_bk = 0x%x ...\r\n",errststus, i, *data, gUniflashFileBuf[i], gUniflashFileBuf_bk[i]);
            }
            
    
            data++;
    
        }
        
        DebugP_log("[sbl uart uniflash stage1] verify fail : raw data checksum is %d...\r\n",sum);
    }

    and the debug log following 

    [sbl uart uniflash stage1] ddr init status :  v1:0x0...
    [DM:SCICLIENT] Request Sciclient_service for msgType = 0x2...
    [DM:SCICLIENT] Request Sciclient_serviceSecureProxy for msgType = 0x2...
    [DM:SCICLIENT] Sciclient_sendMessage,thread = 23
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 2
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 103022594
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 2
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 774975033
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 1982672184
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 808335664
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 942681649
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 1867196448
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 1260416111
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 1634492783
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 41
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 16973833
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 2049
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 0
    
    DMSC Firmware Version 9.1.8--v09.01.08 (Kool Koala)
    DMSC Firmware revision 0x9
    DMSC ABI revision 3.1
    
    [sbl uart uniflash stage1] recv the sbl_uart_uniflash stage2 image...
    [sbl uart uniflash stage1] fileSize is 129024...
    [sbl uart uniflash stage1] recv the sbl_uart_uniflash stage2 image Done!!!
    [Bootloader:Bootloader_parseMultiCoreAppImage] HS Device : VerifyMulticoreImage
    [Bootloader:Bootloader_verifyMulticoreImage] The bootMedia is 0xb0070001
    [Bootloader:Bootloader_verifyMulticoreImage] certLen = 0x676
    errcode = 0x2,index = 32825,data = 0x46,gUniflashFileBuf = 0x46,gUniflashFileBuf_bk = 0x42 ...
    errcode = 0x2,index = 32889,data = 0xf8,gUniflashFileBuf = 0xf8,gUniflashFileBuf_bk = 0xfc ...
    errcode = 0x2,index = 33017,data = 0x79,gUniflashFileBuf = 0x79,gUniflashFileBuf_bk = 0x7d ...
    errcode = 0x2,index = 33145,data = 0x46,gUniflashFileBuf = 0x46,gUniflashFileBuf_bk = 0x42 ...
    errcode = 0x2,index = 33153,data = 0xf8,gUniflashFileBuf = 0xf8,gUniflashFileBuf_bk = 0xfc ...
    errcode = 0x2,index = 33157,data = 0x46,gUniflashFileBuf = 0x46,gUniflashFileBuf_bk = 0x42 ...
    errcode = 0x2,index = 33217,data = 0xf0,gUniflashFileBuf = 0xf0,gUniflashFileBuf_bk = 0x0 ...
    errcode = 0x2,index = 33221,data = 0xf8,gUniflashFileBuf = 0xf8,gUniflashFileBuf_bk = 0xfc ...
    errcode = 0x2,index = 33277,data = 0xfa,gUniflashFileBuf = 0xfa,gUniflashFileBuf_bk = 0xfe ...
    errcode = 0x2,index = 33281,data = 0xb9,gUniflashFileBuf = 0xb9,gUniflashFileBuf_bk = 0xbd ...
    errcode = 0x2,index = 33285,data = 0x10,gUniflashFileBuf = 0x10,gUniflashFileBuf_bk = 0x14 ...
    errcode = 0x2,index = 33341,data = 0xfa,gUniflashFileBuf = 0xfa,gUniflashFileBuf_bk = 0xfe ...
    errcode = 0x2,index = 33345,data = 0xb9,gUniflashFileBuf = 0xb9,gUniflashFileBuf_bk = 0xbd ...
    errcode = 0x2,index = 33401,data = 0xf,gUniflashFileBuf = 0xf,gUniflashFileBuf_bk = 0xb ...
    errcode = 0x2,index = 33405,data = 0x2c,gUniflashFileBuf = 0x2c,gUniflashFileBuf_bk = 0x28 ...
    errcode = 0x2,index = 33529,data = 0x46,gUniflashFileBuf = 0x46,gUniflashFileBuf_bk = 0x42 ...
    errcode = 0x2,index = 33605,data = 0x2f,gUniflashFileBuf = 0x2f,gUniflashFileBuf_bk = 0x2b ...
    errcode = 0x2,index = 33669,data = 0xeb,gUniflashFileBuf = 0xeb,gUniflashFileBuf_bk = 0xef ...
    errcode = 0x2,index = 33721,data = 0x46,gUniflashFileBuf = 0x46,gUniflashFileBuf_bk = 0x42 ...
    errcode = 0x2,index = 33729,data = 0xbf,gUniflashFileBuf = 0xbf,gUniflashFileBuf_bk = 0xbb ...
    errcode = 0x2,index = 33789,data = 0xf8,gUniflashFileBuf = 0xf8,gUniflashFileBuf_bk = 0xfc ...
    errcode = 0x2,index = 33849,data = 0x46,gUniflashFileBuf = 0x46,gUniflashFileBuf_bk = 0x42 ...
    errcode = 0x2,index = 33853,data = 0xfa,gUniflashFileBuf = 0xfa,gUniflashFileBuf_bk = 0xfe ...
    errcode = 0x2,index = 33857,data = 0xf8,gUniflashFileBuf = 0xf8,gUniflashFileBuf_bk = 0xfc ...
    errcode = 0x2,index = 33861,data = 0x24,gUniflashFileBuf = 0x24,gUniflashFileBuf_bk = 0x20 ...
    errcode = 0x2,index = 33977,data = 0xf8,gUniflashFileBuf = 0xf8,gUniflashFileBuf_bk = 0xfc ...
    errcode = 0x2,index = 33989,data = 0xd0,gUniflashFileBuf = 0xd0,gUniflashFileBuf_bk = 0xd4 ...
    errcode = 0x2,index = 34045,data = 0xf8,gUniflashFileBuf = 0xf8,gUniflashFileBuf_bk = 0xfc ...
    errcode = 0x2,index = 34053,data = 0xe7,gUniflashFileBuf = 0xe7,gUniflashFileBuf_bk = 0xe3 ...
    errcode = 0x2,index = 34109,data = 0xf8,gUniflashFileBuf = 0xf8,gUniflashFileBuf_bk = 0xfc ...
    errcode = 0x2,index = 34113,data = 0x22,gUniflashFileBuf = 0x22,gUniflashFileBuf_bk = 0x26 ...
    errcode = 0x2,index = 34117,data = 0xf0,gUniflashFileBuf = 0xf0,gUniflashFileBuf_bk = 0x0 ...
    errcode = 0x2,index = 34177,data = 0x1b,gUniflashFileBuf = 0x1b,gUniflashFileBuf_bk = 0x1f ...
    errcode = 0x2,index = 34181,data = 0xf8,gUniflashFileBuf = 0xf8,gUniflashFileBuf_bk = 0xfc ...
    errcode = 0x2,index = 34233,data = 0xf3,gUniflashFileBuf = 0xf3,gUniflashFileBuf_bk = 0xf7 ...
    errcode = 0x2,index = 34365,data = 0x3b,gUniflashFileBuf = 0x3b,gUniflashFileBuf_bk = 0x3f ...
    errcode = 0x2,index = 34369,data = 0x2b,gUniflashFileBuf = 0x2b,gUniflashFileBuf_bk = 0x2f ...
    errcode = 0x2,index = 34425,data = 0x6b,gUniflashFileBuf = 0x6b,gUniflashFileBuf_bk = 0x6f ...
    errcode = 0x2,index = 34429,data = 0x6b,gUniflashFileBuf = 0x6b,gUniflashFileBuf_bk = 0x6f ...
    errcode = 0x2,index = 34617,data = 0xf1,gUniflashFileBuf = 0xf1,gUniflashFileBuf_bk = 0xf5 ...
    errcode = 0x2,index = 34681,data = 0xf,gUniflashFileBuf = 0xf,gUniflashFileBuf_bk = 0xb ...
    errcode = 0x2,index = 34693,data = 0x46,gUniflashFileBuf = 0x46,gUniflashFileBuf_bk = 0x42 ...
    errcode = 0x2,index = 34745,data = 0x46,gUniflashFileBuf = 0x46,gUniflashFileBuf_bk = 0x42 ...
    errcode = 0x2,index = 34753,data = 0x47,gUniflashFileBuf = 0x47,gUniflashFileBuf_bk = 0x43 ...
    errcode = 0x2,index = 34757,data = 0xf1,gUniflashFileBuf = 0xf1,gUniflashFileBuf_bk = 0xf5 ...
    errcode = 0x2,index = 34945,data = 0x41,gUniflashFileBuf = 0x41,gUniflashFileBuf_bk = 0x45 ...
    errcode = 0x2,index = 35009,data = 0x51,gUniflashFileBuf = 0x51,gUniflashFileBuf_bk = 0x55 ...
    errcode = 0x2,index = 35065,data = 0x65,gUniflashFileBuf = 0x65,gUniflashFileBuf_bk = 0x61 ...
    errcode = 0x2,index = 35069,data = 0x36,gUniflashFileBuf = 0x36,gUniflashFileBuf_bk = 0x32 ...
    errcode = 0x2,index = 35073,data = 0x70,gUniflashFileBuf = 0x70,gUniflashFileBuf_bk = 0x74 ...
    errcode = 0x2,index = 35205,data = 0xf0,gUniflashFileBuf = 0xf0,gUniflashFileBuf_bk = 0x0 ...
    errcode = 0x2,index = 35269,data = 0x1,gUniflashFileBuf = 0x1,gUniflashFileBuf_bk = 0x5 ...
    errcode = 0x2,index = 35325,data = 0xfa,gUniflashFileBuf = 0xfa,gUniflashFileBuf_bk = 0xfe ...
    errcode = 0x2,index = 35329,data = 0xf4,gUniflashFileBuf = 0xf4,gUniflashFileBuf_bk = 0xf0 ...
    errcode = 0x2,index = 35333,data = 0xea,gUniflashFileBuf = 0xea,gUniflashFileBuf_bk = 0xee ...
    errcode = 0x2,index = 35385,data = 0xc,gUniflashFileBuf = 0xc,gUniflashFileBuf_bk = 0x8 ...
    errcode = 0x2,index = 35457,data = 0xf3,gUniflashFileBuf = 0xf3,gUniflashFileBuf_bk = 0xf7 ...
    errcode = 0x2,index = 35521,data = 0x11,gUniflashFileBuf = 0x11,gUniflashFileBuf_bk = 0x15 ...
    errcode = 0x2,index = 35653,data = 0xfb,gUniflashFileBuf = 0xfb,gUniflashFileBuf_bk = 0xff ...
    errcode = 0x2,index = 35709,data = 0x47,gUniflashFileBuf = 0x47,gUniflashFileBuf_bk = 0x43 ...
    errcode = 0x2,index = 35773,data = 0x46,gUniflashFileBuf = 0x46,gUniflashFileBuf_bk = 0x42 ...
    errcode = 0x2,index = 35777,data = 0x46,gUniflashFileBuf = 0x46,gUniflashFileBuf_bk = 0x42 ...
    errcode = 0x2,index = 35845,data = 0x68,gUniflashFileBuf = 0x68,gUniflashFileBuf_bk = 0x6c ...
    errcode = 0x2,index = 35897,data = 0xf3,gUniflashFileBuf = 0xf3,gUniflashFileBuf_bk = 0xf7 ...
    errcode = 0x2,index = 35969,data = 0x4c,gUniflashFileBuf = 0x4c,gUniflashFileBuf_bk = 0x48 ...
    errcode = 0x2,index = 36029,data = 0x46,gUniflashFileBuf = 0x46,gUniflashFileBuf_bk = 0x42 ...
    errcode = 0x2,index = 36089,data = 0xf9,gUniflashFileBuf = 0xf9,gUniflashFileBuf_bk = 0xfd ...
    errcode = 0x2,index = 36093,data = 0xf,gUniflashFileBuf = 0xf,gUniflashFileBuf_bk = 0xb ...
    errcode = 0x2,index = 36097,data = 0x46,gUniflashFileBuf = 0x46,gUniflashFileBuf_bk = 0x42 ...
    errcode = 0x2,index = 36225,data = 0x21,gUniflashFileBuf = 0x21,gUniflashFileBuf_bk = 0x25 ...
    errcode = 0x2,index = 36281,data = 0xf8,gUniflashFileBuf = 0xf8,gUniflashFileBuf_bk = 0xfc ...
    errcode = 0x2,index = 36285,data = 0xe9,gUniflashFileBuf = 0xe9,gUniflashFileBuf_bk = 0xed ...
    errcode = 0x2,index = 36293,data = 0x46,gUniflashFileBuf = 0x46,gUniflashFileBuf_bk = 0x42 ...
    errcode = 0x2,index = 36345,data = 0xf3,gUniflashFileBuf = 0xf3,gUniflashFileBuf_bk = 0xf7 ...
    errcode = 0x2,index = 36349,data = 0x46,gUniflashFileBuf = 0x46,gUniflashFileBuf_bk = 0x42 ...
    errcode = 0x2,index = 36357,data = 0x46,gUniflashFileBuf = 0x46,gUniflashFileBuf_bk = 0x42 ...
    errcode = 0x2,index = 36409,data = 0xf8,gUniflashFileBuf = 0xf8,gUniflashFileBuf_bk = 0xfc ...
    errcode = 0x2,index = 36413,data = 0xf8,gUniflashFileBuf = 0xf8,gUniflashFileBuf_bk = 0xfc ...
    errcode = 0x2,index = 36473,data = 0x46,gUniflashFileBuf = 0x46,gUniflashFileBuf_bk = 0x42 ...
    errcode = 0x2,index = 36477,data = 0x27,gUniflashFileBuf = 0x27,gUniflashFileBuf_bk = 0x23 ...
    errcode = 0x2,index = 36481,data = 0xf1,gUniflashFileBuf = 0xf1,gUniflashFileBuf_bk = 0xf5 ...
    errcode = 0x2,index = 36485,data = 0xbf,gUniflashFileBuf = 0xbf,gUniflashFileBuf_bk = 0xbb ...
    errcode = 0x2,index = 36545,data = 0xa8,gUniflashFileBuf = 0xa8,gUniflashFileBuf_bk = 0xac ...
    errcode = 0x2,index = 36549,data = 0xf0,gUniflashFileBuf = 0xf0,gUniflashFileBuf_bk = 0x80 ...
    errcode = 0x2,index = 36601,data = 0xf2,gUniflashFileBuf = 0xf2,gUniflashFileBuf_bk = 0xf6 ...
    errcode = 0x2,index = 36609,data = 0xfa,gUniflashFileBuf = 0xfa,gUniflashFileBuf_bk = 0xfe ...
    errcode = 0x2,index = 36613,data = 0x94,gUniflashFileBuf = 0x94,gUniflashFileBuf_bk = 0x90 ...
    errcode = 0x2,index = 36669,data = 0xfb,gUniflashFileBuf = 0xfb,gUniflashFileBuf_bk = 0xff ...
    errcode = 0x2,index = 36729,data = 0xea,gUniflashFileBuf = 0xea,gUniflashFileBuf_bk = 0xee ...
    errcode = 0x2,index = 36733,data = 0xfb,gUniflashFileBuf = 0xfb,gUniflashFileBuf_bk = 0xff ...
    errcode = 0x2,index = 36737,data = 0x46,gUniflashFileBuf = 0x46,gUniflashFileBuf_bk = 0x42 ...
    errcode = 0x2,index = 36801,data = 0xd9,gUniflashFileBuf = 0xd9,gUniflashFileBuf_bk = 0xdd ...
    errcode = 0x2,index = 36921,data = 0xf8,gUniflashFileBuf = 0xf8,gUniflashFileBuf_bk = 0xfc ...
    errcode = 0x2,index = 36929,data = 0xf1,gUniflashFileBuf = 0xf1,gUniflashFileBuf_bk = 0xf5 ...
    errcode = 0x2,index = 36985,data = 0x27,gUniflashFileBuf = 0x27,gUniflashFileBuf_bk = 0x23 ...
    errcode = 0x2,index = 36989,data = 0xf8,gUniflashFileBuf = 0xf8,gUniflashFileBuf_bk = 0xfc ...
    errcode = 0x2,index = 36993,data = 0x42,gUniflashFileBuf = 0x42,gUniflashFileBuf_bk = 0x46 ...
    errcode = 0x2,index = 36997,data = 0x28,gUniflashFileBuf = 0x28,gUniflashFileBuf_bk = 0x2c ...
    errcode = 0x2,index = 37053,data = 0xd9,gUniflashFileBuf = 0xd9,gUniflashFileBuf_bk = 0xdd ...
    errcode = 0x2,index = 37057,data = 0x10,gUniflashFileBuf = 0x10,gUniflashFileBuf_bk = 0x14 ...
    errcode = 0x2,index = 37061,data = 0xf8,gUniflashFileBuf = 0xf8,gUniflashFileBuf_bk = 0xfc ...
    errcode = 0x2,index = 37113,data = 0xe9,gUniflashFileBuf = 0xe9,gUniflashFileBuf_bk = 0xed ...
    errcode = 0x2,index = 37121,data = 0xf0,gUniflashFileBuf = 0xf0,gUniflashFileBuf_bk = 0x40 ...
    errcode = 0x2,index = 37177,data = 0xfb,gUniflashFileBuf = 0xfb,gUniflashFileBuf_bk = 0xff ...
    errcode = 0x2,index = 37185,data = 0xd1,gUniflashFileBuf = 0xd1,gUniflashFileBuf_bk = 0xd5 ...
    errcode = 0x2,index = 37241,data = 0xf8,gUniflashFileBuf = 0xf8,gUniflashFileBuf_bk = 0xfc ...
    errcode = 0x2,index = 37249,data = 0x8f,gUniflashFileBuf = 0x8f,gUniflashFileBuf_bk = 0x8b ...
    errcode = 0x2,index = 37253,data = 0x10,gUniflashFileBuf = 0x10,gUniflashFileBuf_bk = 0x14 ...
    errcode = 0x2,index = 37313,data = 0x10,gUniflashFileBuf = 0x10,gUniflashFileBuf_bk = 0x14 ...
    errcode = 0x2,index = 37377,data = 0x66,gUniflashFileBuf = 0x66,gUniflashFileBuf_bk = 0x62 ...
    errcode = 0x2,index = 37497,data = 0xf8,gUniflashFileBuf = 0xf8,gUniflashFileBuf_bk = 0xfc ...
    errcode = 0x2,index = 37501,data = 0x46,gUniflashFileBuf = 0x46,gUniflashFileBuf_bk = 0x42 ...
    errcode = 0x2,index = 37505,data = 0xff,gUniflashFileBuf = 0xff,gUniflashFileBuf_bk = 0xfb ...
    errcode = 0x2,index = 37569,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x4 ...
    errcode = 0x2,index = 37573,data = 0xf8,gUniflashFileBuf = 0xf8,gUniflashFileBuf_bk = 0xfc ...
    errcode = 0x2,index = 37625,data = 0x4,gUniflashFileBuf = 0x4,gUniflashFileBuf_bk = 0x0 ...
    errcode = 0x2,index = 37637,data = 0x60,gUniflashFileBuf = 0x60,gUniflashFileBuf_bk = 0x64 ...
    errcode = 0x2,index = 37689,data = 0xf8,gUniflashFileBuf = 0xf8,gUniflashFileBuf_bk = 0xfc ...
    errcode = 0x2,index = 37697,data = 0xf8,gUniflashFileBuf = 0xf8,gUniflashFileBuf_bk = 0xfc ...
    errcode = 0x2,index = 37761,data = 0x6e,gUniflashFileBuf = 0x6e,gUniflashFileBuf_bk = 0x6a ...
    errcode = 0x2,index = 37889,data = 0x68,gUniflashFileBuf = 0x68,gUniflashFileBuf_bk = 0x6c ...
    errcode = 0x2,index = 37945,data = 0xf2,gUniflashFileBuf = 0xf2,gUniflashFileBuf_bk = 0xf6 ...
    errcode = 0x2,index = 37949,data = 0xf1,gUniflashFileBuf = 0xf1,gUniflashFileBuf_bk = 0xf5 ...
    errcode = 0x2,index = 38009,data = 0xf9,gUniflashFileBuf = 0xf9,gUniflashFileBuf_bk = 0xfd ...
    errcode = 0x2,index = 38209,data = 0xeb,gUniflashFileBuf = 0xeb,gUniflashFileBuf_bk = 0xef ...
    errcode = 0x2,index = 38265,data = 0x46,gUniflashFileBuf = 0x46,gUniflashFileBuf_bk = 0x42 ...
    errcode = 0x2,index = 38269,data = 0xf8,gUniflashFileBuf = 0xf8,gUniflashFileBuf_bk = 0xfc ...
    errcode = 0x2,index = 38461,data = 0xe9,gUniflashFileBuf = 0xe9,gUniflashFileBuf_bk = 0xed ...
    errcode = 0x2,index = 38529,data = 0x68,gUniflashFileBuf = 0x68,gUniflashFileBuf_bk = 0x6c ...
    errcode = 0x2,index = 38533,data = 0xfb,gUniflashFileBuf = 0xfb,gUniflashFileBuf_bk = 0xff ...
    errcode = 0x2,index = 38589,data = 0x14,gUniflashFileBuf = 0x14,gUniflashFileBuf_bk = 0x10 ...
    errcode = 0x2,index = 38597,data = 0x68,gUniflashFileBuf = 0x68,gUniflashFileBuf_bk = 0x6c ...
    errcode = 0x2,index = 38653,data = 0x46,gUniflashFileBuf = 0x46,gUniflashFileBuf_bk = 0x42 ...
    errcode = 0x2,index = 38661,data = 0x9b,gUniflashFileBuf = 0x9b,gUniflashFileBuf_bk = 0x9f ...
    errcode = 0x2,index = 38777,data = 0xf1,gUniflashFileBuf = 0xf1,gUniflashFileBuf_bk = 0xf5 ...
    errcode = 0x2,index = 38781,data = 0xe,gUniflashFileBuf = 0xe,gUniflashFileBuf_bk = 0xa ...
    errcode = 0x2,index = 38845,data = 0xfb,gUniflashFileBuf = 0xfb,gUniflashFileBuf_bk = 0xff ...
    errcode = 0x2,index = 38849,data = 0x42,gUniflashFileBuf = 0x42,gUniflashFileBuf_bk = 0x46 ...
    errcode = 0x2,index = 39165,data = 0x43,gUniflashFileBuf = 0x43,gUniflashFileBuf_bk = 0x47 ...
    errcode = 0x2,index = 39361,data = 0xfa,gUniflashFileBuf = 0xfa,gUniflashFileBuf_bk = 0xfe ...
    errcode = 0x2,index = 39365,data = 0x3,gUniflashFileBuf = 0x3,gUniflashFileBuf_bk = 0x7 ...
    errcode = 0x2,index = 40697,data = 0x42,gUniflashFileBuf = 0x42,gUniflashFileBuf_bk = 0x46 ...
    errcode = 0x2,index = 40953,data = 0x46,gUniflashFileBuf = 0x46,gUniflashFileBuf_bk = 0x42 ...
    errcode = 0x2,index = 41089,data = 0x46,gUniflashFileBuf = 0x46,gUniflashFileBuf_bk = 0x42 ...
    errcode = 0x2,index = 41149,data = 0x46,gUniflashFileBuf = 0x46,gUniflashFileBuf_bk = 0x42 ...
    errcode = 0x2,index = 41153,data = 0x47,gUniflashFileBuf = 0x47,gUniflashFileBuf_bk = 0x43 ...
    errcode = 0x2,index = 41157,data = 0x7,gUniflashFileBuf = 0x7,gUniflashFileBuf_bk = 0x3 ...
    errcode = 0x2,index = 49921,data = 0x21,gUniflashFileBuf = 0x21,gUniflashFileBuf_bk = 0x25 ...
    errcode = 0x2,index = 120133,data = 0x4f,gUniflashFileBuf = 0x4f,gUniflashFileBuf_bk = 0x4b ...
    errcode = 0x2,index = 785601,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x4 ...
    errcode = 0x2,index = 1015813,data = 0x6,gUniflashFileBuf = 0x6,gUniflashFileBuf_bk = 0x2 ...
    errcode = 0x2,index = 1082049,data = 0x4,gUniflashFileBuf = 0x4,gUniflashFileBuf_bk = 0x0 ...
    errcode = 0x2,index = 1082181,data = 0x4,gUniflashFileBuf = 0x4,gUniflashFileBuf_bk = 0x0 ...
    errcode = 0x2,index = 1082625,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x4 ...
    errcode = 0x2,index = 1083065,data = 0x5,gUniflashFileBuf = 0x5,gUniflashFileBuf_bk = 0x1 ...
    errcode = 0x2,index = 1083329,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x4 ...
    errcode = 0x2,index = 1083897,data = 0xc,gUniflashFileBuf = 0xc,gUniflashFileBuf_bk = 0x8 ...
    errcode = 0x2,index = 1084997,data = 0x14,gUniflashFileBuf = 0x14,gUniflashFileBuf_bk = 0x10 ...
    errcode = 0x2,index = 1085305,data = 0x4,gUniflashFileBuf = 0x4,gUniflashFileBuf_bk = 0x0 ...
    errcode = 0x2,index = 1605633,data = 0x24,gUniflashFileBuf = 0x24,gUniflashFileBuf_bk = 0x20 ...
    errcode = 0x2,index = 1825725,data = 0x4,gUniflashFileBuf = 0x4,gUniflashFileBuf_bk = 0x0 ...
    errcode = 0x2,index = 2719745,data = 0x44,gUniflashFileBuf = 0x44,gUniflashFileBuf_bk = 0x40 ...
    errcode = 0x2,index = 2850821,data = 0x2,gUniflashFileBuf = 0x2,gUniflashFileBuf_bk = 0x6 ...
    errcode = 0x2,index = 3516353,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x4 ...
    errcode = 0x2,index = 3517561,data = 0x4,gUniflashFileBuf = 0x4,gUniflashFileBuf_bk = 0x0 ...
    errcode = 0x2,index = 3517565,data = 0x4,gUniflashFileBuf = 0x4,gUniflashFileBuf_bk = 0x0 ...
    errcode = 0x2,index = 3517625,data = 0x4,gUniflashFileBuf = 0x4,gUniflashFileBuf_bk = 0x0 ...
    errcode = 0x2,index = 3518277,data = 0x4,gUniflashFileBuf = 0x4,gUniflashFileBuf_bk = 0x0 ...
    errcode = 0x2,index = 3519361,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x4 ...
    errcode = 0x2,index = 3520001,data = 0x84,gUniflashFileBuf = 0x84,gUniflashFileBuf_bk = 0x80 ...
    errcode = 0x2,index = 3520381,data = 0x5,gUniflashFileBuf = 0x5,gUniflashFileBuf_bk = 0x1 ...
    errcode = 0x2,index = 3521529,data = 0x4,gUniflashFileBuf = 0x4,gUniflashFileBuf_bk = 0x0 ...
    errcode = 0x2,index = 3522177,data = 0x4,gUniflashFileBuf = 0x4,gUniflashFileBuf_bk = 0x0 ...
    errcode = 0x2,index = 3523321,data = 0x4,gUniflashFileBuf = 0x4,gUniflashFileBuf_bk = 0x0 ...
    errcode = 0x2,index = 3523397,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x4 ...
    errcode = 0x2,index = 3523521,data = 0x4,gUniflashFileBuf = 0x4,gUniflashFileBuf_bk = 0x0 ...
    errcode = 0x2,index = 3524165,data = 0x4,gUniflashFileBuf = 0x4,gUniflashFileBuf_bk = 0x0 ...
    errcode = 0x2,index = 3768325,data = 0x4,gUniflashFileBuf = 0x4,gUniflashFileBuf_bk = 0x0 ...
    errcode = 0x2,index = 3964929,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x4 ...
    errcode = 0x2,index = 3965317,data = 0x4,gUniflashFileBuf = 0x4,gUniflashFileBuf_bk = 0x0 ...
    errcode = 0x2,index = 3966649,data = 0x4,gUniflashFileBuf = 0x4,gUniflashFileBuf_bk = 0x0 ...
    errcode = 0x2,index = 3967361,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x4 ...
    errcode = 0x2,index = 4947969,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x4 ...
    errcode = 0x2,index = 5210113,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x4 ...
    errcode = 0x2,index = 5472257,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x4 ...
    errcode = 0x2,index = 6914049,data = 0x4,gUniflashFileBuf = 0x4,gUniflashFileBuf_bk = 0x0 ...
    errcode = 0x2,index = 7766021,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x4 ...
    errcode = 0x2,index = 7897093,data = 0x0,gUniflashFileBuf = 0x0,gUniflashFileBuf_bk = 0x4 ...
    errcode = 0x2,index = 8385921,data = 0x4,gUniflashFileBuf = 0x4,gUniflashFileBuf_bk = 0x0 ...
    [sbl uart uniflash stage1] verify fail : raw data checksum is 235...
    [Bootloader:Bootloader_verifyMulticoreImage] certLoadAddr = 0x84000000
    [DM:SCICLIENT] Request Sciclient_service for msgType = 0xc120...
    [DM:SCICLIENT] Request Sciclient_serviceSecureProxy for msgType = 0xc120...
    [DM:SCICLIENT] Sciclient_sendMessage,thread = 23
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 0
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 35963168
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 0
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 774975033
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 1982672184
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 808335664
    [DM:SCICLIENT] Sciclient_readThread32,thread = 22,flag = 0
    [DM:SCICLIENT:Sciclient_procBootAuthAndStart] retVal = 0x0,respParam.flags = 0x0
    [DM:SCICLIENT:Sciclient_procBootAuthAndStart] Sciclient_procBootAuthAndStart request is NOACK
    [Bootloader:Bootloader_verifyMulticoreImage] authStatus = 0xffffffff
    ERROR: Bootloader_verifyMulticoreImage:750: Failed to authenticate Image
    [sbl uart uniflash stage1] App_loadSelfcoreImage function : Bootloader_parseMultiCoreAppImage return status -1...
    [sbl uart uniflash stage1] Loading the sbl_uart_uniflash_stage2 image to WKP core...
    [sbl uart uniflash stage1] Loading the sbl_uart_uniflash_stage2 image Done and Response message for XMODEM...

    It can indeed be proved that the DDR data has been tampered with, and the next step is to do a DDR stress test

  • Hi Tom,

    It can indeed be proved that the DDR data has been tampered with, and the next step is to do a DDR stress test

    If this is indeed the case, could you please create a separate thread for DDR stress testing so that it could be assigned to the right expert.

    Once the DDR stress testing is done, we can come back to this and see if the issue still persists.

    Regards,

    Prashant

  • Hi Prashant

    We use two board do DDR stress test 2 Dyas,it not have any error.

    The test log following

  • Hi Prashant,

    I let customer run the DDR stress test memtester for the entire weekends on both of the 2 problem boards (they only have 2 boards and both have this problem). And the result shows that DDR stress test does not fail.

    That is beyond our expectation, and we do not know what will be the next step to try.

    Thanks,

    Kevin

  • Hi Tom,

    Have you used the exact DDR configurations in the MCU+ SDK as used for DDR stress testing?

    I check whole DDR from 0x8400000 to 0x8480000,the debug code following 

    Also, how is the gUniflashFileBuf_bk array getting its values? Maybe if you could share the full bootloader.c source file that will help.

    Regards,

    Prashant

  • Hi Prashant 

    The main.c code following 

     /*
     *  Copyright (C) 2018-2021 Texas Instruments Incorporated
     *
     *  Redistribution and use in source and binary forms, with or without
     *  modification, are permitted provided that the following conditions
     *  are met:
     *
     *    Redistributions of source code must retain the above copyright
     *    notice, this list of conditions and the following disclaimer.
     *
     *    Redistributions in binary form must reproduce the above copyright
     *    notice, this list of conditions and the following disclaimer in the
     *    documentation and/or other materials provided with the
     *    distribution.
     *
     *    Neither the name of Texas Instruments Incorporated nor the names of
     *    its contributors may be used to endorse or promote products derived
     *    from this software without specific prior written permission.
     *
     *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
     *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
     *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
     *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     */
    
    /*
     * Auto generated file - DO NOT MODIFY
     */
    
    #include <stdlib.h>
    #include <string.h>
    #include "ti_drivers_config.h"
    #include "ti_drivers_open_close.h"
    #include "ti_board_open_close.h"
    #include <drivers/soc.h>
    #include <drivers/pinmux.h>
    #include <drivers/device_manager/sciclient.h>
    #include <drivers/bootloader.h>
    #include <drivers/bootloader/bootloader_xmodem.h>
    #include <drivers/bootloader/bootloader_uniflash.h>
    #include <kernel/dpl/DebugP.h>
    #include <drivers/device_manager/sciclient.h>
    #include <drivers/sciclient/include/tisci/am62ax/tisci_hosts.h>
    #include <drivers/sciclient/include/tisci/am62ax/tisci_boardcfg_constraints.h>
    #include <drivers/sciclient/include/tisci/am62ax/tisci_devices.h>
    
    #define BOOTLOADER_UNIFLASH_MAX_FILE_SIZE (0x800000) /* This has to match the size of DDR section in linker.cmd */
    uint8_t gUniflashFileBuf[BOOTLOADER_UNIFLASH_MAX_FILE_SIZE] __attribute__((aligned(128), section(".bss.filebuf")));
    uint8_t gUniflashFileBuf_bk[BOOTLOADER_UNIFLASH_MAX_FILE_SIZE] __attribute__((aligned(128), section(".bss.filebuf")));
    
    #define BOOTLOADER_UNIFLASH_VERIFY_BUF_MAX_SIZE (32*1024)
    uint8_t gUniflashVerifyBuf[BOOTLOADER_UNIFLASH_VERIFY_BUF_MAX_SIZE] __attribute__((aligned(128), section(".bss")));
    
    extern const struct tisci_boardcfg gBoardConfigLow_debug;
    
    /* call this API to stop the booting process and spin, do that you can connect
     * debugger, load symbols and then make the 'loop' variable as 0 to continue execution
     * with debugger connected.
     */
    void loop_forever()
    {
        volatile uint32_t loop = 1;
        while(loop)
            ;
    }
    
    int32_t App_loadSelfcoreImage(Bootloader_Handle bootHandle, Bootloader_BootImageInfo *bootImageInfo)
    {
    	int32_t status = SystemP_FAILURE;
    
        if(bootHandle != NULL)
        {
            status = Bootloader_parseMultiCoreAppImage(bootHandle, bootImageInfo);
            DebugP_log("[sbl uart uniflash stage1] App_loadSelfcoreImage function : Bootloader_parseMultiCoreAppImage return status %d...\r\n",status);
    
            if(status == SystemP_SUCCESS)
            {
                /* Set clocks for self cluster */
                bootImageInfo->cpuInfo[CSL_CORE_ID_R5FSS0_0].clkHz = Bootloader_socCpuGetClkDefault(CSL_CORE_ID_R5FSS0_0);
    
                /* Reset self cluster, both Core0 and Core 1. Init RAMs and load the app  */
                status = Bootloader_loadSelfCpu(bootHandle, &(bootImageInfo->cpuInfo[CSL_CORE_ID_R5FSS0_0]));
                //status = Bootloader_setSelfCpuEntryPoint(bootHandle, &(bootImageInfo->cpuInfo[CSL_CORE_ID_R5FSS0_0]));
            }
        }
    
        return status;
    }
    
    int main()
    {
        int32_t status = SystemP_SUCCESS;
        uint32_t done = 0U;
        uint32_t fileSize;
        Bootloader_UniflashResponseHeader respHeader;
        // Sciclient_BoardCfgPrms_t        sciclient_boardcfg;
    
        Bootloader_socWaitForFWBoot();
        status = Bootloader_socOpenFirewalls();
    
        DebugP_assertNoLog(status == SystemP_SUCCESS);
    
        System_init();
        Board_init();
        Drivers_open();
    
        status = Board_driversOpen();
        DebugP_assert(status == SystemP_SUCCESS);
    
        Sciclient_getVersionCheck(1);  
    
        while(!done)
        {
            /* Xmodem Receive */
            status = Bootloader_xmodemReceive(CONFIG_UART0, gUniflashFileBuf - sizeof(Bootloader_UniflashResponseHeader), BOOTLOADER_UNIFLASH_MAX_FILE_SIZE, &fileSize);
            DebugP_log("[sbl uart uniflash stage1] recv the sbl_uart_uniflash stage2 image...\r\n");
            /*
             * The `fileSize` wouldn't be the actual filesize, but (actual filesize + size of the header + padding bytes) added by xmodem.
             * This adds ~1KB. We can't know exactly how many bytes will be padded without checking the file header. But doing that
             * will unnecessary complicate the logic, so since the overhead is as small as ~1KB we could check for file size exceed
             * by checking * this `fileSize` returned by xmodem as well.
            */
            if(fileSize >= BOOTLOADER_UNIFLASH_MAX_FILE_SIZE)
            {
                /* Possible overflow, send error to host side */
                status = SystemP_FAILURE;
    
                respHeader.magicNumber = BOOTLOADER_UNIFLASH_RESP_HEADER_MAGIC_NUMBER;
                respHeader.statusCode = BOOTLOADER_UNIFLASH_STATUSCODE_FLASH_ERROR;
    
                Bootloader_xmodemTransmit(CONFIG_UART0, (uint8_t *)&respHeader, sizeof(Bootloader_UniflashResponseHeader));   
            }
    
            uint8_t sum = 0x00;
            for(int32_t i = 0; i < BOOTLOADER_UNIFLASH_MAX_FILE_SIZE; i++)
            // for(int32_t i = 0; i < 0x19d8; i++)
            {
                sum = sum + gUniflashFileBuf[i];
                gUniflashFileBuf_bk[i] = gUniflashFileBuf[i];
                // DebugP_log("index = %d,gUniflashFileBuf = 0x%x,gUniflashFileBuf_bk = 0x%x ...\r\n", i,gUniflashFileBuf[i], gUniflashFileBuf_bk[i]);
            }
            
            DebugP_log("[sbl uart uniflash stage1] fileSize is %d...\r\n",fileSize);
    
    
            if(status == SystemP_SUCCESS)
            {
                Bootloader_BootImageInfo bootImageInfo;
                Bootloader_Params bootParams;
                Bootloader_Handle bootHandle;
    
                Bootloader_Params_init(&bootParams);
                Bootloader_BootImageInfo_init(&bootImageInfo);
    
                bootParams.memArgsAppImageBaseAddr = (uintptr_t)(gUniflashFileBuf);
    
                bootHandle = Bootloader_open(CONFIG_BOOTLOADER_MEM, &bootParams);
    
                DebugP_log("[sbl uart uniflash stage1] recv the sbl_uart_uniflash stage2 image Done!!!\r\n");
    
                if((bootHandle != NULL) && (SystemP_SUCCESS == status))
                {
                    status = App_loadSelfcoreImage(bootHandle, &bootImageInfo);
                    DebugP_log("[sbl uart uniflash stage1] Loading the sbl_uart_uniflash_stage2 image to WKP core...\r\n");
    
                }
    
                // if(SystemP_SUCCESS == status)  //Has Issue in the A0 Sample
                {
                    DebugP_log("[sbl uart uniflash stage1] Loading the sbl_uart_uniflash_stage2 image Done and Response message for XMODEM...\r\n");
                    respHeader.magicNumber = BOOTLOADER_UNIFLASH_RESP_HEADER_MAGIC_NUMBER;
                    respHeader.statusCode = BOOTLOADER_UNIFLASH_STATUSCODE_SUCCESS;
                    status = Bootloader_xmodemTransmit(CONFIG_UART0, (uint8_t *)&respHeader, sizeof(Bootloader_UniflashResponseHeader));
                }
    
                if(status == SystemP_SUCCESS)
                {
                    Bootloader_close(bootHandle);
                    done = TRUE;
                }
    
            }
        }
    
        /* Call DPL deinit to close the tick timer and disable interrupts before jumping to Stage2*/
        Dpl_deinit();
    
        Bootloader_JumpSelfCpu();
    
        Drivers_close();
        Board_deinit();
        System_deinit();
    
        return 0;
    }
    

    The bootloade.c from SDK, which it not modified。

    In the MCU+SDK not run the DDR stress testing and is testing for A Core for Linux. 

    And in the MCU+SDK not modified any the DDR configuration which use the SDK default configuration

  • Hi Tom,

    And in the MCU+SDK not modified any the DDR configuration which use the SDK default configuration

    I assume you have custom DDR on your custom board. If so, you would need to have the correct DDR configurations for your DDR and integrate them in the MCU+ SDK.

    Did you integrate the correct DDR config in Linux before running stress tests which all passes?

  • Hi Prashant

    We use the DDR same of the EVM. So i think the SDK have DDR configuration and we not modified.

    BR

    Tom

  • Hi Tom,

    Please allow me a day or two to once again go over the whole responses and see if anything was missed.

    Thanks for your patience.

  • Hi Prashant

    Any clues, please

    BR

    Tom

  • Hi Tom,

    You are currently working with MCU+ SDK v9.1. Could you once try out the most recent released v9.2?

    https://www.ti.com/tool/download/MCU-PLUS-SDK-AM62A/09.02.00.38

    Regards,

    Prashant