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.
Tool/software:
This is a new thread based on "MCU-PLUS-SDK-AM243X: Flash Protocol Changes" at the request of TI.
The summary is that OSPI bootloader fails within parseMultiCoreAppImage() for protocols other than 4S-4D-4D when using QSPI NOR. By examining the FSS memory, it was discovered that multiple single bit errors were occurring in 4S-4S-4S mode at 50MHz. By reducing the OSPI reference divider, bit errors were eliminated. Disabling app authentication permits the application to load and operate properly.
However, when authentication is enabled parseMultiCoreAppImage still fails. TISClient logs were provided and then TI requested that I create a new thread.
Thanks,
Joe
Hi Prashant,
Here are the results for failing boot:
0x41110000 0x4F8A00FF 0x4F8B0001 0x4F80001A 0x4100001A 0x4F8A00FF 0x4F8B0001 0x4F80001A 0x4100001A 0x41070000 0x410800BF 0x4F8A00FF 0x4F8B0001 0x4F80001A 0x4100001A 0xC21205 0xC20024 0x43870001 0x43887FFF 0x4F8A00FF 0x4F8B0001 0x4F80001A 0x4380001A 0x4F01000C 0x4F0606A0 0x4F0A0024 0x4381000C 0x438A0000 0x43A00000 0x43A10000 0x438B0000 0x438C000C 0x43A20000 0x438D0000 0x43A30000 0x43A40000 0x438F0004 0x43900000 0x43910000 0x43920001 0x439F0001 0x43A50000 0x43A60001 0x4F8A00FF 0x4F8B0001 0x4F80001A 0x4380001 0xC20002 0xC20024 0x4003007 0x4400A08 0xC2C120 0xC20024 0x20C00003 0xC21110 0xC20024 0x41070000 0x41080009 0x4F8A00FF 0x4F8B0001 0x4F80001A 0x4100001A 0x4F01000C 0x4F06068D 0x4F0A0024 0x4101000C 0x410C0001 0x410D7007 0x410E5D00 0x410F0000 0x41100001 0x41110000 0x4F8A00FF 0x4F8B0001 0x4F80001A 0x4100001A 0x4F8A00FF 0x4F8B0001 0x4F80001A 0x4100001A 0x41070000 0x41080009 0x4F8A00FF 0x4F8B0001 0x4F80001A 0x4100001A
Here are the results for a working boot. I halted it shortly after parseMultiCoreImage.
&▒0xC20101 0xC20024 0x61800101 0x61C0008A 0xC20104 0xC20024 0x61800104 0x61C0008A 0xC20100 0xC20024 0x61800100 0x61C0008A 0x62000000 0xC2010D 0xC20024 0x6180010D 0x61C0008A 0x61257C83 0xC2010C 0xC20024 0x6180010C 0x61C0008A 0x61257C83 0x61257C83 0xC20101 0xC20024 0x61800101 0x61C0008A 0xC20104 0xC20024 0x61800104 0x61C0008A 0xC20100 0xC20024 0x61800100 0x61C0008A 0x62000000 0xC2010D 0xC20024 0x6180010D 0x61C0008A 0x612D7C83 0xC2010C 0xC20024 0x6180010C 0x61C0008A 0x612D7C83 0x612D7C83 0xC20101 0xC20024 0x61800101 0x61C0008A 0xC20104 0xC20024 0x61800104 0x61C0008A 0xC20100 0xC20024 0x61800100 0x61C0008A 0x62000000 0xC2010D 0xC20024 0x6180010D 0x61C0008A 0x61257C83 0xC2010C 0xC20024 0x6180010C 0x61C0008A 0x61257C83 0x61257C83 0xC20101 0xC20024 0x61800101 0x61C0008A 0xC20104 0xC20024 0x61800104 0x61C0008A 0xC20100 0xC20024 0x61800100 0x61C0008A 0x62000000 0xC2010D 0xC20024 0x6180010D 0x61C0008A 0x612D7C83 0xC2010C 0xC20024 0x6180010C 0x61C0008A 0x612D7C83 0x612D7C83 0xC20101 0xC20024 0x61800101 0x61C0008A 0xC20104 0xC20024 0x61800104 0x61C0008A 0xC20100 0xC20024 0x61800100 0x61C0008A 0x62000000 0xC2010D 0xC20024 0x6180010D 0x61C0008A 0x612D7C83 0xC2010C 0xC20024 0x6180010C 0x61C0008A 0x612D7C83 0x612D7C83 0xC20101 0xC20024 0x61800101 0x61C0008A 0xC20104 0xC20024 0x61800104 0x61C0008A 0xC20100 0xC20024 0x61800100 0x61C0008A 0x62000000 0xC2010D 0xC20024 0x6180010D 0x61C0008A 0x612D7C83 0xC2010C 0xC20024 0x6180010C 0x61C0008A 0x612D7C83 0x612D7C83 0xC20101 0xC20024 0x61800101 0x61C0008A 0xC20104 0xC20024 0x61800104 0x61C0008A 0xC20100 0xC20024 0x61800100 0x61C0008A 0x62000000 0xC2010D 0xC20024 0x6180010D 0x61C0008A 0x612D7C83 0xC2010C 0xC20024 0x6180010C 0x61C0008A 0x612D7C83 0x612D7C83 0xC21500 0xC20024 0x4F4E00FF 0x4F4A001A 0x4F4B0020 0x4F4606A0 0x4F4C000C 0x4F4D0006 0x4F4F0000 0x4F500000 0xC21500 0xC20024 0x4F4E00FF 0x4F4A001A 0x4F4B0022 0x4F4606A2 0x4F4C0006 0x4F4D0006 0x4F4F0000 0x4F500000 0xC21500 0xC20024 0x4F4E00FF 0x4F4A001A 0x4F4B0021 0x4F4606A1 0x4F4C0006 0x4F4D0006 0x4F4F0000 0x4F500000 0xC21500 0xC20024 0x4F4E00FF 0x4F4A001C 0x4F4B000D 0x4F46070D 0x4F4C0210 0x4F4D0100 0x4F4F0000 0x4F500000 0xC21500 0xC20024 0x4F4E00FF 0x4F4A001C 0x4F4B000A 0x4F46070A 0x4F4C002C 0x4F4D000E 0x4F4F0000 0x4F500000 0xC21110 0xC20024 0x41070000 0x410800BF 0x4F8A00FF 0x4F8B0001 0x4F80001A 0x4100001A 0x4F01000C 0x4F06068D 0x4F0A0024 0x4101000C 0x410C0001 0x410D7007 0x410E5D00 0x410F0000 0x41100001 0x41110000 0x4F8A00FF 0x4F8B0001 0x4F80001A 0x4100001A 0x4F8A00FF 0x4F8B0001 0x4F80001A 0x4100001A 0x41070000 0x410800BF 0x4F8A00FF 0x4F8B0001 0x4F80001A 0x4100001A 0xC21205 0xC20024 0x43870001 0x43887FFF 0x4F8A00FF 0x4F8B0001 0x4F80001A 0x4380001A 0x4F01000C 0x4F0606A0 0x4F0A0024 0x4381000C 0x438A0000 0x43A00000 0x43A10000 0x438B0000 0x438C000C 0x43A20000 0x438D0000 0x43A30000 0x43A40000 0x438F0004 0x43900000 0x43910000 0x43920001 0x439F0001 0x43A50000 0x43A60001 0x4F8A00FF 0x4F8B0001 0x4F80001A 0x4380001▒0xC20002 0xC20024 0x4003007 0x4400A08 0xC2C120 0xC20024 0xC2C000 0xC20024 0xC2010C 0xC20024 0x6180010C 0x61C0007B 0x612F7C86 0x612F7C86 0xC20200 0xC20024 0x61800200 0x61C0007B 0x62000000 0xC2C400 0xC20024 0xC2C400 0xC20024 0xC2C100 0xC20024 0xC2C101 0xC20024 0xC20200 0xC20024 0x61800200 0x61C0007B 0x62000002 0x62C0A000 0x62C0005E 0x64036000 0x64006004 0x62C0A001 0x6000007B 0x63836000 0x63806004 0xC2C400 0xC20024 0xC20200 0xC20024 0x61800200 0x61C0007C 0x62000002 0x62C0A002 0x64038000 0x64036001 0x62C0A003 0x6000007C 0x63838000 0x63836001
Thanks,
Joe
Hi Joe,
Thank you for sharing the logs!!
Following are the relevant parsed logs for the failure case:
0x00C2C120: BasePort: Unknown Action: 0x03 MSG:0x02C120
0x00C20024: BasePort: Unknown Action: 0x03 MSG:0x020024
0x20C00003: Security: SEC_BOOT(Points of failures during secure boot api call): 0x01 => Certificate length > ASN1P_IMAX, 0x02 => Issuefetching certificate, 0x3 => Issue with Hash operation, 0x4 => Hash comparison fails: 3
The cause of the failure is "Issue with Hash operation".
I will check with the SYSFW team once about the failure & get back to you.
Thanks!
Hi Joe,
Can you please integrate the following test function in your SBL, call it just after Sciclient_getVersionCheck, and share the boot logs?
void test_func() { /* appimage offset & max length */ uint32_t offset = 0x80000, len = 0x40000; uint32_t appimage_addr = 0xFFFFFFFF; uint32_t dst = 0x70180000; uint8_t copy_appimage_to_mem = 1; if(copy_appimage_to_mem) { Flash_Handle flashHandle = Flash_getHandle(CONFIG_FLASH0); Flash_read(flashHandle, offset, (uint8_t*)dst, len); CacheP_wb((void*)dst, len, CacheP_TYPE_ALL); appimage_addr = dst; } else { OSPI_Handle ospiHandle = OSPI_getHandle(CONFIG_OSPI0); OSPI_enableDacMode(ospiHandle); appimage_addr = 0x60000000 + offset; } int32_t status = Bootloader_socAuthImage(appimage_addr); if(status == SystemP_SUCCESS) { DebugP_log("Authentication passed\r\n"); } else { DebugP_log("Authentication failed\r\n"); } loop_forever(); }
The test is to see if the authentication passes in case the appimage is first read into RAM & then authenticated.
Thanks!
Hi Prashant,
I ran the test with SysConfig in a known good configuration of 4s4d4d at 20MHz. I ran it with both copy_appimage_to_mem equal to 1 and 0. As you can see, it fails when equal to one and passes when using enableDacMode instead.
&▒0xC20101 0xC20024 0x61800101 0x61C0008A 0xC20104 0xC20024 0x61800104 0x61C0008A 0xC20100 0xC20024 0x61800100 0x61C0008A 0x62000000 0xC2010D 0xC20024 0x6180010D 0x61C0008A 0x61257C83 0xC2010C 0xC20024 0x6180010C 0x61C0008A 0x61257C83 0x61257C83 0xC20101 0xC20024 0x61800101 0x61C0008A 0xC20104 0xC20024 0x61800104 0x61C0008A 0xC20100 0xC20024 0x61800100 0x61C0008A 0x62000000 0xC2010D 0xC20024 0x6180010D 0x61C0008A 0x612D7C83 0xC2010C 0xC20024 0x6180010C 0x61C0008A 0x612D7C83 0x612D7C83 0xC20101 0xC20024 0x61800101 0x61C0008A 0xC20104 0xC20024 0x61800104 0x61C0008A 0xC20100 0xC20024 0x61800100 0x61C0008A 0x62000000 0xC2010D 0xC20024 0x6180010D 0x61C0008A 0x61257C83 0xC2010C 0xC20024 0x6180010C 0x61C0008A 0x61257C83 0x61257C83 0xC20101 0xC20024 0x61800101 0x61C0008A 0xC20104 0xC20024 0x61800104 0x61C0008A 0xC20100 0xC20024 0x61800100 0x61C0008A 0x62000000 0xC2010D 0xC20024 0x6180010D 0x61C0008A 0x612D7C83 0xC2010C 0xC20024 0x6180010C 0x61C0008A 0x612D7C83 0x612D7C83 0xC20101 0xC20024 0x61800101 0x61C0008A 0xC20104 0xC20024 0x61800104 0x61C0008A 0xC20100 0xC20024 0x61800100 0x61C0008A 0x62000000 0xC2010D 0xC20024 0x6180010D 0x61C0008A 0x612D7C83 0xC2010C 0xC20024 0x6180010C 0x61C0008A 0x612D7C83 0x612D7C83 0xC20101 0xC20024 0x61800101 0x61C0008A 0xC20104 0xC20024 0x61800104 0x61C0008A 0xC20100 0xC20024 0x61800100 0x61C0008A 0x62000000 0xC2010D 0xC20024 0x6180010D 0x61C0008A 0x612D7C83 0xC2010C 0xC20024 0x6180010C 0x61C0008A 0x612D7C83 0x612D7C83 0xC20101 0xC20024 0x61800101 0x61C0008A 0xC20104 0xC20024 0x61800104 0x61C0008A 0xC20100 0xC20024 0x61800100 0x61C0008A 0x62000000 0xC2010D 0xC20024 0x6180010D 0x61C0008A 0x612D7C83 0xC2010C 0xC20024 0x6180010C 0x61C0008A 0x612D7C83 0x612D7C83 0xC21500 0xC20024 0x4F4E00FF 0x4F4A001A 0x4F4B0020 0x4F4606A0 0x4F4C000C 0x4F4D0006 0x4F4F0000 0x4F500000 0xC21500 0xC20024 0x4F4E00FF 0x4F4A001A 0x4F4B0022 0x4F4606A2 0x4F4C0006 0x4F4D0006 0x4F4F0000 0x4F500000 0xC21500 0xC20024 0x4F4E00FF 0x4F4A001A 0x4F4B0021 0x4F4606A1 0x4F4C0006 0x4F4D0006 0x4F4F0000 0x4F500000 0xC21500 0xC20024 0x4F4E00FF 0x4F4A001C 0x4F4B000D 0x4F46070D 0x4F4C0210 0x4F4D0100 0x4F4F0000 0x4F500000 0xC21500 0xC20024 0x4F4E00FF 0x4F4A001C 0x4F4B000A 0x4F46070A 0x4F4C002C 0x4F4D000E 0x4F4F0000 0x4F500000 0xC21110 0xC20024 0x41070000 0x410800BF 0x4F8A00FF 0x4F8B0001 0x4F80001A 0x4100001A 0x4F01000C 0x4F06068D 0x4F0A0024 0x4101000C 0x410C0001 0x410D7007 0x410E5D00 0x410F0000 0x41100001 0x41110000 0x4F8A00FF 0x4F8B0001 0x4F80001A 0x4100001A 0x4F8A00FF 0x4F8B0001 0x4F80001A 0x4100001A 0x41070000 0x410800BF 0x4F8A00FF 0x4F8B0001 0x4F80001A 0x4100001A 0xC21205 0xC20024 0x43870001 0x43887FFF 0x4F8A00FF 0x4F8B0001 0x4F80001A 0x4380001A 0x4F01000C 0x4F0606A0 0x4F0A0024 0x4381000C 0x438A0000 0x43A00000 0x43A10000 0x438B0000 0x438C000C 0x43A20000 0x438D0000 0x43A30000 0x43A40000 0x438F0004 0x43900000 0x43910000 0x43920001 0x439F0001 0x43A50000 0x43A60001 0x4F8A00FF 0x4F8B0001 0x4F80001A 0x4380001 0xC20002 0xC20024 0x4003007 0x4400A08 0xC2C120 0xC20024 FWL Bit 0x0 Exception addr 0x45B08000 FWL Exception 0x1001800 0x20000 0x701E0000 0x0 0x8212D4 0x40 0x20C00003
0xC20024 0x43870001 0x43887FFF 0x4F8A00FF 0x4F8B0001 0x4F80001A 0x4380001A 0x4F01000C 0x4F0606A0 0x4F0A0024 0x4381000C 0x438A0000 0x43A00000 0x43A10000 0x438B0000 0x438C000C 0x43A20000 0x438D0000 0x43A30000 0x43A40000 0x438F0004 0x43900000 0x43910000 0x43920001 0x439F0001 0x43A50000 0x43A60001 0x4F8A00FF 0x4F8B0001 0x4F80001A 0x4380001▒0xC20002 0xC20024 0x4003007 0x4400A08 0xC2C120 0xC20024 FWL Bit 0x0 Exception addr 0x45B08000 FWL Exception 0x1001800 0x20000 0x701E0000 0x0 0x8212D4 0x40 0x20C00003 &▒0xC20101 0xC20024 0x61800101 0x61C0008A 0xC20104 0xC20024 0x61800104 0x61C0008A 0xC20100 0xC20024 0x61800100 0x61C0008A 0x62000000 0xC2010D 0xC20024 0x6180010D 0x61C0008A 0x61257C83 0xC2010C 0xC20024 0x6180010C 0x61C0008A 0x61257C83 0x61257C83 0xC20101 0xC20024 0x61800101 0x61C0008A 0xC20104 0xC20024 0x61800104 0x61C0008A 0xC20100 0xC20024 0x61800100 0x61C0008A 0x62000000 0xC2010D 0xC20024 0x6180010D 0x61C0008A 0x612D7C83 0xC2010C 0xC20024 0x6180010C 0x61C0008A 0x612D7C83 0x612D7C83 0xC20101 0xC20024 0x61800101 0x61C0008A 0xC20104 0xC20024 0x61800104 0x61C0008A 0xC20100 0xC20024 0x61800100 0x61C0008A 0x62000000 0xC2010D 0xC20024 0x6180010D 0x61C0008A 0x61257C83 0xC2010C 0xC20024 0x6180010C 0x61C0008A 0x61257C83 0x61257C83 0xC20101 0xC20024 0x61800101 0x61C0008A 0xC20104 0xC20024 0x61800104 0x61C0008A 0xC20100 0xC20024 0x61800100 0x61C0008A 0x62000000 0xC2010D 0xC20024 0x6180010D 0x61C0008A 0x612D7C83 0xC2010C 0xC20024 0x6180010C 0x61C0008A 0x612D7C83 0x612D7C83 0xC20101 0xC20024 0x61800101 0x61C0008A 0xC20104 0xC20024 0x61800104 0x61C0008A 0xC20100 0xC20024 0x61800100 0x61C0008A 0x62000000 0xC2010D 0xC20024 0x6180010D 0x61C0008A 0x612D7C83 0xC2010C 0xC20024 0x6180010C 0x61C0008A 0x612D7C83 0x612D7C83 0xC20101 0xC20024 0x61800101 0x61C0008A 0xC20104 0xC20024 0x61800104 0x61C0008A 0xC20100 0xC20024 0x61800100 0x61C0008A 0x62000000 0xC2010D 0xC20024 0x6180010D 0x61C0008A 0x612D7C83 0xC2010C 0xC20024 0x6180010C 0x61C0008A 0x612D7C83 0x612D7C83 0xC20101 0xC20024 0x61800101 0x61C0008A 0xC20104 0xC20024 0x61800104 0x61C0008A 0xC20100 0xC20024 0x61800100 0x61C0008A 0x62000000 0xC2010D 0xC20024 0x6180010D 0x61C0008A 0x612D7C83 0xC2010C 0xC20024 0x6180010C 0x61C0008A 0x612D7C83 0x612D7C83 0xC21500 0xC20024 0x4F4E00FF 0x4F4A001A 0x4F4B0020 0x4F4606A0 0x4F4C000C 0x4F4D0006 0x4F4F0000 0x4F500000 0xC21500 0xC20024 0x4F4E00FF 0x4F4A001A 0x4F4B0022 0x4F4606A2 0x4F4C0006 0x4F4D0006 0x4F4F0000 0x4F500000 0xC21500 0xC20024 0x4F4E00FF 0x4F4A001A 0x4F4B0021 0x4F4606A1 0x4F4C0006 0x4F4D0006 0x4F4F0000 0x4F500000 0xC21500 0xC20024 0x4F4E00FF 0x4F4A001C 0x4F4B000D 0x4F46070D 0x4F4C0210 0x4F4D0100 0x4F4F0000 0x4F500000 0xC21500 0xC20024 0x4F4E00FF 0x4F4A001C 0x4F4B000A 0x4F46070A 0x4F4C002C 0x4F4D000E 0x4F4F0000 0x4F500000 0xC21110 0xC20024 0x41070000 0x410800BF 0x4F8A00FF 0x4F8B0001 0x4F80001A 0x4100001A 0x4F01000C 0x4F06068D 0x4F0A0024 0x4101000C 0x410C0001 0x410D7007 0x410E5D00 0x410F0000 0x41100001 0x41110000 0x4F8A00FF 0x4F8B0001 0x4F80001A 0x4100001A 0x4F8A00FF 0x4F8B0001 0x4F80001A 0x4100001A 0x41070000 0x410800BF 0x4F8A00FF 0x4F8B0001 0x4F80001A 0x4100001A 0xC21205 0xC20024 0x43870001 0x43887FFF 0x4F8A00FF 0x4F8B0001 0x4F80001A 0x4380001A 0x4F01000C 0x4F0606A0 0x4F0A0024 0x4381000C 0x438A0000 0x43A00000 0x43A10000 0x438B0000 0x438C000C 0x43A20000 0x438D0000 0x43A30000 0x43A40000 0x438F0004 0x43900000 0x43910000 0x43920001 0x439F0001 0x43A50000 0x43A60001 0x4F8A00FF 0x4F8B0001 0x4F80001A 0x4380001 0xC20002 0xC20024 0x4003007 0x4400A08 0xC2C120 0xC20024
Thanks,
Joe
Hi Joe,
I have a set of SYSFW binaries that I would like you to test for this authentication failure issue. Please accept the friend request that I have just sent to you so that I could share the binaries over private chat.
Thanks,
Prashant
Hi Joe,
I have shared the binaries over private chat. Please replace the default sysfw binaries with the shared ones & share the results.
Thanks, Prashant
Hi Prashant,
I ran test_func with a known good config again 4S4D4D at 20MHz. Authentication failed when using the Cache method.
Thanks,
Joe
Hi Joe,
Authentication failed when using the Cache method.
That is just because the destination address is 0x70180000 which limits the maximum appimage size (len = 0x40000 (256KB)) than can be read from flash & authenticated. If your appimage size is large then you would have to adjust the destination address accordingly.
In any case, the `test_func` is not relevant anymore. I would like you to validate the shared sysfw binaries with the usual boot flow to see if the authentication failure issue still occurs.
Regards,
Prashant
Prashant,
It works!
In detail, I tried 4s4d4d at 20MHz which has been working. Then I tried the protocol configuration that has never worked: 4S4S4S at 33MHz with a known good Tap Delay of 3 and with your SysFw it authenticates and boots.
I would like to note the following for anyone following this thread and the linked thread:
Prior to calling Sciclient_getVersionCheck(1) we call:
After the first successful test at 4S4S4S, I allowed the OSPI driver to determine the CaptureDelay (Tap Delay) and it came up with a value of 4. The result of this was that it found an image length of 0 and failed to boot. In Excel I calculated that both a value of 2 or 3 should work at 33MHz and with your new SysFw they did both work. The method of determining the capture delay needs to be made more robust for users that are booting from QSPI. The chip errata prevents us from using external loopback and PHY Mode.
4S4S4S at 33.3MHz Tap=3
DMSC Firmware Version 10.1.8-v10.01.08-2-gabffe (Fier
DMSC Firmware revision 0xa
DMSC ABI revision 4.0
Starting to verify the image by calling Bootloader_verifyMulticoreImage() !!
Bootmedia is Flash !!
Bootmedia is not eMMC hence compute certificate and image length !!
Certificate Length: 1654 and Image Length: 786752 !!
Cache Aligned length: 788480 !!
Certificate length is valid
Image authentication done, results authStatus: 0
Image Authentication passed !!
Status value: 0 !!
Image verified, status is: 0 !!
Image parsed successfully !!
Starting to read all the core offset addresses !!
Starting to parse individual rprc files !!
Thank you very much for your assistance on this! How are we to proceed with our development? Will this fix become available in the next SDK release?
Joe
Hi Joe,
Thank you for the explanation. It might be helpful for others.
How are we to proceed with our development?
The shared sysfw binaries were only meant for testing. Assuming you are in development phase, you can continue to use these shared ones to leverage authentication otherwise you could go back to using the usual binaries that came with the SDK but with authentication disabled for now.
The official fix will be part of the next SYSFW release as part of the next SDK release v10.1.
Regards,
Prashant
Thanks again to you and the rest of the TI engineers that provided support for the last 5 months until resolution.
Joe