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.

TDA4VM: Probabilistic boot failure issue in Linux

Part Number: TDA4VM


Hi,

We use SDK 8.6 and run it in MCU 1_ Many security features have been enabled on 0, and it has been found that there is a probability of only printing the first two logs on the Linux side during startup. Have you encountered this problem before? Where should we look for the problem?

Regards,

Guocai Yang

  • Hi,

    The expert is currently on travel. Please expect slight delay in the responses.

    Regards,

    Nikhil

  • Hi,

    Can you share the complete success logs and the failing logs?

    Are you trying on a custom board?

    what's the probability of failure?

    Best Regards,

    Keerthy

  • Hi,

    After our long-term testing, it has been confirmed that it is caused by the BIST function.

    The log of A72, as shown in the image I sent in the message above, only appears in the first two sentences of the log.

    Regards,

    Guocai Yang

  • Hi Yang,

    Can you help with your boot flow? Is it reproducible on the EVM? Can you share the steps?

    Best Regards,

    Keerthy

  • Hi,

    I am searching for the current core MCU 1_ 0 the log was found to have failed during the PBIST self-test function of A72 core.

    The following is the PBIST_runTest function we use. There are no additional error messages in the printed Log, and there are only three step errors in this function without any additional error messages.

    /* This function runs the full PBIST test for a particular section.
     * It includes the following steps (each step has many sub-steps specificied
     * in more details within the function).
     * For HW POST PBIST:
     * Step 1: Configure interrupt handler
     * Step 2: Check POST results (already run at startup)
     *
     * For SW-initiated PBIST:
     * Step 1: Configure interrupt handler
     * Step 2: Configure processor to correct state
     * Step 3: Run PBIST test (includes checking the result)
     * Step 4: Restore cores
     * */
    
    int32_t PBIST_runTest(uint32_t instanceId, uint8_t test)
    {
        int32_t testResult = 0;
        SDL_ErrType_t status;
        bool PBISTResult = true;
        SDL_PBIST_testType testType;
        uint32_t i = 0;
    
        uint32_t moduleState = TISCI_MSG_VALUE_DEVICE_HW_STATE_OFF;
        uint32_t resetState = 0U;
        uint32_t contextLossState = 0U;
    
    #if defined(PROFILE_PBIST_TIMING)
        uint64_t startTime , testStartTime,  testEndTime, endTime;
        uint64_t prepTime, diffTime, restoreTime;
    #endif
    
        #if defined (SOC_J7200) || defined (SOC_J721S2) || defined (SOC_J784S4)
        if (test == PBIST_TEST_NEGATIVE)
        {
            UART_printf("\n Starting PBIST failure insertion test on %s, index %d...\n",
                        PBIST_TestHandleArray[instanceId].testName,
                        instanceId);
            testType = SDL_PBIST_NEG_TEST;
        }
        else if (test == PBIST_TEST_POSITIVE)
        {
            UART_printf("\n Starting PBIST test on %s, index %d...\n",
                        PBIST_TestHandleArray[instanceId].testName,
                        instanceId);
            testType = SDL_PBIST_TEST;
        }
        else
        {
            UART_printf("\n Starting PBIST Test Of ROM on %s, index %d...\n",
                        PBIST_TestHandleArray[instanceId].testName,
                        instanceId);
            testType = SDL_PBIST_TEST_OF_ROM;
        }
        #else
        if (test == 1u)
        {
            UART_printf("\n Starting PBIST failure insertion test on %s, index %d...\n",
                        PBIST_TestHandleArray[instanceId].testName,
                        instanceId);
            testType = SDL_PBIST_NEG_TEST;
        }
        else
        {
            // UART_printf("\n Starting PBIST test on %s, index %d...\n",
            //             PBIST_TestHandleArray[instanceId].testName,
            //             instanceId);
            testType = SDL_PBIST_TEST;
        }
        #endif
    
    #if defined(PROFILE_PBIST_TIMING)
        /* Get start time of test */
        startTime = TimerP_getTimeInUsecs();
    #endif
    
        /* Step 1: (if HW Power-On Self Test, i.e. POST) Check POST results  */
        if ((testResult == 0) &&
            (PBIST_TestHandleArray[instanceId].numPostPbistToCheck > 0))
        {
            if (test == 0u)
            {
    #ifdef DEBUG
                UART_printf("  HW POST: Running test on HW POST, %d Instances \n",
                            PBIST_TestHandleArray[instanceId].numPostPbistToCheck);
    #endif
                SDL_PBIST_postResult result;
    
                status = SDL_PBIST_getPOSTStatus(&result);
    
                if (status != SDL_PASS)
                {
                    testResult = -1;
                    UART_printf("    SDL_PBIST_getPOSTStatus failed: Status %d \n", status);
                }
                else
                {
                    PBIST_printPostStatus(&result);
                }
            }
        }
        else
        {
            /* Step 2: (if SW-initiated PBIST) Configure processor to correct state  */
    
            /**--- Step 2a: Request Primary core ---*/
            if ((testResult == 0) && (PBIST_TestHandleArray[instanceId].procRstNeeded))
            {
                if (PBIST_TestHandleArray[instanceId].tisciProcId != 0u)
                {
    #ifdef DEBUG
                    UART_printf("  Primary core: %s: Requesting processor \n",
                                PBIST_TestHandleArray[instanceId].coreName);
    #endif
                    /* Request Primary core */
                    status = Sciclient_procBootRequestProcessor(PBIST_TestHandleArray[instanceId].tisciProcId,
                                                                SCICLIENT_SERVICE_WAIT_FOREVER);
                    if (status != CSL_PASS)
                    {
                        UART_printf("   Primary core: Sciclient_procBootRequestProcessor, ProcId 0x%x...FAILED \n",
                                    PBIST_TestHandleArray[instanceId].tisciProcId);
                        testResult = -1;
                    }
                }
            }
    
            /**--- Step 2b: Request Secondary core ---*/
            if ((testResult == 0) && (PBIST_TestHandleArray[instanceId].procRstNeeded))
            {
                if ((PBIST_TestHandleArray[instanceId].secondaryCoreNeeded)
                    && (PBIST_TestHandleArray[instanceId].tisciSecProcId != 0u))
                {
    
    #ifdef DEBUG
                    UART_printf("  Secondary core: %s: Requesting processor \n",
                                PBIST_TestHandleArray[instanceId].secCoreName);
    #endif
                    /* Request secondary core */
                    status = Sciclient_procBootRequestProcessor(PBIST_TestHandleArray[instanceId].tisciSecProcId,
                                                                SCICLIENT_SERVICE_WAIT_FOREVER);
                    if (status != CSL_PASS)
                    {
                        UART_printf("   Secondary core: Sciclient_procBootRequestProcessor, ProcId 0x%x...FAILED \n",
                                    PBIST_TestHandleArray[instanceId].tisciSecProcId);
                        testResult = -1;
                    }
                }
            }
    
    #if defined (SOC_J784S4)
        if ((testResult == 0) && (PBIST_TestHandleArray[instanceId].procRstNeeded))
        {
            if ((PBIST_TestHandleArray[instanceId].thirdCoreNeeded)
                && (PBIST_TestHandleArray[instanceId].tisciThProcId != 0u))
            {
    
    #ifdef DEBUG
                UART_printf("  Third core: %s: Requesting processor \n",
                        PBIST_TestHandleArray[instanceId].thCoreName);
    #endif
                /* Request third core */
                status = Sciclient_procBootRequestProcessor(PBIST_TestHandleArray[instanceId].tisciThProcId,
                                                            SCICLIENT_SERVICE_WAIT_FOREVER);
                if (status != SDL_PASS)
                {
                    UART_printf("   Third core: Sciclient_procBootRequestProcessor, ProcId 0x%x...FAILED \n",
                                PBIST_TestHandleArray[instanceId].tisciThProcId);
                    testResult = -1;
                }
            }
        }
    
        if ((testResult == 0) && (PBIST_TestHandleArray[instanceId].procRstNeeded))
        {
            if ((PBIST_TestHandleArray[instanceId].fourthCoreNeeded)
                && (PBIST_TestHandleArray[instanceId].tisciFoProcId != 0u))
            {
    
    #ifdef DEBUG
                UART_printf("  Fourth core: %s: Requesting processor \n",
                        PBIST_TestHandleArray[instanceId].foCoreName);
    #endif
                /* Request fourth core */
                status = Sciclient_procBootRequestProcessor(PBIST_TestHandleArray[instanceId].tisciFoProcId,
                                                            SCICLIENT_SERVICE_WAIT_FOREVER);
                if (status != SDL_PASS)
                {
                    UART_printf("   Fourth core: Sciclient_procBootRequestProcessor, ProcId 0x%x...FAILED \n",
                                PBIST_TestHandleArray[instanceId].tisciFoProcId);
                    testResult = -1;
                }
            }
        }
    #endif
            /**--- Step 2c: Put Primary core in local reset ---*/
            if ((testResult == 0) && (PBIST_TestHandleArray[instanceId].procRstNeeded))
            {
                if (PBIST_TestHandleArray[instanceId].tisciDeviceId != 0u)
                {
                    /* Set Local reset for Primary core */
    #ifdef DEBUG
                    UART_printf("  %s: Primary core: Set module reset \n",
                                PBIST_TestHandleArray[instanceId].coreName);
    #endif
                    status =  Sciclient_pmSetModuleRst(PBIST_TestHandleArray[instanceId].tisciDeviceId,
                                                       0x1, /* Local Reset asserted */
                                                       SCICLIENT_SERVICE_WAIT_FOREVER);
                    if (status != CSL_PASS)
                    {
                        UART_printf("   Primary core: Sciclient_pmSetModuleRst...FAILED \n");
                        testResult = -1;
                    }
                }
            }
    
            /**--- Step 2d: Put Secondary core in local reset ---*/
            if ((testResult == 0) && (PBIST_TestHandleArray[instanceId].procRstNeeded))
            {
                if ((PBIST_TestHandleArray[instanceId].secondaryCoreNeeded)
                    && (PBIST_TestHandleArray[instanceId].tisciSecDeviceId != 0u))
                {
                    /* Set Local reset for Secondary core */
    #ifdef DEBUG
                    UART_printf("  %s: Secondary core: Set Module reset \n",
                                PBIST_TestHandleArray[instanceId].secCoreName);
    #endif
                    status =  Sciclient_pmSetModuleRst(PBIST_TestHandleArray[instanceId].tisciSecDeviceId,
                                                       0x1, /* Local Reset asserted */
                                                       SCICLIENT_SERVICE_WAIT_FOREVER);
                    if (status != CSL_PASS)
                    {
                        UART_printf("   Secondary core: Sciclient_pmSetModuleRst...FAILED \n");
                        testResult = -1;
                    }
                }
            }
    		
    #if defined(SOC_J784S4)
        if ((testResult == 0) && (PBIST_TestHandleArray[instanceId].procRstNeeded))
        {
            if ((PBIST_TestHandleArray[instanceId].thirdCoreNeeded)
                && (PBIST_TestHandleArray[instanceId].tisciThDeviceId != 0u))
            {
                /* Set Local reset for Third core */
    #ifdef DEBUG
                UART_printf("  %s: Third core: Set Module reset \n",
                            PBIST_TestHandleArray[instanceId].thCoreName);
    #endif
                status =  Sciclient_pmSetModuleRst(PBIST_TestHandleArray[instanceId].tisciThDeviceId,
                                                   0x1, /* Local Reset asserted */
                                                   SCICLIENT_SERVICE_WAIT_FOREVER);
                if (status != SDL_PASS)
                {
                    UART_printf("   Third core: Sciclient_pmSetModuleRst...FAILED \n");
                    testResult = -1;
                }
            }
        }
    
        if ((testResult == 0) && (PBIST_TestHandleArray[instanceId].procRstNeeded))
        {
            if ((PBIST_TestHandleArray[instanceId].fourthCoreNeeded)
                && (PBIST_TestHandleArray[instanceId].tisciFoDeviceId != 0u))
            {
                /* Set Local reset for Fourth core */
    #ifdef DEBUG
                UART_printf("  %s: Fourth core: Set Module reset \n",
                            PBIST_TestHandleArray[instanceId].foCoreName);
    #endif
                status =  Sciclient_pmSetModuleRst(PBIST_TestHandleArray[instanceId].tisciFoDeviceId,
                                                   0x1, /* Local Reset asserted */
                                                   SCICLIENT_SERVICE_WAIT_FOREVER);
                if (status != SDL_PASS)
                {
                    UART_printf("   Fourth core: Sciclient_pmSetModuleRst...FAILED \n");
                    testResult = -1;
                }
            }
        }
    #endif		
    #ifdef POWERUP_CORES_BEFORE_TEST
            /**--- Step 2e: Perform any additional power sequencing, if needed ---*/
            /* Custom core power restore sequence - needed to allow core to be powered
             * up later by Secondary Bootloader (SBL) */
            if ((testResult == 0) &&
                (PBIST_TestHandleArray[instanceId].coreCustPwrSeqNeeded) &&
                (PBIST_TestHandleArray[instanceId].tisciProcId != 0u))
            {
                status = customPrepareForPowerUpSequence(PBIST_TestHandleArray[instanceId].tisciProcId);
                if (status != CSL_PASS)
                {
                    UART_printf("  Custom core power restore sequence, ProcId 0x%x ...FAILED \n",
                                PBIST_TestHandleArray[instanceId].tisciProcId);
                    testResult = -1;
                }
            }
    
            /**--- Step 2f: Power up of Auxilliary modules needed to run test */
            if (testResult == 0)
            {
                /* Power all modules required for test */
                for ( i = 0; i < PBIST_TestHandleArray[instanceId].numAuxDevices; i++)
                {
    #ifdef DEBUG
                    UART_printf("  Powering on Device number %d Device Id %x\n",
                                i, PBIST_TestHandleArray[instanceId].auxDeviceIdsP[i]);
    #endif
    
                    status = Sciclient_pmSetModuleState(PBIST_TestHandleArray[instanceId].auxDeviceIdsP[i],
                                                        TISCI_MSG_VALUE_DEVICE_SW_STATE_ON,
                                                        TISCI_MSG_FLAG_AOP,
                                                        SCICLIENT_SERVICE_WAIT_FOREVER);
                    if (status != CSL_PASS)
                    {
                        UART_printf("  Sciclient_pmSetModuleState 0x%x ...FAILED \n",
                                    PBIST_TestHandleArray[instanceId].auxDeviceIdsP[i]);
                        testResult = -1;
                        break;
                    }
                }
            }
    
            /**--- Step 2g: Power up Primary core */
            if ((testResult == 0) && (PBIST_TestHandleArray[instanceId].procRstNeeded)
                                  && (PBIST_TestHandleArray[instanceId].tisciDeviceId != 0U))
            {
                /* power on Primary core*/
    #ifdef DEBUG
                UART_printf("  Primary core: Powering on %s \n",
                            PBIST_TestHandleArray[instanceId].coreName);
    #endif
                status = Sciclient_pmSetModuleState(PBIST_TestHandleArray[instanceId].tisciDeviceId,
                                                    TISCI_MSG_VALUE_DEVICE_SW_STATE_ON,
                                                    TISCI_MSG_FLAG_AOP,
                                                    SCICLIENT_SERVICE_WAIT_FOREVER);
    
                if (status != CSL_PASS)
                {
                    UART_printf("   Primary core: Sciclient_pmSetModuleState 0x%x ...FAILED \n",
                                PBIST_TestHandleArray[instanceId].tisciDeviceId);
                    testResult = -1;
                }
            }
    
            /**--- Step 2h: Power up Secondary core */
            if ((testResult == 0) && (PBIST_TestHandleArray[instanceId].procRstNeeded)
                                  && (PBIST_TestHandleArray[instanceId].tisciSecDeviceId != 0U))
            {
                if (PBIST_TestHandleArray[instanceId].secondaryCoreNeeded)
                {
                    /* power on Secondary core*/
    #ifdef DEBUG
                    UART_printf("  Secondary core: Powering on %s \n",
                                PBIST_TestHandleArray[instanceId].secCoreName);
    #endif
                    status = Sciclient_pmSetModuleState(PBIST_TestHandleArray[instanceId].tisciSecDeviceId,
                                                        TISCI_MSG_VALUE_DEVICE_SW_STATE_ON,
                                                        TISCI_MSG_FLAG_AOP,
                                                        SCICLIENT_SERVICE_WAIT_FOREVER);
                    if (status != CSL_PASS)
                    {
                        UART_printf("   Secondary core: Sciclient_pmSetModuleState 0x%x ...FAILED \n",
                                    PBIST_TestHandleArray[instanceId].tisciSecDeviceId);
                        testResult = -1;
                        return testResult;
                    }
                }
            }
    
    #if defined(SOC_J784S4)
        if ((testResult == 0) && (PBIST_TestHandleArray[instanceId].procRstNeeded)
                              && (PBIST_TestHandleArray[instanceId].tisciThDeviceId != 0U))
        {
            if (PBIST_TestHandleArray[instanceId].thirdCoreNeeded)
            {
                /* power on Third core*/
    #ifdef DEBUG
                UART_printf("  Third core: Powering on %s \n",
                            PBIST_TestHandleArray[instanceId].thCoreName);
    #endif
                status = Sciclient_pmSetModuleState(PBIST_TestHandleArray[instanceId].tisciThDeviceId,
                                                    TISCI_MSG_VALUE_DEVICE_SW_STATE_ON,
                                                    TISCI_MSG_FLAG_AOP,
                                                    SCICLIENT_SERVICE_WAIT_FOREVER);
                if (status != SDL_PASS)
                {
                    UART_printf("   Third core: Sciclient_pmSetModuleState 0x%x ...FAILED \n",
                                PBIST_TestHandleArray[instanceId].tisciThDeviceId);
                    testResult = -1;
                    return testResult;
                }
            }
        }
    
        if ((testResult == 0) && (PBIST_TestHandleArray[instanceId].procRstNeeded)
                              && (PBIST_TestHandleArray[instanceId].tisciFoDeviceId != 0U))
        {
            if (PBIST_TestHandleArray[instanceId].fourthCoreNeeded)
            {
                /* power on Fourth core*/
    #ifdef DEBUG
                UART_printf("  Fourth core: Powering on %s \n",
                            PBIST_TestHandleArray[instanceId].foCoreName);
    #endif
                status = Sciclient_pmSetModuleState(PBIST_TestHandleArray[instanceId].tisciFoDeviceId,
                                                    TISCI_MSG_VALUE_DEVICE_SW_STATE_ON,
                                                    TISCI_MSG_FLAG_AOP,
                                                    SCICLIENT_SERVICE_WAIT_FOREVER);
                if (status != SDL_PASS)
                {
                    UART_printf("   Fourth core: Sciclient_pmSetModuleState 0x%x ...FAILED \n",
                                PBIST_TestHandleArray[instanceId].tisciFoDeviceId);
                    testResult = -1;
                    return testResult;
                }
            }
        }
    #endif
            /**--- Step 2i: Double check the Power up of Auxilliary modules needed to run test
             * and wait until they are powered up */
            if (testResult == 0)
            {
                /* Wait for all modules required for test to be powered up */
                for ( i = 0; i < PBIST_TestHandleArray[instanceId].numAuxDevices; i++)
                {
    #ifdef DEBUG
                    UART_printf("  Double checking Powering on Device number %d Device Id %x\n",
                                i, PBIST_TestHandleArray[instanceId].auxDeviceIdsP[i]);
    #endif
                    do
                    {
                        status = Sciclient_pmGetModuleState(PBIST_TestHandleArray[instanceId].auxDeviceIdsP[i],
                                                            &moduleState,
                                                            &resetState,
                                                            &contextLossState,
                                                            SCICLIENT_SERVICE_WAIT_FOREVER);
                        if (status != CSL_PASS)
                        {
                            UART_printf("  Sciclient_pmGetModuleState 0x%x ...FAILED \n",
                                        PBIST_TestHandleArray[instanceId].auxDeviceIdsP[i]);
                            testResult = -1;
                            break;
                        }
                    } while (moduleState != TISCI_MSG_VALUE_DEVICE_HW_STATE_ON);
                }
            }
    
            /**--- Step 2j: Double check the Power up of Primary core and wait until it is
             * powered up */
            if ((testResult == 0) && (PBIST_TestHandleArray[instanceId].procRstNeeded)
                                  && (PBIST_TestHandleArray[instanceId].tisciDeviceId != 0U))
            {
                /* Double check power on Primary core*/
    #ifdef DEBUG
                UART_printf("  Primary core: Double checking Powering on %s \n",
                            PBIST_TestHandleArray[instanceId].coreName);
    #endif
                do
                {
                    status = Sciclient_pmGetModuleState(PBIST_TestHandleArray[instanceId].tisciDeviceId,
                                                        &moduleState,
                                                        &resetState,
                                                        &contextLossState,
                                                        SCICLIENT_SERVICE_WAIT_FOREVER);
                    if (status != CSL_PASS)
                    {
                        UART_printf("   Primary core: Sciclient_pmGetModuleState 0x%x ...FAILED \n",
                                    PBIST_TestHandleArray[instanceId].tisciDeviceId);
                        testResult = -1;
                        break;
                    }
                } while (moduleState != TISCI_MSG_VALUE_DEVICE_HW_STATE_ON);
            }
    
            /**--- Step 2k: Double check the Power up of Primary core and wait until it is
             * powered up */
            if ((testResult == 0) && (PBIST_TestHandleArray[instanceId].procRstNeeded)
                                  && (PBIST_TestHandleArray[instanceId].tisciSecDeviceId != 0U))
            {
                if (PBIST_TestHandleArray[instanceId].secondaryCoreNeeded)
                {
                    /* Double check power on Secondary core*/
    #ifdef DEBUG
                    UART_printf("  Secondary core: Double checking Powering on %s \n",
                                PBIST_TestHandleArray[instanceId].coreName);
    #endif
                    do
                    {
                        status = Sciclient_pmGetModuleState(PBIST_TestHandleArray[instanceId].tisciSecDeviceId,
                                                            &moduleState,
                                                            &resetState,
                                                            &contextLossState,
                                                            SCICLIENT_SERVICE_WAIT_FOREVER);
                        if (status != CSL_PASS)
                        {
                            UART_printf("   Secondary core: Sciclient_pmGetModuleState 0x%x ...FAILED \n",
                                        PBIST_TestHandleArray[instanceId].tisciSecDeviceId);
                            testResult = -1;
                            break;
                        }
                    } while (moduleState != TISCI_MSG_VALUE_DEVICE_HW_STATE_ON);
                }
            }
    
    #if defined(SOC_J784S4)
        if ((testResult == 0) && (PBIST_TestHandleArray[instanceId].procRstNeeded)
                              && (PBIST_TestHandleArray[instanceId].tisciThDeviceId != 0U))
        {
            if (PBIST_TestHandleArray[instanceId].thirdCoreNeeded)
            {
                /* Double check power on Third core*/
    #ifdef DEBUG
                UART_printf(
                                "  Third core: Double checking Powering on %s \n",
                                PBIST_TestHandleArray[instanceId].thCoreName);
    #endif
                do
                {
                    status = Sciclient_pmGetModuleState(PBIST_TestHandleArray[instanceId].tisciThDeviceId,
                                                        &moduleState,
                                                        &resetState,
                                                        &contextLossState,
                                                        SCICLIENT_SERVICE_WAIT_FOREVER);
                    if (status != SDL_PASS)
                    {
                        UART_printf("   Third core: Sciclient_pmGetModuleState 0x%x ...FAILED \n",
                                    PBIST_TestHandleArray[instanceId].tisciThDeviceId);
                        testResult = -1;
                        break;
                    }
                } while (moduleState != TISCI_MSG_VALUE_DEVICE_HW_STATE_ON);
            }
        }
    
        if ((testResult == 0) && (PBIST_TestHandleArray[instanceId].procRstNeeded)
                              && (PBIST_TestHandleArray[instanceId].tisciFoDeviceId != 0U))
        {
            if (PBIST_TestHandleArray[instanceId].fourthCoreNeeded)
            {
                /* Double check power on Fourth core*/
    #ifdef DEBUG
                UART_printf(
                                "  Fourth core: Double checking Powering on %s \n",
                                PBIST_TestHandleArray[instanceId].foCoreName);
    #endif
                do
                {
                    status = Sciclient_pmGetModuleState(PBIST_TestHandleArray[instanceId].tisciFoDeviceId,
                                                        &moduleState,
                                                        &resetState,
                                                        &contextLossState,
                                                        SCICLIENT_SERVICE_WAIT_FOREVER);
                    if (status != SDL_PASS)
                    {
                        UART_printf("   Fourth core: Sciclient_pmGetModuleState 0x%x ...FAILED \n",
                                    PBIST_TestHandleArray[instanceId].tisciFoDeviceId);
                        testResult = -1;
                        break;
                    }
                } while (moduleState != TISCI_MSG_VALUE_DEVICE_HW_STATE_ON);
            }
        }
    #endif
    #endif /* #ifdef POWERUP_CORES_BEFORE_TEST */
            /**--- Step 2l: Power up PBIST */
            if ((testResult == 0) && (PBIST_TestHandleArray[instanceId].tisciPBISTDeviceId != 0u))
            {
    #ifdef DEBUG
                UART_printf("  Powering on PBIST %d \n",
                            PBIST_TestHandleArray[instanceId].tisciPBISTDeviceId);
    #endif
                status = Sciclient_pmSetModuleState(PBIST_TestHandleArray[instanceId].tisciPBISTDeviceId,
                                                    TISCI_MSG_VALUE_DEVICE_SW_STATE_ON,
                                                    TISCI_MSG_FLAG_AOP,
                                                    SCICLIENT_SERVICE_WAIT_FOREVER);
    
                if (status != CSL_PASS)
                {
                    UART_printf("   PBIST Sciclient_pmSetModuleState 0x%x ...FAILED: retValue %d\n",
                                PBIST_TestHandleArray[instanceId].tisciPBISTDeviceId, status);
                    testResult = -1;
                }
            }
    
            /**--- Step 2m: Execute Auxialliary init function for any final core-internal register
             * setup needed for the PBIST test */
            if (testResult == 0)
            {
                if (PBIST_TestHandleArray[instanceId].auxInitRestoreFunction != 0)
                {
                    status = PBIST_TestHandleArray[instanceId].auxInitRestoreFunction(TRUE);
                    if (status != CSL_PASS)
                    {
                        testResult = -1;
                    }
                }
            }
    
    #if defined(PROFILE_PBIST_TIMING)
            /* Get start time for PBIST test */
            testStartTime = TimerP_getTimeInUsecs();
    #endif
    
            /**-- Step 3: Run PBIST test. --*/
            status = SDL_PBIST_selfTest((SDL_PBIST_inst)PBIST_TestHandleArray[instanceId].pbistInst, testType, NULL, &PBISTResult);
            if ((status != SDL_PASS) || (PBISTResult == false))
            {
                testResult = -1;
            }
    
    #if defined(PROFILE_PBIST_TIMING)
            /* Record test end time */
            testEndTime = TimerP_getTimeInUsecs();
    #endif
    
            /**-- Step 4: Restore cores --*/
    
            /**--- Step 4a: Execute Auxilliary restore function to restore core-internal
             * registers to original state */
            if (testResult == 0)
            {
    
                if (PBIST_TestHandleArray[instanceId].auxInitRestoreFunction != 0)
                {
                    status = PBIST_TestHandleArray[instanceId].auxInitRestoreFunction(FALSE);
                    if (status != CSL_PASS)
                    {
                        testResult = -1;
                    }
                }
            }
    
            /**--- Step 4b: Power off PBIST */
            if ((testResult == 0) && (PBIST_TestHandleArray[instanceId].tisciPBISTDeviceId != 0u))
            {
    #ifdef DEBUG
                UART_printf("  Powering off PBIST %d \n",
                            PBIST_TestHandleArray[instanceId].tisciPBISTDeviceId);
    #endif
                status = Sciclient_pmSetModuleState(PBIST_TestHandleArray[instanceId].tisciPBISTDeviceId,
                                                    TISCI_MSG_VALUE_DEVICE_SW_STATE_AUTO_OFF,
                                                    TISCI_MSG_FLAG_AOP,
                                                    SCICLIENT_SERVICE_WAIT_FOREVER);
    
                if (status != CSL_PASS)
                {
                    UART_printf("   PBIST Sciclient_pmSetModuleState 0x%x ...FAILED \n",
                                PBIST_TestHandleArray[instanceId].tisciPBISTDeviceId);
                    testResult = -1;
                }
            }
    #ifdef POWERUP_CORES_BEFORE_TEST
    #if defined(SOC_J784S4)
        if ((testResult == 0) && (PBIST_TestHandleArray[instanceId].procRstNeeded)
                              && (PBIST_TestHandleArray[instanceId].tisciFoDeviceId != 0U))
        {
            if (PBIST_TestHandleArray[instanceId].fourthCoreNeeded)
            {
                /* power off Fourth core*/
    #ifdef DEBUG
                UART_printf("  Fourth core: Powering off %s \n",
                            PBIST_TestHandleArray[instanceId].foCoreName);
    #endif
                status = Sciclient_pmSetModuleState(PBIST_TestHandleArray[instanceId].tisciFoDeviceId,
                                                    TISCI_MSG_VALUE_DEVICE_SW_STATE_AUTO_OFF,
                                                    TISCI_MSG_FLAG_AOP,
                                                    SCICLIENT_SERVICE_WAIT_FOREVER);
                if (status != SDL_PASS)
                {
                    UART_printf("   Fourth core: Sciclient_pmSetModuleState Power off 0x%x ...FAILED \n",
                                PBIST_TestHandleArray[instanceId].tisciFoDeviceId);
                    testResult = -1;
                    return testResult;
                }
            }
        }
    
        if ((testResult == 0) && (PBIST_TestHandleArray[instanceId].procRstNeeded)
                              && (PBIST_TestHandleArray[instanceId].tisciThDeviceId != 0U))
        {
            if (PBIST_TestHandleArray[instanceId].thirdCoreNeeded)
            {
                /* power off Third core*/
    #ifdef DEBUG
                UART_printf("  Third core: Powering off %s \n",
                            PBIST_TestHandleArray[instanceId].thCoreName);
    #endif
                status = Sciclient_pmSetModuleState(PBIST_TestHandleArray[instanceId].tisciThDeviceId,
                                                    TISCI_MSG_VALUE_DEVICE_SW_STATE_AUTO_OFF,
                                                    TISCI_MSG_FLAG_AOP,
                                                    SCICLIENT_SERVICE_WAIT_FOREVER);
                if (status != SDL_PASS)
                {
                    UART_printf("   Third core: Sciclient_pmSetModuleState Power off 0x%x ...FAILED \n",
                                PBIST_TestHandleArray[instanceId].tisciThDeviceId);
                    testResult = -1;
                    return testResult;
                }
            }
        }
    #endif
    
            /**--- Step 4c: Power off Secondary core */
            if ((testResult == 0) && (PBIST_TestHandleArray[instanceId].procRstNeeded)
                                  && (PBIST_TestHandleArray[instanceId].tisciSecDeviceId != 0U))
            {
                if (PBIST_TestHandleArray[instanceId].secondaryCoreNeeded)
                {
                    /* power off Secondary core*/
    #ifdef DEBUG
                    UART_printf("  Secondary core: Powering off %s \n",
                                PBIST_TestHandleArray[instanceId].secCoreName);
    #endif
                    status = Sciclient_pmSetModuleState(PBIST_TestHandleArray[instanceId].tisciSecDeviceId,
                                                        TISCI_MSG_VALUE_DEVICE_SW_STATE_AUTO_OFF,
                                                        TISCI_MSG_FLAG_AOP,
                                                        SCICLIENT_SERVICE_WAIT_FOREVER);
                    if (status != CSL_PASS)
                    {
                        UART_printf("   Secondary core: Sciclient_pmSetModuleState Power off 0x%x ...FAILED \n",
                                    PBIST_TestHandleArray[instanceId].tisciSecDeviceId);
                        testResult = -1;
                        return testResult;
                    }
                }
            }
    
            /**--- Step 4d: Perform any custom/core-specific power down sequence */
            if ((testResult == 0) &&
                (PBIST_TestHandleArray[instanceId].coreCustPwrSeqNeeded) &&
                (PBIST_TestHandleArray[instanceId].tisciProcId != 0u))
            {
                status = customPowerDownSequence(PBIST_TestHandleArray[instanceId].tisciProcId);
                if (status != CSL_PASS)
                {
                    UART_printf("  Custom core power down sequence, ProcId 0x%x ...FAILED \n",
                                PBIST_TestHandleArray[instanceId].tisciProcId);
                    testResult = -1;
                }
            }
    
            /**--- Step 4e: Power off Primary core */
            if ((testResult == 0) && (PBIST_TestHandleArray[instanceId].tisciProcId != 0u)
                            && (PBIST_TestHandleArray[instanceId].procRstNeeded))
            {
                /* power off Primary core*/
    #ifdef DEBUG
                UART_printf("  Primary core: Powering off %s \n",
                            PBIST_TestHandleArray[instanceId].coreName);
    #endif
                status = Sciclient_pmSetModuleState(PBIST_TestHandleArray[instanceId].tisciDeviceId,
                                                    TISCI_MSG_VALUE_DEVICE_SW_STATE_AUTO_OFF,
                                                    TISCI_MSG_FLAG_AOP,
                                                    SCICLIENT_SERVICE_WAIT_FOREVER);
    
                if (status != CSL_PASS)
                {
                    UART_printf("   Primary core: Sciclient_pmSetModuleState Power off 0x%x ...FAILED \n",
                                PBIST_TestHandleArray[instanceId].tisciDeviceId);
                    testResult = -1;
                }
            }
    
    #ifndef SOC_J784S4
            /**--- Step 4f: Power off of Auxilliary modules needed to run test */
            if (testResult == 0)
            {
                /* Power all modules required for test */
                for ( i = 0; i < PBIST_TestHandleArray[instanceId].numAuxDevices; i++)
                {
    #ifdef DEBUG
                    UART_printf("  Powering off Device number %d Device Id %x\n",
                                i, PBIST_TestHandleArray[instanceId].auxDeviceIdsP[i]);
    #endif
                    status = Sciclient_pmSetModuleState(PBIST_TestHandleArray[instanceId].auxDeviceIdsP[i],
                                                        TISCI_MSG_VALUE_DEVICE_SW_STATE_AUTO_OFF,
                                                        TISCI_MSG_FLAG_AOP,
                                                        SCICLIENT_SERVICE_WAIT_FOREVER);
                    if (status != CSL_PASS)
                    {
                        UART_printf("  Sciclient_pmSetModuleState 0x%x ...FAILED \n",
                                    PBIST_TestHandleArray[instanceId].auxDeviceIdsP[i]);
                        testResult = -1;
                        break;
                    }
                }
            }
    #endif
    
            /**--- Step 4g: Perform any custom/core-specific power restore sequence needed to
             * allow core to be powered up properly later */
            if ((testResult == 0) &&
                (PBIST_TestHandleArray[instanceId].coreCustPwrSeqNeeded) &&
                (PBIST_TestHandleArray[instanceId].tisciProcId != 0u))
            {
                status = customPrepareForPowerUpSequence(PBIST_TestHandleArray[instanceId].tisciProcId);
                if (status != CSL_PASS)
                {
                    UART_printf("  Custom core power restore sequence, ProcId 0x%x ...FAILED \n",
                                PBIST_TestHandleArray[instanceId].tisciProcId);
                    testResult = -1;
                }
            }
    
            /**--- Step 4h: Take Primary core out of local reset */
            if ((testResult == 0) && (PBIST_TestHandleArray[instanceId].procRstNeeded)
                                  && (PBIST_TestHandleArray[instanceId].tisciDeviceId != 0U))
            {
    #ifdef DEBUG
                UART_printf("  Primary core: Taking out of local reset the core %s \n",
                            PBIST_TestHandleArray[instanceId].coreName);
    #endif
                status = Sciclient_pmSetModuleRst(PBIST_TestHandleArray[instanceId].tisciDeviceId,
                                                  0x0, /* Local Reset de-asserted */
                                                  SCICLIENT_SERVICE_WAIT_FOREVER);
                if (status != CSL_PASS)
                {
                     UART_printf("  Sciclient_pmSetModuleRst 0x%x ...FAILED \n",
                                 PBIST_TestHandleArray[instanceId].tisciDeviceId);
                     testResult = -1;
                }
            }
    
            /**--- Step 4i: Take Secondary core out of local reset */
            if ((testResult == 0) && (PBIST_TestHandleArray[instanceId].procRstNeeded)
                                  && (PBIST_TestHandleArray[instanceId].tisciSecDeviceId != 0U))
            {
    #ifdef DEBUG
                UART_printf("  Secondary core: Taking out of local reset the core %s \n",
                            PBIST_TestHandleArray[instanceId].secCoreName);
    #endif
                status = Sciclient_pmSetModuleRst(PBIST_TestHandleArray[instanceId].tisciSecProcId,
                                                  0x0, /* Local Reset de-asserted */
                                                  SCICLIENT_SERVICE_WAIT_FOREVER);
                if (status != CSL_PASS)
                {
                     UART_printf("  Sciclient_pmSetModuleRst 0x%x ...FAILED \n",
                                 PBIST_TestHandleArray[instanceId].tisciSecDeviceId);
                     testResult = -1;
                }
            }
    #if defined(SOC_J784S4)
        /* Take Third core out of local reset */
        if ((testResult == 0) && (PBIST_TestHandleArray[instanceId].procRstNeeded)
                              && (PBIST_TestHandleArray[instanceId].tisciThDeviceId != 0U))
        {
    #ifdef DEBUG
            UART_printf("  Third core: Taking out of local reset the core %s \n",
                        PBIST_TestHandleArray[instanceId].thCoreName);
    #endif
            status = Sciclient_pmSetModuleRst(PBIST_TestHandleArray[instanceId].tisciThProcId,
                                              0x0, /* Local Reset de-asserted */
                                              SCICLIENT_SERVICE_WAIT_FOREVER);
            if (status != SDL_PASS)
            {
                 UART_printf("  Sciclient_pmSetModuleRst 0x%x ...FAILED \n",
                             PBIST_TestHandleArray[instanceId].tisciThDeviceId);
                 testResult = -1;
            }
        }
    
        /* Take Fourth core out of local reset */
        if ((testResult == 0) && (PBIST_TestHandleArray[instanceId].procRstNeeded)
                              && (PBIST_TestHandleArray[instanceId].tisciFoDeviceId != 0U))
        {
    #ifdef DEBUG
            UART_printf("  Third core: Taking out of local reset the core %s \n",
                        PBIST_TestHandleArray[instanceId].foCoreName);
    #endif
            status = Sciclient_pmSetModuleRst(PBIST_TestHandleArray[instanceId].tisciFoProcId,
                                              0x0, /* Local Reset de-asserted */
                                              SCICLIENT_SERVICE_WAIT_FOREVER);
            if (status != SDL_PASS)
            {
                 UART_printf("  Sciclient_pmSetModuleRst 0x%x ...FAILED \n",
                             PBIST_TestHandleArray[instanceId].tisciFoDeviceId);
                 testResult = -1;
            }
        }
    #endif		
    #endif /* #ifdef POWERUP_CORES_BEFORE_TEST */
            /* Ensure that cores have been turned off to prepare for booting of the cores */
    
            /**--- Step 4j: Power off Primary core */
            if ((testResult == 0) && (PBIST_TestHandleArray[instanceId].procRstNeeded))
            {
                if (PBIST_TestHandleArray[instanceId].tisciDeviceId != 0u)
                {
                    /* Set Software Reset Disable State for Primary core */
    #ifdef DEBUG
                    UART_printf("  %s: Primary core: Put in Software Reset Disable \n",
                                PBIST_TestHandleArray[instanceId].coreName);
    #endif
                    status =  Sciclient_pmSetModuleState(PBIST_TestHandleArray[instanceId].tisciDeviceId,
                                                         TISCI_MSG_VALUE_DEVICE_SW_STATE_AUTO_OFF,
                                                         TISCI_MSG_FLAG_AOP,
                                                         SCICLIENT_SERVICE_WAIT_FOREVER);
                    if (status != CSL_PASS)
                    {
                        UART_printf("   Primary core: Sciclient_pmSetModuleState...FAILED \n");
                        testResult = -1;
                    }
                }
            }
    
            /**--- Step 4k: Power off Secondary core */
            if ((testResult == 0) && (PBIST_TestHandleArray[instanceId].procRstNeeded))
            {
                if ((PBIST_TestHandleArray[instanceId].secondaryCoreNeeded)
                    && (PBIST_TestHandleArray[instanceId].tisciSecDeviceId != 0u))
                {
                    /* Set Software Reset Disable State for Secondary core */
    #ifdef DEBUG
                    UART_printf("  %s: Secondary Core Put in Software Reset Disable \n",
                                PBIST_TestHandleArray[instanceId].secCoreName);
    #endif
                    status =  Sciclient_pmSetModuleState(PBIST_TestHandleArray[instanceId].tisciSecDeviceId,
                                                         TISCI_MSG_VALUE_DEVICE_SW_STATE_AUTO_OFF,
                                                         TISCI_MSG_FLAG_AOP,
                                                         SCICLIENT_SERVICE_WAIT_FOREVER);
                    if (status != CSL_PASS)
                    {
                        UART_printf("   Secondary core Sciclient_pmSetModuleState...FAILED \n");
                        testResult = -1;
                    }
                }
            }
    
    #if defined(SOC_J784S4)
        if ((testResult == 0) && (PBIST_TestHandleArray[instanceId].procRstNeeded))
        {
            if ((PBIST_TestHandleArray[instanceId].thirdCoreNeeded)
                && (PBIST_TestHandleArray[instanceId].tisciThDeviceId != 0u))
            {
                /* Set Software Reset Disable State for Third core */
    #ifdef DEBUG
                UART_printf("  %s: Third Core Put in Software Reset Disable \n",
                            PBIST_TestHandleArray[instanceId].thCoreName);
    #endif
                status =  Sciclient_pmSetModuleState(PBIST_TestHandleArray[instanceId].tisciThDeviceId,
                                                     TISCI_MSG_VALUE_DEVICE_SW_STATE_AUTO_OFF,
                                                     TISCI_MSG_FLAG_AOP,
                                                     SCICLIENT_SERVICE_WAIT_FOREVER);
                if (status != SDL_PASS)
                {
                    UART_printf("   Third core Sciclient_pmSetModuleState...FAILED \n");
                    testResult = -1;
                }
            }
        }
    
        if ((testResult == 0) && (PBIST_TestHandleArray[instanceId].procRstNeeded))
        {
            if ((PBIST_TestHandleArray[instanceId].fourthCoreNeeded)
                && (PBIST_TestHandleArray[instanceId].tisciFoDeviceId != 0u))
            {
                /* Set Software Reset Disable State for Fourth core */
    #ifdef DEBUG
                UART_printf("  %s: Fourth Core Put in Software Reset Disable \n",
                            PBIST_TestHandleArray[instanceId].foCoreName);
    #endif
                status =  Sciclient_pmSetModuleState(PBIST_TestHandleArray[instanceId].tisciFoDeviceId,
                                                     TISCI_MSG_VALUE_DEVICE_SW_STATE_AUTO_OFF,
                                                     TISCI_MSG_FLAG_AOP,
                                                     SCICLIENT_SERVICE_WAIT_FOREVER);
                if (status != SDL_PASS)
                {
                    UART_printf("   Fourth core Sciclient_pmSetModuleState...FAILED \n");
                    testResult = -1;
                }
            }
        }
    #endif		
    
            /**--- Step 4m: Release Primary core */
            if ((testResult == 0) && (PBIST_TestHandleArray[instanceId].tisciProcId != 0u)
                    && (PBIST_TestHandleArray[instanceId].procRstNeeded))
            {
                /* release processor Primary core */
    #ifdef DEBUG
                UART_printf("  Primary core: Releasing %s \n",
                            PBIST_TestHandleArray[instanceId].coreName);
    #endif
    
                status = Sciclient_procBootReleaseProcessor(PBIST_TestHandleArray[instanceId].tisciProcId,
                                                            TISCI_MSG_FLAG_AOP,
                                                            SCICLIENT_SERVICE_WAIT_FOREVER);
                if (status != CSL_PASS)
                {
                    UART_printf("   Primary core: Sciclient_procBootReleaseProcessor, ProcId 0x%x...FAILED \n",
                                PBIST_TestHandleArray[instanceId].tisciProcId);
                    testResult = -1;
                }
            }    
    
            /**--- Step 4n: Release Secondary core */
            if (testResult == 0)
            {
                if ((PBIST_TestHandleArray[instanceId].secondaryCoreNeeded)
                    && (PBIST_TestHandleArray[instanceId].tisciSecProcId != 0u)
                    && (PBIST_TestHandleArray[instanceId].procRstNeeded))
                {
                    /* release processor Secondary core */
    #ifdef DEBUG
                    UART_printf("  Secondary core: Releasing %s \n",
                                PBIST_TestHandleArray[instanceId].secCoreName);
    #endif
                    status = Sciclient_procBootReleaseProcessor(PBIST_TestHandleArray[instanceId].tisciSecProcId,
                                                                TISCI_MSG_FLAG_AOP,
                                                                SCICLIENT_SERVICE_WAIT_FOREVER);
                    if (status != CSL_PASS)
                    {
                        UART_printf("   Secondary core: Sciclient_procBootReleaseProcessor, ProcId 0x%x...FAILED \n",
                                    PBIST_TestHandleArray[instanceId].tisciSecProcId);
                        testResult = -1;
                    }
                }
            }
    
    #if defined(SOC_J784S4)
        if (testResult == 0)
        {
            if ((PBIST_TestHandleArray[instanceId].thirdCoreNeeded)
                && (PBIST_TestHandleArray[instanceId].tisciThProcId != 0u)
                && (PBIST_TestHandleArray[instanceId].procRstNeeded))
            {
                /* release processor Third core */
    #ifdef DEBUG
                UART_printf("  Third core: Releasing %s \n",
                            PBIST_TestHandleArray[instanceId].thCoreName);
    #endif
                status = Sciclient_procBootReleaseProcessor(PBIST_TestHandleArray[instanceId].tisciThProcId,
                                                            TISCI_MSG_FLAG_AOP,
                                                            SCICLIENT_SERVICE_WAIT_FOREVER);
                if (status != SDL_PASS)
                {
                    UART_printf("   Third core: Sciclient_procBootReleaseProcessor, ProcId 0x%x...FAILED \n",
                                PBIST_TestHandleArray[instanceId].tisciThProcId);
                    testResult = -1;
                }
            }
        }
    
        if (testResult == 0)
        {
            if ((PBIST_TestHandleArray[instanceId].fourthCoreNeeded)
                && (PBIST_TestHandleArray[instanceId].tisciFoProcId != 0u)
                && (PBIST_TestHandleArray[instanceId].procRstNeeded))
            {
                /* release processor Fourth core */
    #ifdef DEBUG
                UART_printf("  Fourth core: Releasing %s \n",
                            PBIST_TestHandleArray[instanceId].foCoreName);
    #endif
                status = Sciclient_procBootReleaseProcessor(PBIST_TestHandleArray[instanceId].tisciFoProcId,
                                                            TISCI_MSG_FLAG_AOP,
                                                            SCICLIENT_SERVICE_WAIT_FOREVER);
                if (status != SDL_PASS)
                {
                    UART_printf("   Fourth core: Sciclient_procBootReleaseProcessor, ProcId 0x%x...FAILED \n",
                                PBIST_TestHandleArray[instanceId].tisciFoProcId);
                    testResult = -1;
                }
            }
        }
    #endif
    #if defined(PROFILE_PBIST_TIMING)
            /* Record end time */
            endTime = TimerP_getTimeInUsecs();
    
            prepTime = testStartTime - startTime;
            diffTime = testEndTime - testStartTime;
            restoreTime = endTime - testEndTime;
            UART_printf("  Delta Cores prep time in micro secs %d \n",
                        (uint32_t)prepTime);
             UART_printf("  Delta PBIST execution time in micro secs %d \n",
                        (uint32_t)diffTime);
            UART_printf("  Delta Cores restore time in micro secs %d \n",
                        (uint32_t)restoreTime);
            UART_printf(" PBIST complete %s, test index %d\n",
                        PBIST_TestHandleArray[instanceId].testName,
                        instanceId);
    #endif
        }
    
        return (testResult);
    }
    

    Regards,

    Guocai Yang

  • Hi,

    That explains the failure to boot the A72. So what's the failure rate and is this also seen on the TI EVM?

    Best Regards,

    Keerthy 

  • Hi,

    There is no problem with TI's SDK 8.6 itself. Our issue is due to the failure of PBIST A72's self-test, but we still did it.

    Regards,

    Guocai Yang

  • Hi,

    Could you provide more details regarding your code sequence? Have you integrated the SDL PBIST APIs into the BootApp? If so, at which stage is this integration being done? It would help if you could share a patch with the changes that you have made to the boot flow, so I can try to reproduce it.

    Regards,

    Josiitaa

  • Hi,

    Our group teacher previously raised a question related to BIST, please refer to:

    e2e.ti.com/.../tda4vm-pbist-lbist-execute-error

    The following patches are the BIST features that we have enabled in SDK 8.6, some of which are redundant because we have also enabled many security features.

    83.diff

    Regards,

    Guocai Yang

  • Hi,

    The A72 PBIST passes successfully in the 9.1 release of the SDK along with the Boot Application. Can you step through using a debugger to identify at which instance the PBIST is failing? It is possibly some delta in the integration that is affecting the test.

    Regards,

    Josiitaa

  • Hi,

    I confirmed the error return location by setting the error return value as shown in the following figure:

    Regards,

    Guocai Yang

  • Could you step into the PBIST_runTest API and check at which instance, the testResult value is set to -1?

    Regards,

    Josiitaa

  • Hi,

    In follow function:

    At the end, it is set to -1 at the position shown in the following figure:

    Regards,

    Guocai Yang

  • Hi,

    Could you implement the changes in this patch to your code and check if you are still seeing a failure?

    From 9d6806e1c14f6e2c09b71855f3c6a14fed03b7b1 Mon Sep 17 00:00:00 2001
    From: Josiitaa <j-rl@ti.com>
    Date: Wed, 18 Jan 2023 15:25:02 +0530
    Subject: [PATCH] SDL BIST Integration with Boot App 8.2
    
    ---
     mcusw/mcuss_demos/boot_app_mcu_rtos/makefile | 4 ++--
     sdl/examples/bist/pbist/pbist_utils.c        | 5 +++--
     2 files changed, 5 insertions(+), 4 deletions(-)
    
    diff --git a/mcusw/mcuss_demos/boot_app_mcu_rtos/makefile b/mcusw/mcuss_demos/boot_app_mcu_rtos/makefile
    index c95a85a7..2b364c5a 100755
    --- a/mcusw/mcuss_demos/boot_app_mcu_rtos/makefile
    +++ b/mcusw/mcuss_demos/boot_app_mcu_rtos/makefile
    @@ -69,7 +69,7 @@ INCDIR += $(PDK_SBL_COMP_PATH)/src/rprc
     INCDIR += $(PDK_SBL_COMP_PATH)/src/ospi
     INCDIR += $(PDK_SBL_COMP_PATH)/src/mmcsd
     INCDIR += $(PDK_SBL_COMP_PATH)/soc/k3
    -
    +SRCDIR += $(SDL_INSTALL_PATH)/test/osal/src
     INCDIR += $(PDK_INSTALL_PATH)
     INCDIR += $(PDK_INSTALL_PATH)/ti/board
     ifeq ($(SOC),$(filter $(SOC), j7200))
    @@ -214,7 +214,7 @@ ifeq ($(SOC),$(filter $(SOC), j721e j7200))
     endif
     endif
     endif
    -SRCS_COMMON += bist.c lbist_utils.c pbist_utils.c lbist_defs.c pbist_defs.c bist_core_defs.c sdl_lbist.c sdl_pbist.c sdl_ip_lbist.c sdl_ip_pbist.c sdl_soc_lbist.c sdl_soc_pbist.c sdl_osal.c power_seq.c armv8_power_utils.c
    +SRCS_COMMON += bist.c lbist_utils.c pbist_utils.c lbist_defs.c pbist_defs.c bist_core_defs.c sdl_lbist.c sdl_pbist.c sdl_ip_lbist.c sdl_ip_pbist.c sdl_soc_lbist.c sdl_soc_pbist.c sdl_osal.c power_seq.c armv8_power_utils.c osal_interface.c
     # Common source files and CFLAGS across all platforms and cores
     SRCS_COMMON += Can_Cfg.c Can_PBcfg.c Dio_Lcfg.c
     
    diff --git a/sdl/examples/bist/pbist/pbist_utils.c b/sdl/examples/bist/pbist/pbist_utils.c
    index c995fc89..1216060a 100644
    --- a/sdl/examples/bist/pbist/pbist_utils.c
    +++ b/sdl/examples/bist/pbist/pbist_utils.c
    @@ -80,7 +80,8 @@
     #include <ti/csl/csl_cbass.h>
     #include <ti/drv/uart/UART_stdio.h>
     #include <ti/drv/sciclient/sciclient.h>
    -
    +#include <osal/sdl_osal.h>
    +#include <test/osal/osal_interface.h>
     
     /* Osal API header files */
     #include <ti/osal/TimerP.h>
    @@ -341,7 +342,7 @@ int32_t PBIST_runTest(uint32_t instanceId, bool runNegTest)
         uint64_t startTime , testStartTime,  testEndTime, endTime;
         uint64_t prepTime, diffTime, restoreTime;
     #endif
    -
    +    SDL_TEST_osalInit();
         if (runNegTest == true)
         {
             UART_printf("\n Starting PBIST failure insertion test on %s, index %d...\n",
    -- 
    2.34.1
    
    

    Regards,

    Josiitaa

  • Hi,

    I added the modifications in the document but still failed, and the sentence in the above modification should not have been added because it only introduced the path rather than copying the file:

    -SRCS_COMMON += bist.c lbist_utils.c pbist_utils.c lbist_defs.c pbist_defs.c bist_core_defs.c sdl_lbist.c sdl_pbist.c sdl_ip_lbist.c sdl_ip_pbist.c sdl_soc_lbist.c sdl_soc_pbist.c sdl_osal.c power_seq.c armv8_power_utils.c
    +SRCS_COMMON += bist.c lbist_utils.c pbist_utils.c lbist_defs.c pbist_defs.c bist_core_defs.c sdl_lbist.c sdl_pbist.c sdl_ip_lbist.c sdl_ip_pbist.c sdl_soc_lbist.c sdl_soc_pbist.c sdl_osal.c power_seq.c armv8_power_utils.c osal_interface.c

    Regards,

    Guocai Yang

  • Hi,

    You were supposed to add the SDL_TEST_osalInit() API as shown in the patch. Not just the header files.

    Regards,

    Josiitaa

  • Hi,

    I checked the code and found that SDL had already been executed before enabling the BIST function_ TEST_ OsalInit() function.Are there any other modifications made?

    Regards,

    Guocai Yang

  • Could you clarify what you mean by SDL had been executed? You need to include SDL_TEST_osalInit at start of your PBIST_runTest API.

    Regards,

    Josiitaa

  • Hi,

    I have done this function in FS_MCU_initZero(), and bist function run in bist_TaskFxn(), so I said have done SDL_TEST_osalInit before bist.

    Regards,

    Guocai Yang

  • Hi,

    We have rewritten the file and function.

    Regards,

    Guocai Yang

  • Hi,

    With the understanding that the SDL_TEST_osalInit is called before BIST, our next step would be to step into the SDL_PBIST_selfTest API to see what the source of the error is. You could also simultaneously run the standalone BIST example application to see if the A72 failure occurs.

    Regards,

    Josiitaa

  • Hi,

    I'm sorry for the late reply. As shown in the picture I sent earlier, I'm sure it's because the variables pInfo->doneFlag were not set and not completed, the issue I identified is as shown in the following picture:

    Regards,

    Guocai Yang

  • HI,

    I use the bist_examples of SDL library on SDK8.6 were tested, as shown in the following figure:

    Regards,

    Guocai Yang

  • Hi,

    As shown in the picture I sent earlier, I'm sure it's because the variables pInfo->doneFlag were not set and not completed

    I have understood that the flag is not sent and hence we see the failure, I would like to understand at which point within the SDL_PBIST_selfTest API the failure occurs.

    I use the bist_examples of SDL library on SDK8.6 were tested,

    It looks like the standalone application itself fails in your setup.

    Could you try running the application with the steps from this FAQ? [FAQ] TDA4VM: SDL BIST Example Application Failing on SDK 8.6

    Regards,

    Josiitaa

  • Hi,

    I have tried, and the following is the log I executed. Could you please check if all tests have passed?

    BIST Example Application
    
     Starting PBIST failure insertion test on PBIST HWPOST MCU, index 0...
    
     Starting PBIST failure insertion test on Main Infra PBIST, index 12...
    
     Starting PBIST failure insertion test on MSMC PBIST, index 13...
    
     Starting PBIST test on PBIST HWPOST MCU, index 0...
        HW POST MCU Status : SDL_PBIST_POST_COMPLETED_SUCCESS
    
     Starting PBIST test on Main Infra PBIST, index 12...
    
     Starting PBIST test on MSMC PBIST, index 13...
        HW POST MCU Status : SDL_LBIST_POST_COMPLETED_SUCCESS
        HW POST DMSC Status : SDL_LBIST_POST_COMPLETED_SUCCESS
        HW POST MCU Status : SDL_LBIST_POST_COMPLETED_SUCCESS
        HW POST DMSC Status : SDL_LBIST_POST_COMPLETED_SUCCESS
    
     Starting PBIST failure insertion test on Main R5F 0 PBIST, index 2...
    
     Starting PBIST test on Main R5F 0 PBIST, index 2...
    
     *** Boot stage 0 is complete, cores for this stage may now be loaded ***
    
    
     Starting PBIST failure insertion test on Main R5F 1 PBIST, index 3...
    
     Starting PBIST failure insertion test on C7X PBIST, index 4...
    
     Starting PBIST failure insertion test on C6x core 0 PBIST, index 10...
    
     Starting PBIST failure insertion test on C6x core 1 PBIST, index 11...
    
     Starting PBIST failure insertion test on VPAC PBIST, index 6...
    
     Starting PBIST failure insertion test on DMPAC PBIST, index 7...
    
     Starting PBIST failure insertion test on A72 PBIST, index 5...
    
     Starting PBIST failure insertion test on HC PBIST, index 9...
    
     Starting PBIST failure insertion test on Encoder PBIST, index 14...
    
     Starting PBIST failure insertion test on Decoder PBIST, index 15...
    
     Starting PBIST test on Main R5F 1 PBIST, index 3...
    
     Starting PBIST test on C7X PBIST, index 4...
    
     Starting PBIST test on C6x core 0 PBIST, index 10...
    
     Starting PBIST test on C6x core 1 PBIST, index 11...
    
     Starting PBIST test on VPAC PBIST, index 6...
    
     Starting PBIST test on DMPAC PBIST, index 7...
    
     Starting PBIST test on A72 PBIST, index 5...
    
     Starting PBIST test on HC PBIST, index 9...
    
     Starting PBIST test on Encoder PBIST, index 14...
    
     Starting PBIST test on Decoder PBIST, index 15...
    
     *** Boot stage 1 is complete, cores for this stage may now be loaded ***
    
    
     *** Boot stage 2 is complete, cores for this stage may now be loaded ***
    
    ==========================
    BIST: Example App Summary:
    ==========================
    BIST: Pre-boot Stage - Ran negative PBIST ID - PBIST_HWPOST_MCU_INDEX, Result = PASS
    BIST: Pre-boot Stage - Ran negative PBIST ID - PBIST_INSTANCE_MAIN_INFRA, Result = PASS
    BIST: Pre-boot Stage - Ran negative PBIST ID - PBIST_INSTANCE_MSMC, Result = PASS
    Pre-boot stage - Ran 3 negative PBIST total sections
    BIST: Pre-boot Stage - Ran PBIST ID - PBIST_HWPOST_MCU_INDEX, Result = PASS
    BIST: Pre-boot Stage - Ran PBIST ID - PBIST_INSTANCE_MAIN_INFRA, Result = PASS
    BIST: Pre-boot Stage - Ran PBIST ID - PBIST_INSTANCE_MSMC, Result = PASS
    Pre-boot stage - Ran 3 PBIST total sections
    BIST: Pre-boot Stage - Ran LBIST ID - LBIST_HWPOST_DMSC_INDEX, Result = LBIST_POST_COMPLETED_SUCCESS
    BIST: Pre-boot Stage - Ran LBIST ID - LBIST_HWPOST_MCU_INDEX, Result = LBIST_POST_COMPLETED_SUCCESS
    Pre-boot stage - Ran 2 LBIST total sections
    BIST: Stage 0 - Ran negative PBIST ID - PBIST_INSTANCE_MAIN_PULSAR_0, Result = PASS
    BIST: Stage 0 - Ran 1 negative PBIST total sections
    BIST: Stage 0 - Ran PBIST ID - PBIST_INSTANCE_MAIN_PULSAR_0, Result = PASS
    BIST: Stage 0 - Ran 1 PBIST total sections
    BIST: Stage 0 - Ran LBIST ID - LBIST_MAIN_MCU0_INDEX, Result = PASS
    BIST: Stage 0 - Ran 1 LBIST sections
    BIST: Stage 1 - Ran negative PBIST ID - PBIST_INSTANCE_MAIN_PULSAR_1, Result = PASS
    BIST: Stage 1 - Ran negative PBIST ID - PBIST_INSTANCE_C7X, Result = PASS
    BIST: Stage 1 - Ran negative PBIST ID - PBIST_INSTANCE_C66X_0, Result = PASS
    BIST: Stage 1 - Ran negative PBIST ID - PBIST_INSTANCE_C66X_1, Result = PASS
    BIST: Stage 1 - Ran negative PBIST ID - PBIST_INSTANCE_VPAC, Result = PASS
    BIST: Stage 1 - Ran negative PBIST ID - PBIST_INSTANCE_DMPAC, Result = PASS
    BIST: Stage 1 - Ran negative PBIST ID - PBIST_INSTANCE_A72, Result = PASS
    BIST: Stage 1 - Ran negative PBIST ID - PBIST_INSTANCE_HC, Result = PASS
    BIST: Stage 1 - Ran negative PBIST ID - PBIST_INSTANCE_ENCODER, Result = PASS
    BIST: Stage 1 - Ran negative PBIST ID - PBIST_INSTANCE_DECODER, Result = PASS
    BIST: Stage 1 - Ran 10 negative PBIST total sections
    BIST: Stage 1 - Ran PBIST ID - PBIST_INSTANCE_MAIN_PULSAR_1, Result = PASS
    BIST: Stage 1 - Ran PBIST ID - PBIST_INSTANCE_C7X, Result = PASS
    BIST: Stage 1 - Ran PBIST ID - PBIST_INSTANCE_C66X_0, Result = PASS
    BIST: Stage 1 - Ran PBIST ID - PBIST_INSTANCE_C66X_1, Result = PASS
    BIST: Stage 1 - Ran PBIST ID - PBIST_INSTANCE_VPAC, Result = PASS
    BIST: Stage 1 - Ran PBIST ID - PBIST_INSTANCE_DMPAC, Result = PASS
    BIST: Stage 1 - Ran PBIST ID - PBIST_INSTANCE_A72, Result = PASS
    BIST: Stage 1 - Ran PBIST ID - PBIST_INSTANCE_HC, Result = PASS
    BIST: Stage 1 - Ran PBIST ID - PBIST_INSTANCE_ENCODER, Result = PASS
    BIST: Stage 1 - Ran PBIST ID - PBIST_INSTANCE_DECODER, Result = PASS
    BIST: Stage 1 - Ran 10 PBIST total sections
    BIST: Stage 1 - Ran LBIST ID - LBIST_MAIN_MCU1_INDEX, Result = PASS
    BIST: Stage 1 - Ran LBIST ID - LBIST_C7X_CORE_INDEX, Result = PASS
    BIST: Stage 1 - Ran LBIST ID - LBIST_VPAC_INDEX, Result = PASS
    BIST: Stage 1 - Ran LBIST ID - LBIST_DMPAC_INDEX, Result = PASS
    BIST: Stage 1 - Ran 4 LBIST sections
    BIST: Stage 2 - Ran 0 negative PBIST total sections
    BIST: Stage 2 - Ran 0 PBIST total sections
    BIST: Stage 2 - Ran LBIST ID - LBIST_A72_CORE_INDEX, Result = PASS
    BIST: Stage 2 - Ran 1 LBIST sections
    main.c:200:bist_example_app:PASS
    
    -----------------------
    1 Tests 0 Failures 0 Ignored
    OK
    

    Regards,

    Guocai Yang

  • Yes, all tests have passed. What was the change that you made? Could you try implementing the same with the BootApp?

    Regards,

    Josiitaa

  • Hi,

    I just rolled back my version to before making any bist modifications, added the modifications in the link to the code, and compiled the bist program in the SDL library, resulting in the content in the document just now.

    Next, I will differentiate between the patch and my code repository, and add different content for post testing. Also, thank you very much.

    Regards,

    Guocai Yang

  • Hi.

    I want to know if negative testing is necessary, and if I remove negative testing, will it have a negative impact on the testing process under default configuration?

    Regards,

    Guocai Yang

  • Hi,

    Glad to hear that the BIST tests work now. I will check with the internal team and get back to you regarding the negative testing. Is there any reason why you want to remove the negative tests?

    Regards,

    Josiitaa

  • Hi,

    We believe that conducting only one test is sufficient, and negative testing is unnecessary and would waste startup time, so we did not conduct negative testing.

    Regards,

    Guocai Yang

  • I will discuss this approach internally and get back to you in a couple of days.

    Regards,

    Josiitaa

  • Hi,

    I found an issue because I deleted negative tests, which resulted in the absence of the PBIST_clecConfig(pbist_array[i])  function in my code. Is this function mandatory in PBIST_runTest? Or is it just necessary to call in negative?

    I tried to add this function to my own code and found that executing C7X would cause it to freeze. Does SDK8.6 have a locking mechanism for this part of the register?

    Regards,

    Guocai Yang

  • Hi,

    I am yet to get a confirmation from the internal team regarding the possibility of removing the negative tests. If it is indeed a valid approach, I will check the requirements of the PBIST_clecConfig function. I will post a update latest by the end of this week.

    Regards,

    Josiitaa

  • Hi,

    I have gone through all the modifications you provided before using the BIST example, and I also added this part to my own code. However, I found that it got stuck on C7X and did not continue to execute downwards.

    Regards,

    Guocai Yang

  • Hi,

    Is this the standalone BIST application or BIST integrated with BootApp?

    This is the same as the issue mentioned in the FAQ that I had shared:

    Could you try running the application with the steps from this FAQ? [FAQ] TDA4VM: SDL BIST Example Application Failing on SDK 8.6

    The steps mentioned in the above FAQ should fix your issue.

    Regards,

    Josiitaa

  • Hi,

    These modifications can indeed pass the example testing in the SDL library, but if I add the modifications to the current mcusw/mcuss_demos/boot_app_mcu_rtos path and enable BISTFUNC in the makefile, it cannot be completed or even freezes during execution. Have you passed the BIST function testing in SDK9.1 for mcusw/mcuss_demos/boot_app_mcu_rtos path? Can you send me a copy of the modifications?

    Regards,

    Guocai Yang

  • Hi,

    From SDK 9.1 onwards, the MCU R5 can modify the CLEC, as updated SYSFW image is allowing for this and hence the requirement to load an external C7X binary to perform CLEC configurations has been removed. I did not require any modifications in this case.

    The issue that you are facing is most likely because you are not loading the multicore combined app image. You will have to combine the C7x CLEC image with the boot app image, to generate a multicore image and then boot.

    Regards,

    Josiitaa

  • Hi,

    I don't know how to load multi-core composite application images. Can you give me an example and a detailed implementation method?

    Regards,

    Guocai Yang

  • Hi,

    Please refer to this snippet to to stitch multiple .rprc images into a multicore image.

    NOTE:

    1. In the above combined image command, Make sure you are writing the correct core number. It can found at (..\packages\ti\boot\sbl\soc\k3\sbl_slave_core_boot.h)

    • #define MCU1_CPU0_ID (8U), Here 8 is the core number for the mcu1_0 core.
    • #define DSP1_C7X_ID (18U), here 18 is the core number for the c7x core.

    2. Provide path before each file, if and only if unable to execute the combined image step.

    The .rprc file of the boot app (can_boot_app_mcu_rtos_mcu1_0_release.rprc) will be loaded on to the mcu1_0 core and the sciclient_clear_clec_secure_claim_c7x_1_release.rprc present in (PDK_INSTALL_PATH)/ti/drv/sciclient/tools/clearClecSecureClaim/ must be loaded on the C7x core.

    Once you have generated the mulicore image, load it as the appimage.

    Regards,

    Josiitaa