AM62A7: Load Programs from EMMC Boot1 in SBL

Part Number: AM62A7

Tool/software:

Hi TI Experts,

Customer is working on AM62A SDK9.2.

As we know we have EMMC boot 0 & boot 1, and we are using boot 0 to load the programs in SBL by default in our SDK.

Customer tries to change to using EMMC boot 1 to load the programs in SBL.

However, it seems they could not do that, the bootloader driver code will force to configure it to EMMC boot 0, if customer modifies it to 1, it will generate CPU release error.

Hence, customer wants to know if we have plan to support using EMMC boot 1 to load the programs in SBL, and how could we do that?

Many Thanks,

Kevin

  • Hello,

    Hence, customer wants to know if we have plan to support using EMMC boot 1 to load the programs in SBL, and how could we do that?

    Currently, there is no plan to support it. The best I can do now is check the customer's changes for any mistakes.

    Can you ask the customer to share the changes they have done till now & the boot logs as well for better understanding of the issue?

    Thanks! 

  • I want to switch the EMMC BOOT partition in the SBL user application by MMCSD_enableBootPartition function, but I find that the switch is failed.

    However MMCSDRaw_imgRead function is forced to EMMC BOOT0.  the MMCSDRaw_imgRead function code following:

    static int32_t MMCSDRaw_imgRead(void *dst, uint32_t len, void *args)
    {
        int32_t status = SystemP_SUCCESS;
    
        Bootloader_MmcsdArgs *MMCSDArgs = (Bootloader_MmcsdArgs *)args;
        MMCSD_Handle handle = MMCSD_getHandle(MMCSDArgs->MMCSDIndex);
    
        if(handle == NULL)
    	{
    	   status = SystemP_FAILURE;
    	}
    
        if(status == SystemP_SUCCESS)
        {
            status = MMCSD_enableBootPartition(handle, 1);
    
            if(status != SystemP_SUCCESS)
            {
    
            }
            else
            {
                status = Bootloader_MmcsdRaw_readFromOffset(handle, dst, len, MMCSDArgs->curOffset);
    
                if(status != SystemP_SUCCESS)
                {
                    DebugP_log("[MMCSDRaw_imgRead] Failed \r\n");
                }
                else
                {
                    DebugP_log("[MMCSDRaw_imgRead] Sucess \r\n");
                    CacheP_wb(dst, len, CacheP_TYPE_ALL);
                    MMCSDArgs->curOffset += len;
                }
            }
        }
    
        return status;
    }

     I try deletd the line of 

    status = MMCSD_enableBootPartition(handle, 1);
    but the program has report error,the error log following:
    ERROR: Bootloader_socCpuResetRelease:861: CPU set boot address failed for a530-0
    ERROR: Bootloader_socCpuRelease:496: CPU release failed for a530-0
    
  •  I try deletd the line of 

    status = MMCSD_enableBootPartition(handle, 1);

    To enable access to eMMC Boot1 partition, the corresponding call would be `MMCSD_enableBootPartition(handle, 2)`.

    Based on certain logic, you can modify the `MMCSDRaw_imgRead` to enable either the Boot0 (partitionNum = 1) or Boot1 (partitionNum = 2) partition so that the reads happen from the enabled partition.

  • So we can write a API to read current boot partition Number?

    But why deleted the line,it report error.

    I think when the rom bootloader loading the SBL it means the code from the BOOT0 or BOOT1

  • So we can write a API to read current boot partition Number?

    The logic should involve enabling Boot0/1 partition based on the location of the image to be booted.

    But why deleted the line,it report error.

    If that line is deleted, the boot partition doesn't get enabled & the image is not read, parsed, and loaded.

  • Yes,I want this API.and the API implement by TI? or we develop?

  • There is no API needed. You should have a variable, initialized with the boot partition number, for the image to be booted & and pass that variable instead of the hardcoded value of 1 to the MMCDS_enableBootPartition function call in the MMCSDRaw_imgRead function.

  • No , we need read the register from EMMC which BOOT0 or BOOT1. We need a API to read the EMMC current partition.

  • I do not think it is needed. The boot partition to enable is known beforehand & can be enabled irrespective of the current active boot partition.