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.

AM6422: OP-TEE can't get HUK during Linux appimage boot process

Part Number: AM6422
Other Parts Discussed in Thread: AM6442, , SYSCONFIG

Tool/software:

Hi everybody,

I'm actually facing an issue trying to boot a Linux appimage from custom SBL. The SBL start correctly but when OP-TEE try to access HUK in A53 SPL I got the error :

E/TC:0 0 tee_otp_get_hw_unique_key:103 Could not get HUK, with error : ffff0001 (access_denied). I tried to debug by putting print in OP-TEE and it seems that the error is due to a mismatch of permission flags with TI_SCI_FLAG_RESP_GENERIC_ACK in the mailbox message comming from proxy thread.

Actually, I compile my SBL with MCU+SDK and generate my appimage with linuxAppimageGen.

I compile OP-TEE with the following command : make -j8 CROSS_COMPILE64="$CROSS_COMPILE_64" CROSS_COMPILE32="$CROSS_COMPILE_32" PLATFORM=k3 CFG_TEE_SUPP_LOG_LEVEL=4 CFG_TEE_CORE_DEBUG=y RPMB_EMU=0 CFG_ARM64_core=y CFG_REE_FS=y DEBUG=y CFG_TEE_CORE_LOG_LEVEL=4

And u-boot with : make ARCH=arm CROSS_COMPILE="$CROSS_COMPILE_64" -j8 BINMAN_INDIRS=/home/baptiste/Documents/Custom_linux_env/prebuilt-images BL31=/home/baptiste/Documents/Custom_linux_env/prebuilt-images/bl31.bin TEE=/home/baptiste/Documents/optee_os/out/arm-plat-k3/core/bl32.bin O=build/a53

and i put bl32.bin and u-boot-spl.bin from u-boot/build/a53/spl in the config.mak to compile appimage.

I try to boot the SBL from OSPI and directly from the SD card by replacing tiboo3.bin by my SBL but the result is the same.

My SD card contain one part with uboot.img. tispl.bin tiboot3.bin and my appimages and the rootfs in the second part (everything is working correctly when i use the original tiboot3.bin and boot fom sd card by bypassing the custom SBL)

I use the MCU+SDK with GP mode in devconfig to use hs-fs. I also tried to compile everything with HS but it change nothing.

Boot logs :

Starting SD Bootloader ...

DMSC Firmware Version 9.1.6--v09.01.06 (Kool Koala)
DMSC Firmware revision 0x9
DMSC ABI revision 3.1

Files read from sd card
Multicore image parsing is OK
ParseAndLoad 0
ParseAndLoad 1
ParseAndLoad 2
ParseAndLoad 3
ParseAndLoad 4
ParseAndLoad 5
Linux app image parsing is OK
[BOOTLOADER_PROFILE] Boot Media       : SD Card
[BOOTLOADER_PROFILE] Boot Image Size  : 989 KB
[BOOTLOADER_PROFILE] Cores present    :
r5f0-0
r5f0-1
a530-0
[BOOTLOADER PROFILE] SYSFW init                       :      12177us
[BOOTLOADER PROFILE] System_init                      :      30543us
[BOOTLOADER PROFILE] Drivers_open                     :     115253us
[BOOTLOADER PROFILE] Board_driversOpen                :       2833us
[BOOTLOADER PROFILE] Sciclient Get Version            :       9913us
[BOOTLOADER PROFILE] File read from SD card           :      96051us
[BOOTLOADER PROFILE] CPU load                         :       8907us
[BOOTLOADER_PROFILE] SBL Total Time Taken             :     358837us

Image loading done, switching to application ...
NOTICE:  BL31: v2.10.0(release):v2.10.0-367-g00f1ec6b87-dirty
NOTICE:  BL31: Built : 16:09:05, Feb  9 2024
NOTICE:  Upgrade Firmwares for Power off functionality
ERROR:   GTC is disabled! Timekeeping broken. Fix Bootloader
ERROR:   GTC_CNTFID0 is 0! Assuming 200000000 Hz. Fix Bootloader
D/TC:0   plat_get_aslr_seed:112 Warning: no ASLR seed
D/TC:0   add_phys_mem:750 VCORE_UNPG_RX_PA type TEE_RAM_RX 0x9e800000 size 0x00075000
D/TC:0   add_phys_mem:750 VCORE_UNPG_RW_PA type TEE_RAM_RW 0x9e875000 size 0x0018b000
D/TC:0   add_phys_mem:750 ta_base type TA_RAM 0x9ea00000 size 0x01200000
D/TC:0   add_phys_mem:750 SEC_PROXY_RT_BASE type IO_SEC 0x4a600000 size 0x00200000
D/TC:0   add_phys_mem:750 SEC_PROXY_SCFG_BASE type IO_SEC 0x4a400000 size 0x00200000
D/TC:0   merge_mmaps:703 Merging 0x4a600000..0x4a7fffff and 0x4a400000..0x4a5fffff
D/TC:0   add_phys_mem:750 SEC_PROXY_DATA_BASE type IO_SEC 0x4d000000 size 0x00200000
D/TC:0   add_phys_mem:750 CONSOLE_UART_BASE type IO_NSEC 0x02800000 size 0x00200000
D/TC:0   add_phys_mem:750 GICD_BASE type IO_SEC 0x01800000 size 0x00200000
D/TC:0   add_phys_mem:750 GICC_BASE type IO_SEC 0x01800000 size 0x00200000
D/TC:0   merge_mmaps:703 Merging 0x1800000..0x19fffff and 0x1800000..0x19fffff
D/TC:0   add_phys_mem:750 TEE_SHMEM_START type NSEC_SHM 0x9fc00000 size 0x00400000
D/TC:0   add_va_space:794 type RES_VASPACE size 0x00a00000
D/TC:0   add_va_space:794 type SHM_VASPACE size 0x02000000
D/TC:0   dump_mmap_table:921 type NSEC_SHM     va 0x99800000..0x99bfffff pa 0x9fc00000..0x9fffffff size 0x00400000 (pgdir)
D/TC:0   dump_mmap_table:921 type TA_RAM       va 0x99c00000..0x9adfffff pa 0x9ea00000..0x9fbfffff size 0x01200000 (pgdir)
D/TC:0   dump_mmap_table:921 type IO_SEC       va 0x9b000000..0x9b1fffff pa 0x4d000000..0x4d1fffff size 0x00200000 (pgdir)
D/TC:0   dump_mmap_table:921 type IO_SEC       va 0x9b200000..0x9b5fffff pa 0x4a400000..0x4a7fffff size 0x00400000 (pgdir)
D/TC:0   dump_mmap_table:921 type IO_NSEC      va 0x9b600000..0x9b7fffff pa 0x02800000..0x029fffff size 0x00200000 (pgdir)
D/TC:0   dump_mmap_table:921 type IO_SEC       va 0x9b800000..0x9b9fffff pa 0x01800000..0x019fffff size 0x00200000 (pgdir)
D/TC:0   dump_mmap_table:921 type RES_VASPACE  va 0x9ba00000..0x9c3fffff pa 0x00000000..0x009fffff size 0x00a00000 (pgdir)
D/TC:0   dump_mmap_table:921 type SHM_VASPACE  va 0x9c600000..0x9e5fffff pa 0x00000000..0x01ffffff size 0x02000000 (pgdir)
D/TC:0   dump_mmap_table:921 type TEE_RAM_RX   va 0x9e800000..0x9e874fff pa 0x9e800000..0x9e874fff size 0x00075000 (smallpg)
D/TC:0   dump_mmap_table:921 type TEE_RAM_RW   va 0x9e875000..0x9e9fffff pa 0x9e875000..0x9e9fffff size 0x0018b000 (smallpg)
D/TC:0   core_mmu_xlat_table_alloc:527 xlat tables used 1 / 8
D/TC:0   core_mmu_xlat_table_alloc:527 xlat tables used 2 / 8
I/TC:
I/TC: OP-TEE version custom: 4.3.0-125-g55a4d8393-dev (gcc version 11.3.1 20220712 (Arm GNU Toolchain 11.3.Rel1)) #1 Wed Se4
I/TC: WARNING: This OP-TEE configuration might be insecure!
I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
I/TC: Primary CPU initializing
D/TC:0 0 boot_init_primary_late:1011 Executing at offset 0 with virtual load address 0x9e800000
I/TC: GIC redistributor base address not provided
I/TC: Assuming default GIC group status and modifier
D/TC:0 0 do_init_calls:19 preinitcall level 2 mobj_mapped_shm_init()
D/TC:0 0 mobj_mapped_shm_init:467 Shared memory address range: 9c600000, 9e600000
D/TC:0 0 do_init_calls:19 early_initcall level 1 teecore_init_pub_ram()
D/TC:0 0 do_init_calls:19 early_initcall level 2 init_ti_sci()
D/TC:0 0 k3_sec_proxy_init:243 tx_thread: 11, rx_thread: 10
F/TC:0 0 k3_sec_proxy_send:131 Verifying the thread
F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
F/TC:0 0 k3_sec_proxy_recv:193 Verifying thread
F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
I/TC: SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.6--v09.01.06 (Kool Koala)')
D/TC:0 0 do_init_calls:19 service_initcall level 1 tee_cryp_init()
D/TC:0 0 do_init_calls:19 service_initcall level 2 check_ta_store()
D/TC:0 0 check_ta_store:449 TA store: "Secure Storage TA"
D/TC:0 0 check_ta_store:449 TA store: "REE"
D/TC:0 0 do_init_calls:19 service_initcall level 2 verify_pseudo_tas_conformance()
D/TC:0 0 do_init_calls:19 service_initcall level 3 secure_boot_information()
F/TC:0 0 k3_sec_proxy_send:131 Verifying the thread
F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
F/TC:0 0 k3_sec_proxy_recv:193 Verifying thread
F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
E/TC:0 0 ti_sci_get_response:123 Message not acknowledged
E/TC:0 0 ti_sci_do_xfer:154 Error, access denied : -65535
F/TC:0 0 k3_sec_proxy_send:131 Verifying the thread
F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
F/TC:0 0 k3_sec_proxy_recv:193 Verifying thread
F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
E/TC:0 0 ti_sci_get_response:123 Message not acknowledged
E/TC:0 0 ti_sci_do_xfer:154 Error, access denied : -65535
D/TC:0 0 do_init_calls:19 service_initcall level 3 tee_fs_init_key_manager()
F/TC:0 0 k3_sec_proxy_send:131 Verifying the thread
F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
F/TC:0 0 k3_sec_proxy_recv:193 Verifying thread
F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
E/TC:0 0 ti_sci_get_response:123 Message not acknowledged
E/TC:0 0 ti_sci_do_xfer:154 Error, access denied : -65535
E/TC:0 0 ti_sci_get_dkek:349 Error transfert
E/TC:0 0 tee_otp_get_hw_unique_key:103 Could not get HUK, with error : ffff0001
E/TC:0 0 do_init_calls:22 service_initcall __text_start + 0x000747a0 failed
D/TC:0 0 do_init_calls:19 driver_initcall level 2 init_multi_core_panic_handler()
D/TC:0 0 do_init_calls:19 driver_initcall level 2 mobj_init()
D/TC:0 0 do_init_calls:19 driver_initcall level 2 default_mobj_init()
D/TC:0 0 do_init_calls:19 driver_initcall level 3 gic_set_primary_done()
I/TC: Primary CPU switching to normal world boot

U-Boot SPL 2023.04-dirty (Sep 18 2024 - 11:56:54 +0200)

SBL code :

/*
 * Copyright (C) 2018-2022 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.
 */


#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/sciclient.h>
#include <drivers/bootloader.h>

#define BOOTLOADER_SD_APPIMAGE_FILENAME ("/sd0/app")
#define BOOTLOADER_SD_LINUX ("/sd0/app_linux")

#define BOOTLOADER_APPIMAGE_LINUX_MAX_FILE_SIZE (0x800000) /* Size of section MSRAM_2 specified in linker.cmd */
#define BOOTLOADER_APPIMAGE_MAX_FILE_SIZE (0x60000) /* Size of section MSRAM_2 specified in linker.cmd */

uint8_t gAppImageBufLinux[BOOTLOADER_APPIMAGE_LINUX_MAX_FILE_SIZE] __attribute__((aligned(4096), section(".bss.app")));
uint8_t gAppImageBuf[BOOTLOADER_APPIMAGE_MAX_FILE_SIZE] __attribute__((aligned(128), section(".bss.filebuf")));

