AnsweredAssumed Answered

imx28 hab No HAB Events Found

Question asked by bruce chen on Jun 28, 2016
Latest reply on Jul 3, 2016 by Yuri Muhin

1.I am use BitInit.exe burn OtpInit.sb and the bit_setting.txt like below

    

     *chip-family-mx28*

     lock_rom0 = true

     lock_cryptodcp = true

     lock_cryptodcp_alt = true

 

2. useing Mfgtool programming updater_ivt.sb, the imx28 serial port output

 

    

3. The display event code like below:

 

typedef hab_status_t hab_rvt_report_event_t (hab_status_t, uint32_t, uint8_t* , size_t*);

#define HAB_RVT_REPORT_EVENT (*(uint32_t*) 0xFFFF8B18)

#define hab_rvt_report_event ((hab_rvt_report_event_t*)HAB_RVT_REPORT_EVENT)

hab_status_t g_hab_status;

 

void display_event(uint8_t *event_data, size_t bytes)

{

    uint32_t i;

    if ((event_data) && (bytes > 0))

        {

        for (i = 0; i < bytes; i++)

        {

            if (i == 0)

            {

                printf("    0x%02x", event_data[i]);

            }

            else if ((i % 8) == 0)

            {

                printf("\n    0x%02x", event_data[i]);

            }

            else

            {

                printf(" 0x%02x", event_data[i]);

            }

        }

    }

}

   

uint8_t      event_data[128];

void get_hab_status(void)

{

        uint32_t     index = 0;

        size_t       bytes = sizeof(event_data);

    uint8_t      no_events = 1;

 

 

    while ((g_hab_status = hab_rvt_report_event(HAB_FAILURE, index, event_data, &bytes))

        == HAB_SUCCESS)

    {

        //no_events = 0;

        //break;

        no_events = 0;

        printf("\n");

        printf("--------- HAB Event %d -----------------\n", index + 1);

        printf("event data:\n");

        display_event(event_data, bytes);

        printf("\n");

        bytes = sizeof(event_data);

        index++;

 

 

    }

    if(no_events)

    {

        /* Including input_ivt here is simply to force the linker to include

         * it in the image and do not optimize it away.

         */

        printf("No HAB Events Found! %d\n", input_ivt.ivt.reserved2);

    }

    else

    {

        printf("Some HAB Events Found!\n");

    }

}

 

 

I don't know why is No HAB Events Found?    Is my OtpInit.sb not enable HAB?     thanks

Outcomes