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.

arm core boot code in OMAP-L137 DSP ubl demo code

Other Parts Discussed in Thread: OMAP-L138, OMAP-L137, OMAPL138

Hi:

Recently i'm testing Security OMAP-L138 device. I had got some problems with DSP core to wake up ARM. And finally solved by referencing http://processors.wiki.ti.com/index.php/Boot_Images_for_OMAP-L137.But i still have some questions.In this page, there is a ARM core executable demo. For this demo,DSP side's UBL, how to understand  the UBL  for boot arm code:

static const unsigned int armBootArmCodeConst[] = {
0xEA000007, // vt0: B boot
0xEAFFFFFE, // vt0: Self loop
0xEAFFFFFE, // vt0: Self loop
0xEAFFFFFE, // vt0: Self loop
0xEAFFFFFE, // vt0: Self loop
0xEAFFFFFE, // vt0: Self loop
0xEAFFFFFE, // vt0: Self loop
0xEAFFFFFE, // vt0: Self loop
// jump:, DATA:
0x00000000,
// boot:
0xE51F000C, // LDR R0, jump
0xE1A0F000, // MOV PC, R0

};

Why not  directly  write c_init00 function's address to memory at 0xFFFF 0000?

thank you!

  • Hi Chen,

    Are you trying to run linux on OMAPL137 (UBL,u-boot and linux kernel) ?

    otherwise, Are you trying to run any ARM and DSP app on OMAPL137 ?

    You have mentioned that you are using OMAPL138 device then why you are considering about OMAPL137 devcice ?

    Actually, OMAPL137 device is DSP bootable, ie DSP wakeup first and ARM second.

    If you want to run any DSP app on OMAPL137 then you can run DSP app directly through "c_init00"

    If you want to run any ARM app on OMAPL137 then you have to wakeup ARM first through DSP UBL,

    DSP executes DSP UBL which sets ARM reset vector to entry point of LED flashing program in memory.

    The "armboot" structure is used to store the "ARM reset vector"

    Why not  directly  write c_init00 function's address to memory at 0xFFFF 0000?

    The memory location where the ARM reset vector is stored (0xFFFF0000) is not accessible by the DSP. Therefore the PRU subsystem is used to perform the write.

  • Hi Titus S,

    Thanks for your attention! May be I didn't describe the question explicitly.

    I am trying to run app on bace security OMAPL138, which DSP-boot device. So when i try to run app on ARM core, it should let DSP write to PRU, and through PRU indeirectly to wake up ARM. And this is DSP's UBL work.

    And you mentioned above that  the ARM reset vector is stored in (0xFFFF0000). So is it mean that it just through PRU sets ARM's app entry point (c_int00 function) to this address, and then wake up ARM, can ARM runs?

    And in the demo (OMAPL137 DSP' ubl), the arm code seems more than the app's entry point.

    arm code:

    static const unsigned int armBootArmCodeConst[] = {
     0xEA000007,   // vt0: B boot
     0xEAFFFFFE,   // vt0: Self loop
     0xEAFFFFFE,   // vt0: Self loop
     0xEAFFFFFE,   // vt0: Self loop
     0xEAFFFFFE,   // vt0: Self loop
     0xEAFFFFFE,   // vt0: Self loop
     0xEAFFFFFE,   // vt0: Self loop
     0xEAFFFFFE,   // vt0: Self loop
     // jump:, DATA:
     0x00000000,   // app's entry point        
     // boot:
     0xE51F000C,   // LDR R0, jump
     0xE1A0F000,   // MOV PC, R0
    };

    In the above data group, the arm code there is something other to do ? and how to generate this code ?

    I change to below, and it works well too. Combine with pru code, the pru code just copy first element of this data group to arm reset vector memory.And if i delete the last two elements in this data group, it doesn't work!

    static const unsigned int armBootArmCodeConst[] = {
     // jump:, DATA:
     0x00000000,   // app's entry point        
     // boot:
     0xE51F000C,   // LDR R0, jump
     0xE1A0F000,   // MOV PC, R0
    };

    When I copy all c_int00 function body to the arm reset vector , it doesn't work!

    pru subsystem code :

    // the arm code address can be change by modifying above data group armBootArmCodeConst[8] value

    unsigned int pru_coder[] = 
    {

     0x24000080,   // Load ARM vector table address to r0
     0x24ffffc0,


     0x24000081,   // Load ARM code address to r1
     0x240000c1,


     0xf500e182,   // Read ARM code from *r1 to r2,...
     0xe500e082,   // Write ARM code from r2,... to *r0
     0x79000000,   // Self loop

    }

     

     

    Thanks Again!

     

  • Hi Chen,

    If you are working with secure OMAPL138 board then please look into the below thread to understand better that how the ARM and DSP wakeup happening.

    Also try the example provide by Rahul that support to wakeup ARM by DSP.

    http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/t/335025.aspx

  • Hi Titus S,

    I have read that thread. And both DSP and ARM work well. I'm nor very clear PRU subsystem sets ARM reset vector.

    In the PRU code, it just writes the ARM's app entry point to the ARM reset vector,and not writes  the other elemnets in the armBootArmCodeConst[] (0xE51F000C and 0xE1A0F000) into the ARM following address.

    But if delet these two elements,DSP just can't wake up ARM!

    Thanks !