/* 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(void)
{
 volatile uint32_t loop = 1;
 while(loop)
 ;
}

int main(void)
{
 int32_t status;

 Bootloader_profileReset();

 Bootloader_socWaitForFWBoot();

#ifndef DISABLE_WARM_REST_WA
 /* Warm Reset Workaround to prevent CPSW register lockup */
 if (!Bootloader_socIsMCUResetIsoEnabled())
 {
 Bootloader_socResetWorkaround();
 }
#endif

 Bootloader_profileAddProfilePoint("SYSFW init");

 if (!Bootloader_socIsMCUResetIsoEnabled())
 {
 /* Update devGrp to ALL to initialize MCU domain when reset isolation is
 not enabled */
 Sciclient_BoardCfgPrms_t boardCfgPrms_pm =
 {
 .boardConfigLow = (uint32_t)0,
 .boardConfigHigh = 0,
 .boardConfigSize = 0,
 .devGrp = DEVGRP_ALL,
 };

 status = Sciclient_boardCfgPm(&boardCfgPrms_pm);

 Sciclient_BoardCfgPrms_t boardCfgPrms_rm =
 {
 .boardConfigLow = (uint32_t)0,
 .boardConfigHigh = 0,
 .boardConfigSize = 0,
 .devGrp = DEVGRP_ALL,
 };

 status = Sciclient_boardCfgRm(&boardCfgPrms_rm);

 /* Enable MCU PLL. MCU PLL will not be enabled by DMSC when devGrp is set
 to Main in boardCfg */
 Bootloader_enableMCUPLL();
 }

 Bootloader_socOpenFirewalls();

 Bootloader_socNotifyFirewallOpen();

 System_init();
 Bootloader_profileAddProfilePoint("System_init");

 Drivers_open();
 Bootloader_profileAddProfilePoint("Drivers_open");

 DebugP_log("\r\n");
 DebugP_log("Starting SD Bootloader ... \r\n");
 
 status = Board_driversOpen();
 DebugP_assert(status == SystemP_SUCCESS);
 Bootloader_profileAddProfilePoint("Board_driversOpen");

 status = Sciclient_getVersionCheck(1);
 Bootloader_profileAddProfilePoint("Sciclient Get Version");
 /* File I/O */
 if(SystemP_SUCCESS == status)
 {
 /* Open app file */
 FF_FILE *appFp = ff_fopen(BOOTLOADER_SD_APPIMAGE_FILENAME, "rb");

 /* Check if file open succeeded */
 if(appFp == NULL)
 {
 status = SystemP_FAILURE;
 DebugP_log("Cant open file from sd card\r\n");
 }
 else
 {
 /* Check file size */
 uint32_t fileSize = ff_filelength(appFp);

 if(fileSize >= BOOTLOADER_APPIMAGE_MAX_FILE_SIZE)
 {
 /* Application size more than buffer size, abort */
 status = SystemP_FAILURE;
 DebugP_log("Appimage size exceeded limit !!\r\n");
 }
 else
 {
 /* Read the file into RAM buffer */
 ff_fread(gAppImageBuf, fileSize, 1, appFp);
 }

 /* Close the file */
 ff_fclose(appFp);
 }
 }
 if(SystemP_SUCCESS == status)
 {
 /* Open app file */
 FF_FILE *appFpLinux = ff_fopen(BOOTLOADER_SD_LINUX, "rb");

 /* Check if file open succeeded */
 if(appFpLinux == NULL)
 {
 status = SystemP_FAILURE;
 DebugP_log("Cant open linux file from sd card\r\n");
 }
 else
 {
 /* Check file size */
 uint32_t fileSize = ff_filelength(appFpLinux);

 if(fileSize >= BOOTLOADER_APPIMAGE_LINUX_MAX_FILE_SIZE)
 {
 /* Application size more than buffer size, abort */
 status = SystemP_FAILURE;
 DebugP_log("Appimage size exceeded limit !!\r\n");
 }
 else
 {
 /* Read the file into RAM buffer */
 ff_fread(gAppImageBufLinux, fileSize, 1, appFpLinux);
 }

 /* Close the file */
 ff_fclose(appFpLinux);
 }
 }
 Bootloader_profileAddProfilePoint("File read from SD card");

 if(SystemP_SUCCESS == status)
 {
 DebugP_log("Files read from sd card\r\n");

 Bootloader_BootImageInfo bootImageInfo;
 Bootloader_Params bootParams;
 Bootloader_Handle bootHandle;

 Bootloader_BootImageInfo bootImageInfo_Linux;
 Bootloader_Params bootParams_Linux;
 Bootloader_Handle bootHandle_Linux;

 Bootloader_Params_init(&bootParams);
 Bootloader_Params_init(&bootParams_Linux);

 Bootloader_BootImageInfo_init(&bootImageInfo);
 Bootloader_BootImageInfo_init(&bootImageInfo_Linux);

 bootParams.memArgsAppImageBaseAddr = (uintptr_t)gAppImageBuf;
 bootParams_Linux.memArgsAppImageBaseAddr = (uintptr_t)gAppImageBufLinux;

 bootHandle = Bootloader_open(CONFIG_BOOTLOADER_MEM, &bootParams);

 if(bootHandle != NULL)
 {
 /* Initialize PRU Cores if applicable */
 Bootloader_Config *cfg = (Bootloader_Config *)bootHandle;
 if(TRUE == cfg->initICSSCores)
 {
 status = Bootloader_socEnableICSSCores(BOOTLOADER_ICSS_CORE_DEFAULT_FREQUENCY);
 DebugP_assert(status == SystemP_SUCCESS);
 }

 status = Bootloader_parseMultiCoreAppImage(bootHandle, &bootImageInfo);
 if(status == SystemP_SUCCESS)
 {
 DebugP_log("Multicore image parsing is OK\r\n");
 }
 else
 {
 DebugP_log("Multicore image parsing went wrong\r\n");
 }
 /* Load CPUs */
 /* Do not load M4 when MCU domain is reset isolated */
 if (!Bootloader_socIsMCUResetIsoEnabled())
 {
 if(status == SystemP_SUCCESS && (TRUE == Bootloader_isCorePresent(bootHandle, CSL_CORE_ID_M4FSS0_0)))
 {
 bootImageInfo.cpuInfo[CSL_CORE_ID_M4FSS0_0].clkHz = Bootloader_socCpuGetClkDefault(CSL_CORE_ID_M4FSS0_0);
 Bootloader_profileAddCore(CSL_CORE_ID_M4FSS0_0);
 status = Bootloader_loadCpu(bootHandle, &bootImageInfo.cpuInfo[CSL_CORE_ID_M4FSS0_0]);
 }
 }
 if(status == SystemP_SUCCESS && (TRUE == Bootloader_isCorePresent(bootHandle, CSL_CORE_ID_R5FSS1_0)))
 {
 bootImageInfo.cpuInfo[CSL_CORE_ID_R5FSS1_0].clkHz = Bootloader_socCpuGetClkDefault(CSL_CORE_ID_R5FSS1_0);
 Bootloader_profileAddCore(CSL_CORE_ID_R5FSS1_0);
 status = Bootloader_loadCpu(bootHandle, &bootImageInfo.cpuInfo[CSL_CORE_ID_R5FSS1_0]);
 }
 if(status == SystemP_SUCCESS && (TRUE == Bootloader_isCorePresent(bootHandle, CSL_CORE_ID_R5FSS1_1)))
 {
 bootImageInfo.cpuInfo[CSL_CORE_ID_R5FSS1_1].clkHz = Bootloader_socCpuGetClkDefault(CSL_CORE_ID_R5FSS1_1);
 Bootloader_profileAddCore(CSL_CORE_ID_R5FSS1_1);
 status = Bootloader_loadCpu(bootHandle, &bootImageInfo.cpuInfo[CSL_CORE_ID_R5FSS1_1]);
 }

 /* Assume self boot for either of the cores of R50 cluster */
 uint32_t isSelfBoot = FALSE;
 if(TRUE == Bootloader_isCorePresent(bootHandle, CSL_CORE_ID_R5FSS0_0))
 {
 isSelfBoot = TRUE;
 Bootloader_profileAddCore(CSL_CORE_ID_R5FSS0_0);
 }

 if(TRUE == Bootloader_isCorePresent(bootHandle, CSL_CORE_ID_R5FSS0_1))
 {
 isSelfBoot = TRUE;
 Bootloader_profileAddCore(CSL_CORE_ID_R5FSS0_1);
 }

 /* Self cores has to be reset together, so check for both */
 if(status == SystemP_SUCCESS && (TRUE == isSelfBoot))
 {
 /* Set clocks for self cluster */
 bootImageInfo.cpuInfo[CSL_CORE_ID_R5FSS0_0].clkHz = Bootloader_socCpuGetClkDefault(CSL_CORE_ID_R5FSS0_0);
 bootImageInfo.cpuInfo[CSL_CORE_ID_R5FSS0_1].clkHz = Bootloader_socCpuGetClkDefault(CSL_CORE_ID_R5FSS0_1);

 /* Reset self cluster, both Core0 and Core 1. Init RAMs and load the app */
 /* Skip the image load by passing TRUE, so that image load on self core doesnt corrupt the SBLs IVT. Load the image later before the reset release of the self core */
 status = Bootloader_loadSelfCpu(bootHandle, &bootImageInfo.cpuInfo[CSL_CORE_ID_R5FSS0_0], TRUE);
 if((status == SystemP_SUCCESS) && (TRUE == Bootloader_socIsR5FSSDual(BOOTLOADER_R5FSS0)))
 {
 status = Bootloader_loadSelfCpu(bootHandle, &bootImageInfo.cpuInfo[CSL_CORE_ID_R5FSS0_1], FALSE);
 }
 }
 Bootloader_profileAddProfilePoint("CPU load");
 Bootloader_profileUpdateAppimageSize(Bootloader_getMulticoreImageSize(bootHandle));
 Bootloader_profileUpdateMediaAndClk(BOOTLOADER_MEDIA_SD, 0);
 }
 else
 {
 status = SystemP_FAILURE;
 }

 bootHandle_Linux = Bootloader_open(CONFIG_BOOTLOADER_LINUX, &bootParams_Linux);

 if(bootHandle_Linux != NULL)
 {
 /* Initialize PRU Cores if applicable */
 //Bootloader_Config *cfgLinux = (Bootloader_Config *)bootHandle_Linux;
 
 status = Bootloader_parseAndLoadLinuxAppImage(bootHandle_Linux, &bootImageInfo_Linux);
 if(status == SystemP_SUCCESS)
 {
 DebugP_log("Linux app image parsing is OK\r\n");
 }
 else
 {
 DebugP_log("Linux app image parsing went wrong\r\n");
 }
 
 if(status == SystemP_SUCCESS && (TRUE == Bootloader_isCorePresent(bootHandle_Linux, CSL_CORE_ID_A53SS0_0)))
 {
 bootImageInfo_Linux.cpuInfo[CSL_CORE_ID_A53SS0_0].clkHz = Bootloader_socCpuGetClkDefault(CSL_CORE_ID_A53SS0_0);
 Bootloader_profileAddCore(CSL_CORE_ID_A53SS0_0);
 status = Bootloader_loadCpu(bootHandle_Linux, &bootImageInfo_Linux.cpuInfo[CSL_CORE_ID_A53SS0_0]);
 }
 Bootloader_profileUpdateAppimageSize(Bootloader_getMulticoreImageSize(bootHandle_Linux));
 }
 else
 {
 status = SystemP_FAILURE;
 }

 if(status == SystemP_SUCCESS)
 {
 /* Print SBL Profiling logs to UART as other cores may use the UART for logging */
 Bootloader_profileAddProfilePoint("SBL End");
 Bootloader_profilePrintProfileLog();
 DebugP_log("Image loading done, switching to application ...\r\n");
 UART_flushTxFifo(gUartHandle[CONFIG_UART0]);
 }

 SOC_unlockAllMMR();
 status = Bootloader_runCpu(bootHandle_Linux, &bootImageInfo_Linux.cpuInfo[CSL_CORE_ID_A53SS0_0]);

 if (!Bootloader_socIsMCUResetIsoEnabled())
 {
 if(status == SystemP_SUCCESS && (TRUE == Bootloader_isCorePresent(bootHandle, CSL_CORE_ID_M4FSS0_0)))
 {
 status = Bootloader_runCpu(bootHandle, &bootImageInfo.cpuInfo[CSL_CORE_ID_M4FSS0_0]);
 }
 }
 if(status == SystemP_SUCCESS && (TRUE == Bootloader_isCorePresent(bootHandle, CSL_CORE_ID_R5FSS1_0)))
 {
 status = Bootloader_runCpu(bootHandle, &bootImageInfo.cpuInfo[CSL_CORE_ID_R5FSS1_0]);
 }
 if(status == SystemP_SUCCESS && (TRUE == Bootloader_isCorePresent(bootHandle, CSL_CORE_ID_R5FSS1_1)))
 {
 status = Bootloader_runCpu(bootHandle, &bootImageInfo.cpuInfo[CSL_CORE_ID_R5FSS1_1]);
 }
 if(status == SystemP_SUCCESS)
 {
 /* Load the image on self core now */
 if( bootImageInfo.cpuInfo[CSL_CORE_ID_R5FSS0_0].rprcOffset != BOOTLOADER_INVALID_ID)
 {
 status = Bootloader_rprcImageLoad(bootHandle, &bootImageInfo.cpuInfo[CSL_CORE_ID_R5FSS0_0]);
 }
 /* Reset self cluster, both Core0 and Core 1. Init RAMs and run the app */
 status = Bootloader_runSelfCpu(bootHandle, &bootImageInfo);
 }

 /* it should not return here, if it does, then there was some error */
 Bootloader_close(bootHandle);
 }

 if(status != SystemP_SUCCESS)
 {
 DebugP_log("Some tests have failed!!\r\n");
 }
 Drivers_close();
 System_deinit();

 return 0;
}

