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.

Boot table format / alignment

I am working on a SRIO Bootloader using the TI srioboot example and have some questions about the format of the srioboot_ddrinit.bin file included with MCSDK 2_01_02_06. When I attempt to parse this boot loader from our Host which is driving the SRIO Boot I end up with table sizes that are not a multiple of 4.

What looks wrong is the section at 0x10811184 which is 434 bytes long but is not a multiple of 4 bytes, but in the binary data this table is actually 436 bytes long. Is it correct that my host application must always round the Boot table size up a multiple of 4 bytes? If our host application does not round the boot table sizes up, the reset of the binary parsing is out of sync.

Here are the boot tables I see when parsing srioboot_ddrinit.bin included with the MCSDK.

Boot Address 0x1080CF00

Address                 Size

0x10800000     0xD660

0x10811184     0x164

0x10810CF0   0x1B2

0x10811158    0x20

  • Hi John Connors,

    Welcome to the TI E2E forum. I hope you will find many good answers here and in the TI.com documents and in the TI Wiki Pages (for processor issues). Be sure to search those for helpful information and to browse for the questions others may have asked on similar topics (e2e.ti.com). Please read all the links below my signature.

    We will get back to you on the above query shortly. Thank you for your patience.

  • Hi,
    Is it correct that my host application must always round the Boot table size up a multiple of 4 bytes? If our host application does not round the boot table sizes up, the reset of the binary parsing is out of sync.


    I think there is not rounding required. In the SRIO host application example (srioBootExample.c), function pushData2Srio() parses the boot table and send to DSP. Only the actual size of the image has been transferred via SRIO.

    Thank you.
  • Raja,
    Thanks for the quick reply. I have looked through the srioboot_ddrinit.bin file included in the MCSDK. and I too do not understand how your srioboot_example program works correctly with the srioDdrinit.h file. It seems that it should see the same problem as our host code. If you could look at our interpretation of the ddrinit boot table and let me know where our parsing is going wrong I would appreciate it.

    To clarify again, my question is how does the 0x1B2 size work when the actual binary size is 0x1B4. If 0x1B2 is used the remainder of the file is gibberish. If the values in your srioboot_ddrinit.bin file don't agree with mine below, please let us know so we can update.

    srioboot_ddrinit.bin from MCSKD 02.01.02.06

    Byte Offset in Binary - Contents - Description
    0 0x1080CD00 Boot Address
    4 0xD660 Size
    8 0x10800000 startAddr
    C - 0xD66B boot table / data

    0xD66C 0x164 Size
    0xD670 0x10811184 startAddr
    0xD674 - 0xD7D7 boot table / data

    0xD7D8 0x1B2 Size
    0xD7DC 0x10810CF0 startAddr
    0xD7E0 - 0xD991 boot table / data

    0xD992 0xE0F00 Size
    0xD996 0x00201081 startAddr

    However if instead of 0x1B4 I use 0x1B2 the last section things start to make sense
    0xD994 0x20 Size
    0xD998 0x10811157 startAddr
    0xD99C - 0xD9B8 boot table / data
    0xD9BC 0 Size (End of boot image)

  • Could you please share your .out and .map file here?
  • Here are the files form the srioboot_ddrinit example that I am looking at.0407.bin.zip

  • Hi John Connors,

    I dig further to this and here is my observation.

    The hex6x utility aligns the boot table entries to 32 bit boundary by padding zero at the end however the host application needs to parse the entries with padded value.

    As a result of this, the host application needs some updates in function pushData2Srio() to handle this, here is the code snippet for your reference.

            /* Get the size */
            size = 	byteto32bits(pDspCode);
            if(size == 0) break;
    
            if(size%4)
            	size += (4-(size%4));
    
            pDspCode += 4;
    
            startaddr = byteto32bits(pDspCode);
            pDspCode+= 4;

    I will file a IR to correct the same on next release. Thank you for your patience.

  • Thank you Raja,
    This confirms that the rounding I added to our host App is indeed correct. That you for looking into this.
  • The IR has been filed for this issue and reference is SDOCM00120119.

    Thank you.