Thanks for your help !

Best regards,
Baptiste C

  • Sorry, I made a big mistake I'm using AM6442 and not AM6422

  • Hello,

    The Linux SBLs in the SDK, which are used for booting Linux, consumes different board configuration blob than the regular SBLs.

    ❯ grep BOARDCFG_BLOB= -- ./examples/drivers/boot/sbl_emmc_linux/am64x-evm/r5fss0-0_nortos/ti-arm-clang/makefile
    BOARDCFG_BLOB=$(MCU_PLUS_SDK_PATH)/source/drivers/sciclient/sciclient_default_boardcfg/am64x/boardcfg_blob_linux.bin
    
    ❯ grep BOARDCFG_BLOB= -- ./examples/drivers/boot/sbl_sd/am64x-evm/r5fss0-0_nortos/ti-arm-clang/makefile
    BOARDCFG_BLOB=$(MCU_PLUS_SDK_PATH)/source/drivers/sciclient/sciclient_default_boardcfg/am64x/boardcfg_blob.bin

    Please make sure you are generating your custom SBL with the board configurations as used by SBL_EMMC_LINUX.

    Regards,

    Prashant

  • Thanks a lot, that solve the HUK initalization problem !

    But u-boot still not start after printing the version. I try to debug by putting printf and it seems to block in do_dt_magic() call by board_init_f(ulong dummy) in u-boot/arch/arm/mach-k3/am642_init.c

    CONFIG_TI_I2C_BOARD_DETECT and CONFIG_CPU_V7R are well set in u-boot.cfg so I dont understand why u-boot never start.

  • Are you using a TI EVM or custom board? Can you please share the latest boot logs as well?

    Thanks!

  • I'm using TI Am64x SK-EVM

    Sorry the only real u-boot log is : U-Boot SPL 2023.04-dirty (Sep 19 2024 - 12:54:37 +0200)

    Other logs are some printf that i put to find the error. It seems that i have a problem with the i2c probe to access EEPROM. I try to change the status in uboot/arch/arm/dts/k3-am64-main.dtsi but the result was the same.

    Device tree :

    main_i2c0: i2c@20000000 {
    		compatible = "ti,am64-i2c", "ti,omap4-i2c";
    		reg = <0x00 0x20000000 0x00 0x100>;
    		interrupts = <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
    		#address-cells = <1>;
    		#size-cells = <0>;
    		power-domains = <&k3_pds 102 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 102 2>;
    		clock-names = "fck";
    		status = "okay";
    	};

    Last boot logs :

    Starting SD Bootloader ...
    
    DMSC Firmware Version 9.1.6--v09.01.06 (Kool Koala)
    DMSC Firmware revision 0x9
    DMSC ABI revision 3.1
    
    Files read from sd card
    Multicore image parsing is OK
    ParseAndLoad 0
    ParseAndLoad 1
    ParseAndLoad 2
    ParseAndLoad 3
    ParseAndLoad 4
    ParseAndLoad 5
    Linux app image parsing is OK
    [BOOTLOADER_PROFILE] Boot Media       : SD Card
    [BOOTLOADER_PROFILE] Boot Image Size  : 991 KB
    [BOOTLOADER_PROFILE] Cores present    :
    r5f0-0
    r5f0-1
    a530-0
    [BOOTLOADER PROFILE] SYSFW init                       :      12158us
    [BOOTLOADER PROFILE] System_init                      :      30478us
    [BOOTLOADER PROFILE] Drivers_open                     :     149099us
    [BOOTLOADER PROFILE] Board_driversOpen                :       2831us
    [BOOTLOADER PROFILE] Sciclient Get Version            :       9914us
    [BOOTLOADER PROFILE] File read from SD card           :      96555us
    [BOOTLOADER PROFILE] CPU load                         :       8923us
    [BOOTLOADER_PROFILE] SBL Total Time Taken             :     388211us
    
    Image loading done, switching to application ...
    NOTICE:  BL3E1:R v2.R10.0(OreleRase):v:2.10. 0-367B-g00f1ec6b87-dirty
    NOTICE:  BL31: Built : 16:09:05, Feb  9 2024
    NOTICE:  Upgrade Firmwares for Power off functionality
    ERROR:   GTC is disabled! Timekeeping broken. Fix Bootloader
    ERROR:   GTC_CNTFID0 is 0! Assuming 200000000 Hz. Fix Bootloader
    D/TC:0   plat_get_aslr_seed:112 Warning: no ASLR seed
    D/TC:0   add_phys_mem:750 VCORE_UNPG_RX_PA type TEE_RAM_RX 0x9e800000 size 0x00075000
    D/TC:0   add_phys_mem:750 VCORE_UNPG_RW_PA type TEE_RAM_RW 0x9e875000 size 0x0018b000
    D/TC:0   add_phys_mem:750 ta_base type TA_RAM 0x9ea00000 size 0x01200000
    D/TC:0   add_phys_mem:750 SEC_PROXY_RT_BASE type IO_SEC 0x4a600000 size 0x00200000
    D/TC:0   add_phys_mem:750 SEC_PROXY_SCFG_BASE type IO_SEC 0x4a400000 size 0x00200000
    D/TC:0   merge_mmaps:703 Merging 0x4a600000..0x4a7fffff and 0x4a400000..0x4a5fffff
    D/TC:0   add_phys_mem:750 SEC_PROXY_DATA_BASE type IO_SEC 0x4d000000 size 0x00200000
    D/TC:0   add_phys_mem:750 CONSOLE_UART_BASE type IO_NSEC 0x02800000 size 0x00200000
    D/TC:0   add_phys_mem:750 GICD_BASE type IO_SEC 0x01800000 size 0x00200000
    D/TC:0   add_phys_mem:750 GICC_BASE type IO_SEC 0x01800000 size 0x00200000
    D/TC:0   merge_mmaps:703 Merging 0x1800000..0x19fffff and 0x1800000..0x19fffff
    D/TC:0   add_phys_mem:750 TEE_SHMEM_START type NSEC_SHM 0x9fc00000 size 0x00400000
    D/TC:0   add_va_space:794 type RES_VASPACE size 0x00a00000
    D/TC:0   add_va_space:794 type SHM_VASPACE size 0x02000000
    D/TC:0   dump_mmap_table:921 type NSEC_SHM     va 0x99800000..0x99bfffff pa 0x9fc00000..0x9fffffff size 0x00400000)
    D/TC:0   dump_mmap_table:921 type TA_RAM       va 0x99c00000..0x9adfffff pa 0x9ea00000..0x9fbfffff size 0x01200000)
    D/TC:0   dump_mmap_table:921 type IO_SEC       va 0x9b000000..0x9b1fffff pa 0x4d000000..0x4d1fffff size 0x00200000)
    D/TC:0   dump_mmap_table:921 type IO_SEC       va 0x9b200000..0x9b5fffff pa 0x4a400000..0x4a7fffff size 0x00400000)
    D/TC:0   dump_mmap_table:921 type IO_NSEC      va 0x9b600000..0x9b7fffff pa 0x02800000..0x029fffff size 0x00200000)
    D/TC:0   dump_mmap_table:921 type IO_SEC       va 0x9b800000..0x9b9fffff pa 0x01800000..0x019fffff size 0x00200000)
    D/TC:0   dump_mmap_table:921 type RES_VASPACE  va 0x9ba00000..0x9c3fffff pa 0x00000000..0x009fffff size 0x00a00000)
    D/TC:0   dump_mmap_table:921 type SHM_VASPACE  va 0x9c600000..0x9e5fffff pa 0x00000000..0x01ffffff size 0x02000000)
    D/TC:0   dump_mmap_table:921 type TEE_RAM_RX   va 0x9e800000..0x9e874fff pa 0x9e800000..0x9e874fff size 0x00075000)
    D/TC:0   dump_mmap_table:921 type TEE_RAM_RW   va 0x9e875000..0x9e9fffff pa 0x9e875000..0x9e9fffff size 0x0018b000)
    D/TC:0   core_mmu_xlat_table_alloc:527 xlat tables used 1 / 8
    D/TC:0   core_mmu_xlat_table_alloc:527 xlat tables used 2 / 8
    I/TC:
    I/TC: OP-TEE version custom: 4.3.0-125-g55a4d8393-dev (gcc version 11.3.1 20220712 (Arm GNU Toolchain 11.3.Rel1)) 4
    I/TC: WARNING: This OP-TEE configuration might be insecure!
    I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
    I/TC: Primary CPU initializing
    D/TC:0 0 boot_init_primary_late:1011 Executing at offset 0 with virtual load address 0x9e800000
    I/TC: GIC redistributor base address not provided
    I/TC: Assuming default GIC group status and modifier
    D/TC:0 0 do_init_calls:19 preinitcall level 2 mobj_mapped_shm_init()
    D/TC:0 0 mobj_mapped_shm_init:467 Shared memory address range: 9c600000, 9e600000
    D/TC:0 0 do_init_calls:19 early_initcall level 1 teecore_init_pub_ram()
    D/TC:0 0 do_init_calls:19 early_initcall level 2 init_ti_sci()
    D/TC:0 0 k3_sec_proxy_init:243 tx_thread: 11, rx_thread: 10
    F/TC:0 0 k3_sec_proxy_send:131 Verifying the thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    F/TC:0 0 k3_sec_proxy_recv:193 Verifying thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    I/TC: SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.6--v09.01.06 (Kool Koala)')
    D/TC:0 0 do_init_calls:19 service_initcall level 1 tee_cryp_init()
    D/TC:0 0 do_init_calls:19 service_initcall level 2 check_ta_store()
    D/TC:0 0 check_ta_store:449 TA store: "Secure Storage TA"
    D/TC:0 0 check_ta_store:449 TA store: "REE"
    D/TC:0 0 do_init_calls:19 service_initcall level 2 verify_pseudo_tas_conformance()
    D/TC:0 0 do_init_calls:19 service_initcall level 3 secure_boot_information()
    F/TC:0 0 k3_sec_proxy_send:131 Verifying the thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    F/TC:0 0 k3_sec_proxy_recv:193 Verifying thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    E/TC:0 0 ti_sci_get_response:123 Message not acknowledged
    E/TC:0 0 ti_sci_do_xfer:154 Error, access denied : -65535
    F/TC:0 0 k3_sec_proxy_send:131 Verifying the thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    F/TC:0 0 k3_sec_proxy_recv:193 Verifying thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    E/TC:0 0 ti_sci_get_response:123 Message not acknowledged
    E/TC:0 0 ti_sci_do_xfer:154 Error, access denied : -65535
    D/TC:0 0 do_init_calls:19 service_initcall level 3 tee_fs_init_key_manager()
    F/TC:0 0 k3_sec_proxy_send:131 Verifying the thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    F/TC:0 0 k3_sec_proxy_recv:193 Verifying thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    I/TC: HUK Initialized
    D/TC:0 0 do_init_calls:19 driver_initcall level 2 init_multi_core_panic_handler()
    D/TC:0 0 do_init_calls:19 driver_initcall level 2 mobj_init()
    D/TC:0 0 do_init_calls:19 driver_initcall level 2 default_mobj_init()
    D/TC:0 0 do_init_calls:19 driver_initcall level 3 gic_set_primary_done()
    I/TC: Primary CPU switching to normal world boot
    
    U-Boot SPL 2023.04-dirty (Sep 19 2024 - 12:54:37 +0200)
    DEBUG preloader_console_init
    do_dt_magic, config detect : 1
    enter board detect
    ti_i2c_eeprom_am6_get_base enter
    ti_i2c_eeprom_am6_get enter
    enter ti_i2c_eeprom_am6_get debug
    DEBUG_0
    start debug ti_i2c_eeprom_get
    TEST_0
    uclass_get_device_by_seq
    enter uclass_find_device_by_seq
    before uclass_get
    uclass_get
    enter uclass_find
    get device tail : i2c@20000000
    device probe : i2c@20000000
    device probe : bus@f4000
    uclass_get
    enter uclass_find
    get device tail : power-controller
    device probe : power-controller
    uclass_get
    enter uclass_find
    get device tail : main-i2c0-pins-default
    device probe : main-i2c0-pins-default
    device probe : pinctrl@f4000
    device probe : bus@f4000
    uclass_pre_probe_device : pinctrl@f4000
    debug0 : pinctrl@f4000
    debug1 : pinctrl@f4000
    clk_set_defaults of dev : pinctrl@f4000
    clk_set_defaults debug0 dev : pinctrl@f4000
    clk_set_defaults debug1 dev : pinctrl@f4000
    debug2 : pinctrl@f4000
    debug3 : pinctrl@f4000
    debug4 : pinctrl@f4000
    uclass_post_probe_device : pinctrl@f4000
    uclass_pre_probe_device : main-i2c0-pins-default
    debug0 : main-i2c0-pins-default
    debug1 : main-i2c0-pins-default
    clk_set_defaults of dev : main-i2c0-pins-default
    clk_set_defaults debug0 dev : main-i2c0-pins-default
    clk_set_defaults debug1 dev : main-i2c0-pins-default
    debug2 : main-i2c0-pins-default
    uclass_post_probe_device : main-i2c0-pins-default
    uclass_pre_probe_device : i2c@20000000
    debug0 : i2c@20000000
    debug1 : i2c@20000000
    clk_set_defaults of dev : i2c@20000000
    clk_set_defaults debug0 dev : i2c@20000000
    clk_set_defaults debug1 dev : i2c@20000000
    debug2 : i2c@20000000
    debug3 : i2c@20000000

  • Are you using I2C anywhere in the SBL or R5F application that may conflict with the U-Boot? Can you share your binaries used to generate the Linux Appimage?

  • Sorry for my late answer I wasn't at the office on friday. I'm not using I2C anywhere in my project.linuxAppImageBinaries.zip

  • Hi, I have tested the shared binaries & they are booting fine on my SK board.

    DMSC Firmware Version 9.1.6--v09.01.06 (Kool Koala)
    DMSC Firmware revision 0x9
    DMSC ABI revision 3.1
                                                                                                                             
    [BOOTLOADER_PROFILE] Boot Media       : undefined
    [BOOTLOADER_PROFILE] Boot Image Size  : 0 KB
    [BOOTLOADER_PROFILE] Cores present    :
    [BOOTLOADER PROFILE] System_init                      :     393635us
    [BOOTLOADER PROFILE] Drivers_open                     :        315us
    [BOOTLOADER PROFILE] Board_driversOpen                :      23134us
    [BOOTLOADER PROFILE] App_loadImages                   :      84330us
    [BOOTLOADER_PROFILE] SBL Total Time Taken             :     639823us
                                                                                                                             
    Image loading done, switching to application ...
    Starting linux and RTOS/Baremetal applications
    NOTICE:  BL31: Ev2.10.0R(releasRe):Ov2.10.0R-367-g00:f1ec6b87-dirty
    NOTICE:  BL31: Built : 16:09:05, Feb  9 2024
    NOTICE:  Upgrade Firmwares for Power off functionality
    D/TC:0   plat_get_aslr_seed:112 Warning: no ASLR seed
    D/TC:0   add_phys_mem:750 VCORE_UNPG_RX_PA type TEE_RAM_RX 0x9e800000 size 0x00075000
    D/TC:0   add_phys_mem:750 VCORE_UNPG_RW_PA type TEE_RAM_RW 0x9e875000 size 0x0018b000
    D/TC:0   add_phys_mem:750 ta_base type TA_RAM 0x9ea00000 size 0x01200000
    D/TC:0   add_phys_mem:750 SEC_PROXY_RT_BASE type IO_SEC 0x4a600000 size 0x00200000
    D/TC:0   add_phys_mem:750 SEC_PROXY_SCFG_BASE type IO_SEC 0x4a400000 size 0x00200000
    D/TC:0   merge_mmaps:703 Merging 0x4a600000..0x4a7fffff and 0x4a400000..0x4a5fffff
    D/TC:0   add_phys_mem:750 SEC_PROXY_DATA_BASE type IO_SEC 0x4d000000 size 0x00200000
    D/TC:0   add_phys_mem:750 CONSOLE_UART_BASE type IO_NSEC 0x02800000 size 0x00200000
    D/TC:0   add_phys_mem:750 GICD_BASE type IO_SEC 0x01800000 size 0x00200000
    D/TC:0   add_phys_mem:750 GICC_BASE type IO_SEC 0x01800000 size 0x00200000
    D/TC:0   merge_mmaps:703 Merging 0x1800000..0x19fffff and 0x1800000..0x19fffff
    D/TC:0   add_phys_mem:750 TEE_SHMEM_START type NSEC_SHM 0x9fc00000 size 0x00400000
    D/TC:0   add_va_space:794 type RES_VASPACE size 0x00a00000
    D/TC:0   add_va_space:794 type SHM_VASPACE size 0x02000000
    D/TC:0   dump_mmap_table:921 type NSEC_SHM     va 0x99800000..0x99bfffff pa 0x9fc00000..0x9fffffff size 0x00400000 (pgdir)
    D/TC:0   dump_mmap_table:921 type TA_RAM       va 0x99c00000..0x9adfffff pa 0x9ea00000..0x9fbfffff size 0x01200000 (pgdir)
    D/TC:0   dump_mmap_table:921 type IO_SEC       va 0x9b000000..0x9b1fffff pa 0x4d000000..0x4d1fffff size 0x00200000 (pgdir)
    D/TC:0   dump_mmap_table:921 type IO_SEC       va 0x9b200000..0x9b5fffff pa 0x4a400000..0x4a7fffff size 0x00400000 (pgdir)
    D/TC:0   dump_mmap_table:921 type IO_NSEC      va 0x9b600000..0x9b7fffff pa 0x02800000..0x029fffff size 0x00200000 (pgdir)
    D/TC:0   dump_mmap_table:921 type IO_SEC       va 0x9b800000..0x9b9fffff pa 0x01800000..0x019fffff size 0x00200000 (pgdir)
    D/TC:0   dump_mmap_table:921 type RES_VASPACE  va 0x9ba00000..0x9c3fffff pa 0x00000000..0x009fffff size 0x00a00000 (pgdir)
    D/TC:0   dump_mmap_table:921 type SHM_VASPACE  va 0x9c600000..0x9e5fffff pa 0x00000000..0x01ffffff size 0x02000000 (pgdir)
    D/TC:0   dump_mmap_table:921 type TEE_RAM_RX   va 0x9e800000..0x9e874fff pa 0x9e800000..0x9e874fff size 0x00075000 (smallpg)
    D/TC:0   dump_mmap_table:921 type TEE_RAM_RW   va 0x9e875000..0x9e9fffff pa 0x9e875000..0x9e9fffff size 0x0018b000 (smallpg)
    D/TC:0   core_mmu_xlat_table_alloc:527 xlat tables used 1 / 8
    D/TC:0   core_mmu_xlat_table_alloc:527 xlat tables used 2 / 8
    I/TC:
    I/TC: OP-TEE version custom: 4.3.0-125-g55a4d8393-dev (gcc version 11.3.1 20220712 (Arm GNU Toolchain 11.3.Rel1)) #1 Wed Sep 18 09:56:11 UTC 2024 aarch64
    I/TC: WARNING: This OP-TEE configuration might be insecure!
    I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
    I/TC: Primary CPU initializing
    D/TC:0 0 boot_init_primary_late:1011 Executing at offset 0 with virtual load address 0x9e800000
    I/TC: GIC redistributor base address not provided
    I/TC: Assuming default GIC group status and modifier
    D/TC:0 0 do_init_calls:19 preinitcall level 2 mobj_mapped_shm_init()
    D/TC:0 0 mobj_mapped_shm_init:467 Shared memory address range: 9c600000, 9e600000
    D/TC:0 0 do_init_calls:19 early_initcall level 1 teecore_init_pub_ram()
    D/TC:0 0 do_init_calls:19 early_initcall level 2 init_ti_sci()
    D/TC:0 0 k3_sec_proxy_init:243 tx_thread: 11, rx_thread: 10
    F/TC:0 0 k3_sec_proxy_send:131 Verifying the thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    F/TC:0 0 k3_sec_proxy_recv:193 Verifying thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    I/TC: SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.6--v09.01.06 (Kool Koala)')
    D/TC:0 0 do_init_calls:19 service_initcall level 1 tee_cryp_init()
    D/TC:0 0 do_init_calls:19 service_initcall level 2 check_ta_store()
    D/TC:0 0 check_ta_store:449 TA store: "Secure Storage TA"
    D/TC:0 0 check_ta_store:449 TA store: "REE"
    D/TC:0 0 do_init_calls:19 service_initcall level 2 verify_pseudo_tas_conformance()
    D/TC:0 0 do_init_calls:19 service_initcall level 3 secure_boot_information()
    F/TC:0 0 k3_sec_proxy_send:131 Verifying the thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    F/TC:0 0 k3_sec_proxy_recv:193 Verifying thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    E/TC:0 0 ti_sci_get_response:123 Message not acknowledged
    E/TC:0 0 ti_sci_do_xfer:154 Error, access denied : -65535
    F/TC:0 0 k3_sec_proxy_send:131 Verifying the thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    F/TC:0 0 k3_sec_proxy_recv:193 Verifying thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    E/TC:0 0 ti_sci_get_response:123 Message not acknowledged
    E/TC:0 0 ti_sci_do_xfer:154 Error, access denied : -65535
    D/TC:0 0 do_init_calls:19 service_initcall level 3 tee_fs_init_key_manager()
    F/TC:0 0 k3_sec_proxy_send:131 Verifying the thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    F/TC:0 0 k3_sec_proxy_recv:193 Verifying thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    I/TC: HUK Initialized
    D/TC:0 0 do_init_calls:19 driver_initcall level 2 init_multi_core_panic_handler()
    D/TC:0 0 do_init_calls:19 driver_initcall level 2 mobj_init()
    D/TC:0 0 do_init_calls:19 driver_initcall level 2 default_mobj_init()
    D/TC:0 0 do_init_calls:19 driver_initcall level 3 gic_set_primary_done()
    I/TC: Primary CPU switching to normal world boot
                                                                                                                             
    U-Boot SPL 2023.04-dirty (Sep 19 2024 - 12:54:37 +0200)
    DEBUG preloader_console_init
    do_dt_magic, config detect : 1
    enter board detect
    ti_i2c_eeprom_am6_get_base enter
    ti_i2c_eeprom_am6_get enter
    enter ti_i2c_eeprom_am6_get debug
    DEBUG_0
    start debug ti_i2c_eeprom_get
    TEST_0
    uclass_get_device_by_seq
    enter uclass_find_device_by_seq
    before uclass_get
    uclass_get
    enter uclass_find
    get device tail : i2c@20000000
    device probe : i2c@20000000
    device probe : bus@f4000
    uclass_get
    enter uclass_find
    get device tail : power-controller
    device probe : power-controller
    uclass_get
    enter uclass_find
    get device tail : main-i2c0-pins-default
    device probe : main-i2c0-pins-default
    device probe : pinctrl@f4000
    device probe : bus@f4000
    uclass_pre_probe_device : pinctrl@f4000
    debug0 : pinctrl@f4000
    debug1 : pinctrl@f4000
    clk_set_defaults of dev : pinctrl@f4000
    clk_set_defaults debug0 dev : pinctrl@f4000
    clk_set_defaults debug1 dev : pinctrl@f4000
    debug2 : pinctrl@f4000
    debug3 : pinctrl@f4000
    debug4 : pinctrl@f4000
    uclass_post_probe_device : pinctrl@f4000
    uclass_pre_probe_device : main-i2c0-pins-default
    debug0 : main-i2c0-pins-default
    debug1 : main-i2c0-pins-default
    clk_set_defaults of dev : main-i2c0-pins-default
    clk_set_defaults debug0 dev : main-i2c0-pins-default
    clk_set_defaults debug1 dev : main-i2c0-pins-default
    debug2 : main-i2c0-pins-default
    uclass_post_probe_device : main-i2c0-pins-default
    uclass_pre_probe_device : i2c@20000000
    debug0 : i2c@20000000
    debug1 : i2c@20000000
    clk_set_defaults of dev : i2c@20000000
    clk_set_defaults debug0 dev : i2c@20000000
    clk_set_defaults debug1 dev : i2c@20000000
    debug2 : i2c@20000000
    debug3 : i2c@20000000
    debug4 : i2c@20000000
    uclass_post_probe_device : i2c@20000000
    TEST_0.5
    before i2c_probe_chip
    ti_i2c_eeprom_am6_get_base exit
    EEPROM not available at 0x50, trying to read at 0x51
    ti_i2c_eeprom_am6_get_base enter
    ti_i2c_eeprom_am6_get enter
    enter ti_i2c_eeprom_am6_get debug
    DEBUG_0
    start debug ti_i2c_eeprom_get
    TEST_0
    uclass_get_device_by_seq
    enter uclass_find_device_by_seq
    before uclass_get
    uclass_get
    enter uclass_find
    get device tail : i2c@20000000
    device probe : i2c@20000000
    TEST_0.5
    before i2c_probe_chip
    before i2c_get_chip
    uclass_get
    enter uclass_find
    uclass not find
    uclass_adddevice probe : generic_51
    device probe : i2c@20000000
    uclass_pre_probe_device : generic_51
    debug0 : generic_51
    debug2 : generic_51
    uclass_post_probe_device : generic_51
    TEST_1
    TEST_2
    TEST_3
    TEST_4
    DEBUG_2
    DEBUG_4
    uclass_get_device_by_seq
    enter uclass_find_device_by_seq
    before uclass_get
    uclass_get
    enter uclass_find
    get device tail : i2c@20000000
    device probe : i2c@20000000
    device probe : generic_51
    DEBUG_5
    DEBUG_6
    DEBUG_7
    DEBUG_8
    DEBUG_7
    DEBUG_8
    DEBUG_7
    DEBUG_8
    DEBUG_7
    exit
    ti_i2c_eeprom_am6_get_base exit
    do_board_detect done
    config cpu v7R status : 0
    uclass_get
    enter uclass_find
    get device tail : system-controller@44043000
    device probe : system-controller@44043000
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.6--v09.01.06 (Kool Koala)')
    Trying to boot from MMC2
    uclass_get_device_by_seq
    enter uclass_find_device_by_seq
    before uclass_get
    uclass_get
    enter uclass_find
    get device tail : mmc@fa00000
    device probe : mmc@fa00000
    device probe : bus@f4000
    uclass_get
    enter uclass_find
    get device tail : power-controller
    device probe : power-controller
    uclass_get
    enter uclass_find
    get device tail : main-mmc1-pins-default
    device probe : main-mmc1-pins-default
    device probe : pinctrl@f4000
    uclass_pre_probe_device : main-mmc1-pins-default
    debug0 : main-mmc1-pins-default
    debug1 : main-mmc1-pins-default
    clk_set_defaults of dev : main-mmc1-pins-default
    clk_set_defaults debug0 dev : main-mmc1-pins-default
    clk_set_defaults debug1 dev : main-mmc1-pins-default
    debug2 : main-mmc1-pins-default
    uclass_post_probe_device : main-mmc1-pins-default
    uclass_pre_probe_device : mmc@fa00000
    debug0 : mmc@fa00000
    debug1 : mmc@fa00000
    clk_set_defaults of dev : mmc@fa00000
    clk_set_defaults debug0 dev : mmc@fa00000
    clk_set_defaults debug1 dev : mmc@fa00000
    debug2 : mmc@fa00000
    debug3 : mmc@fa00000
    uclass_get
    enter uclass_find
    get device tail : clock-controller
    device probe : clock-controller
    uclass_get
    enter uclass_find
    device probe : chipid@14
    debug4 : mmc@fa00000
    uclass_post_probe_device : mmc@fa00000
    uclass_get
    enter uclass_find
    uclass_get
    enter uclass_find
    uclass_get
    enter uclass_find
    uclass_get
    enter uclass_find
    uclass_get
    enter uclass_find
    uclass_get
    enter uclass_find
    uclass_get
    enter uclass_find
    uclass_get
    enter uclass_find
    uclass_get
    enter uclass_find
    uclass_get
    enter uclass_find
    uclass_get
    enter uclass_find
    uclass_get
    enter uclass_find
    uclass_get
    enter uclass_find
    uclass_get
    enter uclass_find
    uclass_get
    enter uclass_find
    get device tail : system-controller@44043000
    device probe : system-controller@44043000
    Authentication passed
    uclass_get
    enter uclass_find
    get device tail : system-controller@44043000
    device probe : system-controller@44043000
    Authentication passed
                                                                                                                             
                                                                                                                             
    U-Boot 2024.04-ti-gfda88f8bcea3 (Jul 26 2024 - 11:00:12 +0000)
                                                                                                                             
    SoC:   AM64X SR2.0 HS-FS
    Model: Texas Instruments AM642 SK
    Board: AM64B-SKEVM rev A
    DRAM:  2 GiB
    Core:  89 devices, 31 uclasses, devicetree: separate
    NAND:  0 MiB
    MMC:   mmc@fa00000: 1
    Loading Environment from nowhere... OK
    In:    serial@2800000
    Out:   serial@2800000
    Err:   serial@2800000
    Failed to probe prueth driver
    Net:   eth0: ethernet@8000000port@1, eth1: ethernet@8000000port@2
    Hit any key to stop autoboot:  0
    =>

    Since, you are working TI board only so the issue should be reproducible. Maybe it is originating from the other images. Can you share those (SBL & the other appimage)?

  • You can find enclose the r5fss0_0 and r5fss0_1 files that is use but for me its not the problem because they are empty.

    I use the following command to build the appimage : 

    multicoreImageGen$ node multicoreImageGen.js --devID 55 --out app.appimage ../../../applications/r5fss0-0_freertos/ti-arm-clang/ipc_rpmsg_echo_linux.release.rprc@4 ../../../applications/r5fss0-1_freertos/ti-arm-clang/ipc_rpmsg_echo_linux.release.rprc@5

    The problem is probably in the SBL, but I dont know where.

    In your previous answer, is the SBL loaded in OSPI ?

    In my case I load SBL in OSPI by using UART with the command : 

    boot$ python3 uart_uniflash.py -p /dev/ttyUSB1 --cfg=/home/baptiste/Documents/AM64x/TEST_ZONE/applications/sbl_ospiFlash/default_sd_sbl.cfg

    then I set the boot pins to boot on OSPI.firmwares.zip

  • I have identified one memory conflict. The load addresses of ATF binary (Linux Appimage) & gAppImageBuf (SBL_SD) are 0x701A0000 and 0x70180000. In case the app size is greater than 128KB, the gAppImageBuf will be overwritten by the app_linux load thus corrupting the buffer.

    While all the cores RPRC images are loaded before app_linux load, the R5FSS0-0 core RPRC is loaded at the very last so the corruption of the gAppImageBuf buffer holding the app can be problematic.

    So, can you once reallocate the gAppImageBuf & try booting?

    The buffer may be allocated to the already created DDR memory region by decreasing the max size of app_linux to 4MB.

    #define BOOTLOADER_APPIMAGE_LINUX_MAX_FILE_SIZE (0x400000)

  • While the previous finding is a point of concern, the issue is supposedly coming from the GTC. The SBL_SD doesn't have the GTC enabled while the SBL_OSPI_LINUX does have this enabled.

    Please add the GTC module in the SBL_SD Sysconfig then you should not see the issue. I have tested the same successfully!!

  • Thanks a lot, that was my mistake ! Enable GTC solve the problem.

    Have a good day !

  • I'm sorry but I have a new issue, probably due to an error in the configurations files but I cant find where I forgot something.

    After enabling GTC my boot log are : 

    DMSC Firmware Version 9.1.6--v09.01.06 (Kool Koala)
    DMSC Firmware revision 0x9
    DMSC ABI revision 3.1
    
    Files read from sd card
    Multicore image parsing is OK
    ParseAndLoad 0
    ParseAndLoad 1
    ParseAndLoad 2
    ParseAndLoad 3
    ParseAndLoad 4
    ParseAndLoad 5
    Linux app image parsing is OK
    [BOOTLOADER_PROFILE] Boot Media       : SD Card
    [BOOTLOADER_PROFILE] Boot Image Size  : 990 KB
    [BOOTLOADER_PROFILE] Cores present    :
    r5f0-0
    r5f0-1
    a530-0
    [BOOTLOADER PROFILE] SYSFW init                       :      12161us
    [BOOTLOADER PROFILE] System_init                      :      30660us
    [BOOTLOADER PROFILE] Drivers_open                     :     137587us
    [BOOTLOADER PROFILE] Board_driversOpen                :       3015us
    [BOOTLOADER PROFILE] Sciclient Get Version            :       9913us
    [BOOTLOADER PROFILE] File read from SD card           :      89495us
    [BOOTLOADER PROFILE] CPU load                         :       8659us
    [BOOTLOADER_PROFILE] SBL Total Time Taken             :     372049us
    
    Image loading done, switching to application ...
    NOTICEE:  RBLR31: Ov2R.10:.0(re leaBse):ov2.o10.0-367-g00f1ec6b87-dirty
    NOTICE:  BL31: Built : 16:09:05, Feb  9 2024
    NOTICE:  Upgrade Firmwares for Power off functionality
    D/TC:0   plat_get_aslr_seed:112 Warning: no ASLR seed
    D/TC:0   add_phys_mem:750 VCORE_UNPG_RX_PA type TEE_RAM_RX 0x9e800000 size 0x00075000
    D/TC:0   add_phys_mem:750 VCORE_UNPG_RW_PA type TEE_RAM_RW 0x9e875000 size 0x0018b000
    D/TC:0   add_phys_mem:750 ta_base type TA_RAM 0x9ea00000 size 0x01200000
    D/TC:0   add_phys_mem:750 SEC_PROXY_RT_BASE type IO_SEC 0x4a600000 size 0x00200000
    D/TC:0   add_phys_mem:750 SEC_PROXY_SCFG_BASE type IO_SEC 0x4a400000 size 0x00200000
    D/TC:0   merge_mmaps:703 Merging 0x4a600000..0x4a7fffff and 0x4a400000..0x4a5fffff
    D/TC:0   add_phys_mem:750 SEC_PROXY_DATA_BASE type IO_SEC 0x4d000000 size 0x00200000
    D/TC:0   add_phys_mem:750 CONSOLE_UART_BASE type IO_NSEC 0x02800000 size 0x00200000
    D/TC:0   add_phys_mem:750 GICD_BASE type IO_SEC 0x01800000 size 0x00200000
    D/TC:0   add_phys_mem:750 GICC_BASE type IO_SEC 0x01800000 size 0x00200000
    D/TC:0   merge_mmaps:703 Merging 0x1800000..0x19fffff and 0x1800000..0x19fffff
    D/TC:0   add_phys_mem:750 TEE_SHMEM_START type NSEC_SHM 0x9fc00000 size 0x00400000
    D/TC:0   add_va_space:794 type RES_VASPACE size 0x00a00000
    D/TC:0   add_va_space:794 type SHM_VASPACE size 0x02000000
    D/TC:0   dump_mmap_table:921 type NSEC_SHM     va 0x99800000..0x99bfffff pa 0x9fc00000..0x9fffffff size 0x0040)
    D/TC:0   dump_mmap_table:921 type TA_RAM       va 0x99c00000..0x9adfffff pa 0x9ea00000..0x9fbfffff size 0x0120)
    D/TC:0   dump_mmap_table:921 type IO_SEC       va 0x9b000000..0x9b1fffff pa 0x4d000000..0x4d1fffff size 0x0020)
    D/TC:0   dump_mmap_table:921 type IO_SEC       va 0x9b200000..0x9b5fffff pa 0x4a400000..0x4a7fffff size 0x0040)
    D/TC:0   dump_mmap_table:921 type IO_NSEC      va 0x9b600000..0x9b7fffff pa 0x02800000..0x029fffff size 0x0020)
    D/TC:0   dump_mmap_table:921 type IO_SEC       va 0x9b800000..0x9b9fffff pa 0x01800000..0x019fffff size 0x0020)
    D/TC:0   dump_mmap_table:921 type RES_VASPACE  va 0x9ba00000..0x9c3fffff pa 0x00000000..0x009fffff size 0x00a0)
    D/TC:0   dump_mmap_table:921 type SHM_VASPACE  va 0x9c600000..0x9e5fffff pa 0x00000000..0x01ffffff size 0x0200)
    D/TC:0   dump_mmap_table:921 type TEE_RAM_RX   va 0x9e800000..0x9e874fff pa 0x9e800000..0x9e874fff size 0x0007)
    D/TC:0   dump_mmap_table:921 type TEE_RAM_RW   va 0x9e875000..0x9e9fffff pa 0x9e875000..0x9e9fffff size 0x0018)
    D/TC:0   core_mmu_xlat_table_alloc:527 xlat tables used 1 / 8
    D/TC:0   core_mmu_xlat_table_alloc:527 xlat tables used 2 / 8
    I/TC:
    I/TC: OP-TEE version custom: 4.3.0-125-g55a4d8393-dev (gcc version 11.3.1 20220712 (Arm GNU Toolchain 11.3.Rel4
    I/TC: WARNING: This OP-TEE configuration might be insecure!
    I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
    I/TC: Primary CPU initializing
    D/TC:0 0 boot_init_primary_late:1011 Executing at offset 0 with virtual load address 0x9e800000
    I/TC: GIC redistributor base address not provided
    I/TC: Assuming default GIC group status and modifier
    D/TC:0 0 do_init_calls:19 preinitcall level 2 mobj_mapped_shm_init()
    D/TC:0 0 mobj_mapped_shm_init:467 Shared memory address range: 9c600000, 9e600000
    D/TC:0 0 do_init_calls:19 early_initcall level 1 teecore_init_pub_ram()
    D/TC:0 0 do_init_calls:19 early_initcall level 2 init_ti_sci()
    D/TC:0 0 k3_sec_proxy_init:243 tx_thread: 11, rx_thread: 10
    F/TC:0 0 k3_sec_proxy_send:131 Verifying the thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    F/TC:0 0 k3_sec_proxy_recv:193 Verifying thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    I/TC: SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.6--v09.01.06 (Kool Koala)')
    D/TC:0 0 do_init_calls:19 service_initcall level 1 tee_cryp_init()
    D/TC:0 0 do_init_calls:19 service_initcall level 2 check_ta_store()
    D/TC:0 0 check_ta_store:449 TA store: "Secure Storage TA"
    D/TC:0 0 check_ta_store:449 TA store: "REE"
    D/TC:0 0 do_init_calls:19 service_initcall level 2 verify_pseudo_tas_conformance()
    D/TC:0 0 do_init_calls:19 service_initcall level 3 secure_boot_information()
    F/TC:0 0 k3_sec_proxy_send:131 Verifying the thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    F/TC:0 0 k3_sec_proxy_recv:193 Verifying thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    E/TC:0 0 ti_sci_get_response:123 Message not acknowledged
    E/TC:0 0 ti_sci_do_xfer:154 Error, access denied : -65535
    F/TC:0 0 k3_sec_proxy_send:131 Verifying the thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    F/TC:0 0 k3_sec_proxy_recv:193 Verifying thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    E/TC:0 0 ti_sci_get_response:123 Message not acknowledged
    E/TC:0 0 ti_sci_do_xfer:154 Error, access denied : -65535
    D/TC:0 0 do_init_calls:19 service_initcall level 3 tee_fs_init_key_manager()
    F/TC:0 0 k3_sec_proxy_send:131 Verifying the thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    F/TC:0 0 k3_sec_proxy_recv:193 Verifying thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    I/TC: HUK Initialized
    D/TC:0 0 do_init_calls:19 driver_initcall level 2 init_multi_core_panic_handler()
    D/TC:0 0 do_init_calls:19 driver_initcall level 2 mobj_init()
    D/TC:0 0 do_init_calls:19 driver_initcall level 2 default_mobj_init()
    D/TC:0 0 do_init_calls:19 driver_initcall level 3 gic_set_primary_done()
    I/TC: Primary CPU switching to normal world boot
    
    U-Boot SPL 2023.04-dirty (Sep 24 2024 - 11:07:11 +0200)
    DEBUG preloader_console_init
    do_dt_magic, config detect : 1
    enter board detect
    ti_i2c_eeprom_am6_get_base enter
    ti_i2c_eeprom_am6_get enter
    enter ti_i2c_eeprom_am6_get debug
    DEBUG_0
    before i2c_probe_chip
    ti_i2c_eeprom_am6_get_base exit
    EEPROM not available at 0x50, trying to read at 0x51
    ti_i2c_eeprom_am6_get_base enter
    ti_i2c_eeprom_am6_get enter
    enter ti_i2c_eeprom_am6_get debug
    DEBUG_0
    before i2c_probe_chip
    before i2c_get_chip
    DEBUG_2
    DEBUG_4
    DEBUG_5
    DEBUG_6
    DEBUG_7
    DEBUG_8
    DEBUG_7
    DEBUG_8
    DEBUG_7
    DEBUG_8
    DEBUG_7
    exit
    ti_i2c_eeprom_am6_get_base exit
    do_board_detect done
    config cpu v7R status : 0
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.6--v09.01.06 (Kool Koala)')
    Trying to boot from SPI
    Authentication passed
    Authentication passed
    Authentication passed

    In this situation the spl try to boot from SPI but my file are on SD card so MMC2 boot is required.

    So I add :

    static Pinmux_PerCfg_t gPinMuxMMCSDCfg[] = {
        /* MyMMC11 -> MMC1_CMD -> J19 */
        {
            PIN_MMC1_CMD, PIN_MODE(0) | \
            ((PIN_PULL_DIRECTION | PIN_INPUT_ENABLE) & (~PIN_PULL_DISABLE))
        },
        /* MyMMC11 -> MMC1_CLK -> L20 */
        {
            PIN_MMC1_CLK, PIN_MODE(0) | \
            ((PIN_PULL_DISABLE | PIN_INPUT_ENABLE) & (~PIN_PULL_DIRECTION))
        },
        /* MyMMC11 -> MMC1_CLKLB */
        {
            PIN_MMC1_CLKLB, PIN_MODE(0) | \
            ((PIN_PULL_DIRECTION | PIN_INPUT_ENABLE) & (~PIN_PULL_DISABLE))
        },
        /* MyMMC11 -> MMC1_DAT0 -> K21 */
        {
            PIN_MMC1_DAT0, PIN_MODE(0) | \
            ((PIN_PULL_DIRECTION | PIN_INPUT_ENABLE) & (~PIN_PULL_DISABLE))
        },
        /* MyMMC11 -> MMC1_DAT1 -> L21 */
        {
            PIN_MMC1_DAT1, PIN_MODE(0) | \
            ((PIN_PULL_DIRECTION | PIN_INPUT_ENABLE) & (~PIN_PULL_DISABLE))
        },
        /* MyMMC11 -> MMC1_DAT2 -> K19 */
        {
            PIN_MMC1_DAT2, PIN_MODE(0) | \
            ((PIN_PULL_DIRECTION | PIN_INPUT_ENABLE) & (~PIN_PULL_DISABLE))
        },
        /* MyMMC11 -> MMC1_DAT3 -> K18 */
        {
            PIN_MMC1_DAT3, PIN_MODE(0) | \
            ((PIN_PULL_DIRECTION | PIN_INPUT_ENABLE) & (~PIN_PULL_DISABLE))
        },
        /* MyMMC11 -> MMC1_SDCD -> D19 */
        {
            PIN_MMC1_SDCD, PIN_MODE(0) | \
            ((PIN_PULL_DIRECTION | PIN_INPUT_ENABLE) & (~PIN_PULL_DISABLE))
        },
    
        {PINMUX_END, PINMUX_END}
    };

    and I change : 

    SOC_setDevStat(0x0243);
    Pinmux_config(gPinMuxMMCSDCfg, PINMUX_DOMAIN_ID_MAIN);
    SOC_unlockAllMMR();
    status = Bootloader_runCpu(bootHandle_Linux, &bootImageInfo_Linux.cpuInfo[CSL_CORE_ID_A53SS0_0]);
    Bootloader_close(bootHandle_Linux);

    in my SBL code.

    After these changes the boot process seems to be mmc power domain on :

    DMSC Firmware Version 9.1.6--v09.01.06 (Kool Koala)
    DMSC Firmware revision 0x9
    DMSC ABI revision 3.1
    
    Files read from sd card
    Multicore image parsing is OK
    ParseAndLoad 0
    ParseAndLoad 1
    ParseAndLoad 2
    ParseAndLoad 3
    ParseAndLoad 4
    ParseAndLoad 5
    Linux app image parsing is OK
    [BOOTLOADER_PROFILE] Boot Media       : SD Card
    [BOOTLOADER_PROFILE] Boot Image Size  : 990 KB
    [BOOTLOADER_PROFILE] Cores present    :
    r5f0-0
    r5f0-1
    a530-0
    [BOOTLOADER PROFILE] SYSFW init                       :      12149us
    [BOOTLOADER PROFILE] System_init                      :      30733us
    [BOOTLOADER PROFILE] Drivers_open                     :     156768us
    [BOOTLOADER PROFILE] Board_driversOpen                :       3469us
    [BOOTLOADER PROFILE] Sciclient Get Version            :       9913us
    [BOOTLOADER PROFILE] File read from SD card           :      90236us
    [BOOTLOADER PROFILE] CPU load                         :       8667us
    [BOOTLOADER_PROFILE] SBL Total Time Taken             :     392249us
    
    Image loading done, switching to application ...
    NOTICEE: R BL3R1: Ov2R.10.:0( relBeasoe):vo2.10.0-367-g00f1ec6b87-dirty
    NOTICE:  BL31: Built : 16:09:05, Feb  9 2024
    NOTICE:  Upgrade Firmwares for Power off functionality
    D/TC:0   plat_get_aslr_seed:112 Warning: no ASLR seed
    D/TC:0   add_phys_mem:750 VCORE_UNPG_RX_PA type TEE_RAM_RX 0x9e800000 size 0x00075000
    D/TC:0   add_phys_mem:750 VCORE_UNPG_RW_PA type TEE_RAM_RW 0x9e875000 size 0x0018b000
    D/TC:0   add_phys_mem:750 ta_base type TA_RAM 0x9ea00000 size 0x01200000
    D/TC:0   add_phys_mem:750 SEC_PROXY_RT_BASE type IO_SEC 0x4a600000 size 0x00200000
    D/TC:0   add_phys_mem:750 SEC_PROXY_SCFG_BASE type IO_SEC 0x4a400000 size 0x00200000
    D/TC:0   merge_mmaps:703 Merging 0x4a600000..0x4a7fffff and 0x4a400000..0x4a5fffff
    D/TC:0   add_phys_mem:750 SEC_PROXY_DATA_BASE type IO_SEC 0x4d000000 size 0x00200000
    D/TC:0   add_phys_mem:750 CONSOLE_UART_BASE type IO_NSEC 0x02800000 size 0x00200000
    D/TC:0   add_phys_mem:750 GICD_BASE type IO_SEC 0x01800000 size 0x00200000
    D/TC:0   add_phys_mem:750 GICC_BASE type IO_SEC 0x01800000 size 0x00200000
    D/TC:0   merge_mmaps:703 Merging 0x1800000..0x19fffff and 0x1800000..0x19fffff
    D/TC:0   add_phys_mem:750 TEE_SHMEM_START type NSEC_SHM 0x9fc00000 size 0x00400000
    D/TC:0   add_va_space:794 type RES_VASPACE size 0x00a00000
    D/TC:0   add_va_space:794 type SHM_VASPACE size 0x02000000
    D/TC:0   dump_mmap_table:921 type NSEC_SHM     va 0x99800000..0x99bfffff pa 0x9fc00000..0x9fffffff size 0x0040)
    D/TC:0   dump_mmap_table:921 type TA_RAM       va 0x99c00000..0x9adfffff pa 0x9ea00000..0x9fbfffff size 0x0120)
    D/TC:0   dump_mmap_table:921 type IO_SEC       va 0x9b000000..0x9b1fffff pa 0x4d000000..0x4d1fffff size 0x0020)
    D/TC:0   dump_mmap_table:921 type IO_SEC       va 0x9b200000..0x9b5fffff pa 0x4a400000..0x4a7fffff size 0x0040)
    D/TC:0   dump_mmap_table:921 type IO_NSEC      va 0x9b600000..0x9b7fffff pa 0x02800000..0x029fffff size 0x0020)
    D/TC:0   dump_mmap_table:921 type IO_SEC       va 0x9b800000..0x9b9fffff pa 0x01800000..0x019fffff size 0x0020)
    D/TC:0   dump_mmap_table:921 type RES_VASPACE  va 0x9ba00000..0x9c3fffff pa 0x00000000..0x009fffff size 0x00a0)
    D/TC:0   dump_mmap_table:921 type SHM_VASPACE  va 0x9c600000..0x9e5fffff pa 0x00000000..0x01ffffff size 0x0200)
    D/TC:0   dump_mmap_table:921 type TEE_RAM_RX   va 0x9e800000..0x9e874fff pa 0x9e800000..0x9e874fff size 0x0007)
    D/TC:0   dump_mmap_table:921 type TEE_RAM_RW   va 0x9e875000..0x9e9fffff pa 0x9e875000..0x9e9fffff size 0x0018)
    D/TC:0   core_mmu_xlat_table_alloc:527 xlat tables used 1 / 8
    D/TC:0   core_mmu_xlat_table_alloc:527 xlat tables used 2 / 8
    I/TC:
    I/TC: OP-TEE version custom: 4.3.0-125-g55a4d8393-dev (gcc version 11.3.1 20220712 (Arm GNU Toolchain 11.3.Rel4
    I/TC: WARNING: This OP-TEE configuration might be insecure!
    I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
    I/TC: Primary CPU initializing
    D/TC:0 0 boot_init_primary_late:1011 Executing at offset 0 with virtual load address 0x9e800000
    I/TC: GIC redistributor base address not provided
    I/TC: Assuming default GIC group status and modifier
    D/TC:0 0 do_init_calls:19 preinitcall level 2 mobj_mapped_shm_init()
    D/TC:0 0 mobj_mapped_shm_init:467 Shared memory address range: 9c600000, 9e600000
    D/TC:0 0 do_init_calls:19 early_initcall level 1 teecore_init_pub_ram()
    D/TC:0 0 do_init_calls:19 early_initcall level 2 init_ti_sci()
    D/TC:0 0 k3_sec_proxy_init:243 tx_thread: 11, rx_thread: 10
    F/TC:0 0 k3_sec_proxy_send:131 Verifying the thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    F/TC:0 0 k3_sec_proxy_recv:193 Verifying thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    I/TC: SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.6--v09.01.06 (Kool Koala)')
    D/TC:0 0 do_init_calls:19 service_initcall level 1 tee_cryp_init()
    D/TC:0 0 do_init_calls:19 service_initcall level 2 check_ta_store()
    D/TC:0 0 check_ta_store:449 TA store: "Secure Storage TA"
    D/TC:0 0 check_ta_store:449 TA store: "REE"
    D/TC:0 0 do_init_calls:19 service_initcall level 2 verify_pseudo_tas_conformance()
    D/TC:0 0 do_init_calls:19 service_initcall level 3 secure_boot_information()
    F/TC:0 0 k3_sec_proxy_send:131 Verifying the thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    F/TC:0 0 k3_sec_proxy_recv:193 Verifying thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    E/TC:0 0 ti_sci_get_response:123 Message not acknowledged
    E/TC:0 0 ti_sci_do_xfer:154 Error, access denied : -65535
    F/TC:0 0 k3_sec_proxy_send:131 Verifying the thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    F/TC:0 0 k3_sec_proxy_recv:193 Verifying thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    E/TC:0 0 ti_sci_get_response:123 Message not acknowledged
    E/TC:0 0 ti_sci_do_xfer:154 Error, access denied : -65535
    D/TC:0 0 do_init_calls:19 service_initcall level 3 tee_fs_init_key_manager()
    F/TC:0 0 k3_sec_proxy_send:131 Verifying the thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    F/TC:0 0 k3_sec_proxy_recv:193 Verifying thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    I/TC: HUK Initialized
    D/TC:0 0 do_init_calls:19 driver_initcall level 2 init_multi_core_panic_handler()
    D/TC:0 0 do_init_calls:19 driver_initcall level 2 mobj_init()
    D/TC:0 0 do_init_calls:19 driver_initcall level 2 default_mobj_init()
    D/TC:0 0 do_init_calls:19 driver_initcall level 3 gic_set_primary_done()
    I/TC: Primary CPU switching to normal world boot
    
    U-Boot SPL 2023.04-dirty (Sep 24 2024 - 13:24:18 +0200)
    DEBUG preloader_console_init
    do_dt_magic, config detect : 1
    enter board detect
    ti_i2c_eeprom_am6_get_base enter
    ti_i2c_eeprom_am6_get enter
    enter ti_i2c_eeprom_am6_get debug
    DEBUG_0
    probe power-controller result : 0
    probe main-i2c0-pins-default result : 0
    probe i2c@20000000 result : 0
    before i2c_probe_chip
    ti_i2c_eeprom_am6_get_base exit
    EEPROM not available at 0x50, trying to read at 0x51
    ti_i2c_eeprom_am6_get_base enter
    ti_i2c_eeprom_am6_get enter
    enter ti_i2c_eeprom_am6_get debug
    DEBUG_0
    probe i2c@20000000 result : 0
    before i2c_probe_chip
    before i2c_get_chip
    DEBUG_2
    DEBUG_4
    probe i2c@20000000 result : 0
    DEBUG_5
    DEBUG_6
    DEBUG_7
    DEBUG_8
    DEBUG_7
    DEBUG_8
    DEBUG_7
    DEBUG_8
    DEBUG_7
    exit
    ti_i2c_eeprom_am6_get_base exit
    do_board_detect done
    config cpu v7R status : 0
    probe system-controller@44043000 result : 0
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.6--v09.01.06 (Kool Koala)')
    Trying to boot from MMC2
    CONFIG_IS_ENABLED(DM_MMC)
    probe power-controller result : 0
    ti_sci system-controller@44043000: Message not acknowledgedti-sci-pm-domains power-controller: ti_sci_power_do)
    probe mmc@fa00000 result : -19
    find device result : 0
    probe power-controller result : 0
    ti_sci system-controller@44043000: Message not acknowledgedti-sci-pm-domains power-controller: ti_sci_power_do)
    probe mmc@fa00000 result : -19
    uclass get device tail result : -19
    uclass_get_device ret : -19
    spl: could not initialize mmc. error: -19
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board ###

    There is a special configuration to set in blob config ? what exactly are the pm and rm config ?

    Best regards,

    Baptiste

  • The A53 SPL boots the A53 U-Boot from the interface determined by the boot mode pins. So, I think you have put SBL_SD into OSPI and sets the bootmode to OSPI. This makes the A53 SPL boots the A53 U-Boot from the SPI.

    Please set the bootmode to SD card & keep the SBL_SD as tiboot3.bin in the SD card. Everything will then boot fine.

    Starting SD Bootloader ...
                                                                                                                             
    DMSC Firmware Version 9.1.6--v09.01.06 (Kool Koala)
    DMSC Firmware revision 0x9
    DMSC ABI revision 3.1
                                                                                                                             
    Files read from sd card
    Multicore image parsing is OK
    Linux app image parsing is OK
    [BOOTLOADER_PROFILE] Boot Media       : SD Card
    [BOOTLOADER_PROFILE] Boot Image Size  : 991 KB
    [BOOTLOADER_PROFILE] Cores present    :
    m4f0-0
    r5f1-0
    r5f1-1
    r5f0-0
    r5f0-1
    a530-0
    [BOOTLOADER PROFILE] SYSFW init                       :      12462us
    [BOOTLOADER PROFILE] System_init                      :     348860us
    [BOOTLOADER PROFILE] Drivers_open                     :     112080us
    [BOOTLOADER PROFILE] Board_driversOpen                :       2868us
    [BOOTLOADER PROFILE] Sciclient Get Version            :      10027us
    [BOOTLOADER PROFILE] File read from SD card           :     115660us
    [BOOTLOADER PROFILE] CPU load                         :      47112us
    [BOOTLOADER_PROFILE] SBL Total Time Taken             :     728848us
                                                                                                                             
    Image loading done, switching to application ...
    NOTICE:  BL31: v2.10.0(relEeasRe):vR2.1O0.0-367-g00f1eRc6b:87-dirty
    NOTICE:  BL31: Built : 16:09:05, Feb  9 2024
    NOTICE:  Upgrade Firmwares for Power off functionality
    D/TC:0   plat_get_aslr_seed:112 Warning: no ASLR seed
    D/TC:0   add_phys_mem:750 VCORE_UNPG_RX_PA type TEE_RAM_RX 0x9e800000 size 0x00075000
    D/TC:0   add_phys_mem:750 VCORE_UNPG_RW_PA type TEE_RAM_RW 0x9e875000 size 0x0018b000
    D/TC:0   add_phys_mem:750 ta_base type TA_RAM 0x9ea00000 size 0x01200000
    D/TC:0   add_phys_mem:750 SEC_PROXY_RT_BASE type IO_SEC 0x4a600000 size 0x00200000
    D/TC:0   add_phys_mem:750 SEC_PROXY_SCFG_BASE type IO_SEC 0x4a400000 size 0x00200000
    D/TC:0   merge_mmaps:703 Merging 0x4a600000..0x4a7fffff and 0x4a400000..0x4a5fffff
    D/TC:0   add_phys_mem:750 SEC_PROXY_DATA_BASE type IO_SEC 0x4d000000 size 0x00200000
    D/TC:0   add_phys_mem:750 CONSOLE_UART_BASE type IO_NSEC 0x02800000 size 0x00200000
    D/TC:0   add_phys_mem:750 GICD_BASE type IO_SEC 0x01800000 size 0x00200000
    D/TC:0   add_phys_mem:750 GICC_BASE type IO_SEC 0x01800000 size 0x00200000
    D/TC:0   merge_mmaps:703 Merging 0x1800000..0x19fffff and 0x1800000..0x19fffff
    D/TC:0   add_phys_mem:750 TEE_SHMEM_START type NSEC_SHM 0x9fc00000 size 0x00400000
    D/TC:0   add_va_space:794 type RES_VASPACE size 0x00a00000
    D/TC:0   add_va_space:794 type SHM_VASPACE size 0x02000000
    D/TC:0   dump_mmap_table:921 type NSEC_SHM     va 0x99800000..0x99bfffff pa 0x9fc00000..0x9fffffff size 0x00400000 (pgdir)
    D/TC:0   dump_mmap_table:921 type TA_RAM       va 0x99c00000..0x9adfffff pa 0x9ea00000..0x9fbfffff size 0x01200000 (pgdir)
    D/TC:0   dump_mmap_table:921 type IO_SEC       va 0x9b000000..0x9b1fffff pa 0x4d000000..0x4d1fffff size 0x00200000 (pgdir)
    D/TC:0   dump_mmap_table:921 type IO_SEC       va 0x9b200000..0x9b5fffff pa 0x4a400000..0x4a7fffff size 0x00400000 (pgdir)
    D/TC:0   dump_mmap_table:921 type IO_NSEC      va 0x9b600000..0x9b7fffff pa 0x02800000..0x029fffff size 0x00200000 (pgdir)
    D/TC:0   dump_mmap_table:921 type IO_SEC       va 0x9b800000..0x9b9fffff pa 0x01800000..0x019fffff size 0x00200000 (pgdir)
    D/TC:0   dump_mmap_table:921 type RES_VASPACE  va 0x9ba00000..0x9c3fffff pa 0x00000000..0x009fffff size 0x00a00000 (pgdir)
    D/TC:0   dump_mmap_table:921 type SHM_VASPACE  va 0x9c600000..0x9e5fffff pa 0x00000000..0x01ffffff size 0x02000000 (pgdir)
    D/TC:0   dump_mmap_table:921 type TEE_RAM_RX   va 0x9e800000..0x9e874fff pa 0x9e800000..0x9e874fff size 0x00075000 (smallpg)
    D/TC:0   dump_mmap_table:921 type TEE_RAM_RW   va 0x9e875000..0x9e9fffff pa 0x9e875000..0x9e9fffff size 0x0018b000 (smallpg)
    D/TC:0   core_mmu_xlat_table_alloc:527 xlat tables used 1 / 8
    D/TC:0   core_mmu_xlat_table_alloc:527 xlat tables used 2 / 8
    I/TC:
    I/TC: OP-TEE version custom: 4.3.0-125-g55a4d8393-dev (gcc version 11.3.1 20220712 (Arm GNU Toolchain 11.3.Rel1)) #1 Wed Sep 18 09:56:11 UTC 2024 aarch64
    I/TC: WARNING: This OP-TEE configuration might be insecure!
    I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
    I/TC: Primary CPU initializing
    D/TC:0 0 boot_init_primary_late:1011 Executing at offset 0 with virtual load address 0x9e800000
    I/TC: GIC redistributor base address not provided
    I/TC: Assuming default GIC group status and modifier
    D/TC:0 0 do_init_calls:19 preinitcall level 2 mobj_mapped_shm_init()
    D/TC:0 0 mobj_mapped_shm_init:467 Shared memory address range: 9c600000, 9e600000
    D/TC:0 0 do_init_calls:19 early_initcall level 1 teecore_init_pub_ram()
    D/TC:0 0 do_init_calls:19 early_initcall level 2 init_ti_sci()
    D/TC:0 0 k3_sec_proxy_init:243 tx_thread: 11, rx_thread: 10
    F/TC:0 0 k3_sec_proxy_send:131 Verifying the thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    F/TC:0 0 k3_sec_proxy_recv:193 Verifying thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    I/TC: SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.6--v09.01.06 (Kool Koala)')
    D/TC:0 0 do_init_calls:19 service_initcall level 1 tee_cryp_init()
    D/TC:0 0 do_init_calls:19 service_initcall level 2 check_ta_store()
    D/TC:0 0 check_ta_store:449 TA store: "Secure Storage TA"
    D/TC:0 0 check_ta_store:449 TA store: "REE"
    D/TC:0 0 do_init_calls:19 service_initcall level 2 verify_pseudo_tas_conformance()
    D/TC:0 0 do_init_calls:19 service_initcall level 3 secure_boot_information()
    F/TC:0 0 k3_sec_proxy_send:131 Verifying the thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    F/TC:0 0 k3_sec_proxy_recv:193 Verifying thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    E/TC:0 0 ti_sci_get_response:123 Message not acknowledged
    E/TC:0 0 ti_sci_do_xfer:154 Error, access denied : -65535
    F/TC:0 0 k3_sec_proxy_send:131 Verifying the thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    F/TC:0 0 k3_sec_proxy_recv:193 Verifying thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    E/TC:0 0 ti_sci_get_response:123 Message not acknowledged
    E/TC:0 0 ti_sci_do_xfer:154 Error, access denied : -65535
    D/TC:0 0 do_init_calls:19 service_initcall level 3 tee_fs_init_key_manager()
    F/TC:0 0 k3_sec_proxy_send:131 Verifying the thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    F/TC:0 0 k3_sec_proxy_recv:193 Verifying thread
    F/TC:0 0 k3_sec_proxy_verify_thread:71 Check for thread corruption
    F/TC:0 0 k3_sec_proxy_verify_thread:88 Check for thread direction
    F/TC:0 0 k3_sec_proxy_verify_thread:100 Check for thread queue
    F/TC:0 0 k3_sec_proxy_verify_thread:113 Success
    I/TC: HUK Initialized
    D/TC:0 0 do_init_calls:19 driver_initcall level 2 init_multi_core_panic_handler()
    D/TC:0 0 do_init_calls:19 driver_initcall level 2 mobj_init()
    D/TC:0 0 do_init_calls:19 driver_initcall level 2 default_mobj_init()
    D/TC:0 0 do_init_calls:19 driver_initcall level 3 gic_set_primary_done()
    I/TC: Primary CPU switching to normal world boot
                                                                                                                             
    U-Boot SPL 2023.04-dirty (Sep 19 2024 - 12:54:37 +0200)
    DEBUG preloader_console_init
    do_dt_magic, config detect : 1
    enter board detect
    ti_i2c_eeprom_am6_get_base enter
    ti_i2c_eeprom_am6_get enter
    enter ti_i2c_eeprom_am6_get debug
    DEBUG_0
    start debug ti_i2c_eeprom_get
    TEST_0
    uclass_get_device_by_seq
    enter uclass_find_device_by_seq
    before uclass_get
    uclass_get
    enter uclass_find
    get device tail : i2c@20000000
    device probe : i2c@20000000
    device probe : bus@f4000
    uclass_get
    enter uclass_find
    get device tail : power-controller
    device probe : power-controller
    uclass_get
    enter uclass_find
    get device tail : main-i2c0-pins-default
    device probe : main-i2c0-pins-default
    device probe : pinctrl@f4000
    device probe : bus@f4000
    uclass_pre_probe_device : pinctrl@f4000
    debug0 : pinctrl@f4000
    debug1 : pinctrl@f4000
    clk_set_defaults of dev : pinctrl@f4000
    clk_set_defaults debug0 dev : pinctrl@f4000
    clk_set_defaults debug1 dev : pinctrl@f4000
    debug2 : pinctrl@f4000
    debug3 : pinctrl@f4000
    debug4 : pinctrl@f4000
    uclass_post_probe_device : pinctrl@f4000
    uclass_pre_probe_device : main-i2c0-pins-default
    debug0 : main-i2c0-pins-default
    debug1 : main-i2c0-pins-default
    clk_set_defaults of dev : main-i2c0-pins-default
    clk_set_defaults debug0 dev : main-i2c0-pins-default
    clk_set_defaults debug1 dev : main-i2c0-pins-default
    debug2 : main-i2c0-pins-default
    uclass_post_probe_device : main-i2c0-pins-default
    uclass_pre_probe_device : i2c@20000000
    debug0 : i2c@20000000
    debug1 : i2c@20000000
    clk_set_defaults of dev : i2c@20000000
    clk_set_defaults debug0 dev : i2c@20000000
    clk_set_defaults debug1 dev : i2c@20000000
    debug2 : i2c@20000000
    debug3 : i2c@20000000
    debug4 : i2c@20000000
    uclass_post_probe_device : i2c@20000000
    TEST_0.5
    before i2c_probe_chip
    before i2c_get_chip
    uclass_get
    enter uclass_find
    uclass not find
    uclass_adddevice probe : generic_50
    device probe : i2c@20000000
    uclass_pre_probe_device : generic_50
    debug0 : generic_50
    debug2 : generic_50
    uclass_post_probe_device : generic_50
    TEST_1
    TEST_2
    TEST_3
    TEST_4
    DEBUG_2
    DEBUG_4
    uclass_get_device_by_seq
    enter uclass_find_device_by_seq
    before uclass_get
    uclass_get
    enter uclass_find
    get device tail : i2c@20000000
    device probe : i2c@20000000
    device probe : generic_50
    DEBUG_5
    DEBUG_6
    DEBUG_7
    DEBUG_8
    DEBUG_7
    DEBUG_8
    DEBUG_7
    DEBUG_8
    DEBUG_7
    exit
    ti_i2c_eeprom_am6_get_base exit
    do_board_detect done
    config cpu v7R status : 0
    uclass_get
    enter uclass_find
    get device tail : system-controller@44043000
    device probe : system-controller@44043000
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.6--v09.01.06 (Kool Koala)')
    uclass_get
    enter uclass_find
    device probe : gpio@38
    device probe : i2c@20000000
    uclass_pre_probe_device : gpio@38
    debug0 : gpio@38
    debug1 : gpio@38
    clk_set_defaults of dev : gpio@38
    clk_set_defaults debug0 dev : gpio@38
    clk_set_defaults debug1 dev : gpio@38
    debug2 : gpio@38
    debug3 : gpio@38
    debug4 : gpio@38
    uclass_post_probe_device : gpio@38
    uclass_get
    enter uclass_find
    Trying to boot from MMC2
    uclass_get_device_by_seq
    enter uclass_find_device_by_seq
    before uclass_get
    uclass_get
    enter uclass_find
    get device tail : mmc@fa00000
    device probe : mmc@fa00000
    device probe : bus@f4000
    uclass_get
    enter uclass_find
    get device tail : power-controller
    device probe : power-controller
    uclass_get
    enter uclass_find
    get device tail : main-mmc1-pins-default
    device probe : main-mmc1-pins-default
    device probe : pinctrl@f4000
    uclass_pre_probe_device : main-mmc1-pins-default
    debug0 : main-mmc1-pins-default
    debug1 : main-mmc1-pins-default
    clk_set_defaults of dev : main-mmc1-pins-default
    clk_set_defaults debug0 dev : main-mmc1-pins-default
    clk_set_defaults debug1 dev : main-mmc1-pins-default
    debug2 : main-mmc1-pins-default
    uclass_post_probe_device : main-mmc1-pins-default
    uclass_pre_probe_device : mmc@fa00000
    debug0 : mmc@fa00000
    debug1 : mmc@fa00000
    clk_set_defaults of dev : mmc@fa00000
    clk_set_defaults debug0 dev : mmc@fa00000
    clk_set_defaults debug1 dev : mmc@fa00000
    debug2 : mmc@fa00000
    debug3 : mmc@fa00000
    uclass_get
    enter uclass_find
    get device tail : clock-controller
    device probe : clock-controller
    uclass_get
    enter uclass_find
    device probe : chipid@14
    debug4 : mmc@fa00000
    uclass_post_probe_device : mmc@fa00000
    uclass_get
    enter uclass_find
    uclass_get
    enter uclass_find
    uclass_get
    enter uclass_find
    uclass_get
    enter uclass_find
    uclass_get
    enter uclass_find
    uclass_get
    enter uclass_find
    uclass_get
    enter uclass_find
    uclass_get
    enter uclass_find
    uclass_get
    enter uclass_find
    uclass_get
    enter uclass_find
    uclass_get
    enter uclass_find
    uclass_get
    enter uclass_find
    uclass_get
    enter uclass_find
    uclass_get
    enter uclass_find
    uclass_get
    enter uclass_find
    get device tail : system-controller@44043000
    device probe : system-controller@44043000
    Authentication passed
    uclass_get
    enter uclass_find
    get device tail : system-controller@44043000
    device probe : system-controller@44043000
    Authentication passed
    
    
    U-Boot 2024.04-ti-gfda88f8bcea3 (Jul 26 2024 - 11:00:12 +0000)
    
    SoC:   AM64X SR2.0 HS-FS
    Model: Texas Instruments AM642 EVM
    Board: AM64-GPEVM rev C
    DRAM:  2 GiB
    Core:  98 devices, 31 uclasses, devicetree: separate
    NAND:  0 MiB
    MMC:   mmc@fa10000: 0, mmc@fa00000: 1
    Loading Environment from nowhere... OK
    In:    serial@2800000
    Out:   serial@2800000
    Err:   serial@2800000
    ti_sci system-controller@44043000: Message not acknowledged
    ti-sci-pm-domains power-controller: ti_sci_power_domain_on: get_device(82) failed (-19)
    prueth icssg1-eth: error getting the pruss dev
    Failed to probe prueth driver
    Net:   eth0: ethernet@8000000port@1
    Hit any key to stop autoboot:  0
    => 

  • Thanks a lot, now I can reach u-boot !

    Best regards, 

    Baptiste