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.

locking hwi dispatcher in l2 cache

Other Parts Discussed in Thread: SYSBIOS

I worry that I am getting slow interrupt servicing because my dispatcher, or some item it may call has to stall the bus while it is being contained in L2 cache in OMAP4430.

My solution was to lock the dispatcher down with the other items I use to service interrupts. In my linker cmd file I did this

  GROUP(LOCKED_L2)
   {
      locked_l2_text:  // F3 sections.h: locked critical path code into L2
      .text:ti_sysbios_family_c64p_Hwi_dispatchC__I: // interrupt critical path
   }

The BIOS trickster put this in my map file

.text:ti_sysbios_family_c64p_Hwi_dispatchC__I

*          0    8e407d00    00000000     UNINITIALIZED

while keeping this

      8e441bc0    00000400     sysbios.lib : BIOS.obj (.text:ti_sysbios_family_c64p_Hwi_dispatchC__I)

Question to TI's resident geniuses: How do I really locate this dispatcher piece of the BIOS library (space is limited) into my locked cache area?


 

  • Richard,

    Are you trying to place the dispatcher into a portion of L2 configured as RAM - and not actually locking it into the L2 *cache*?  Is that correct?  Or are you doing some runtime copy of the contents of the contents of “LOCKED_L2” to fill the cache, and then lock it there?

    Assuming you want to place it in a portion of L2 configured as RAM… typically what is done to explicitly place a section into a memory segment is to use Program.sectMap() (described here: http://rtsc.eclipse.org/cdoc-tip/xdc/cfg/Program.html#sect.Map). 

    For example, to place the dispatcher’s assembly entry code and C dispatch function into to an “L2SRAM” region you could add this in the application’s .cfg configuration file:

    Program.sectMap[".text:_ti_sysbios_family_c64p_Hwi_dispatchAlways"] = new Program.SectionSpec();
    Program.sectMap[".text:_ti_sysbios_family_c64p_Hwi_dispatchAlways"].loadSegment = "L2SRAM"

    Program.sectMap[".text:_ti_sysbios_family_c64p_Hwi_dispatchC__I"] = new Program.SectionSpec();
    Program.sectMap[".text:_ti_sysbios_family_c64p_Hwi_dispatchC__I"].loadSegment = "L2SRAM"

    Will this work for what you want to do?

    Scott

  • Thanks for your reply.

    It ought to be the solution I seek but...

    In this project section mapping is done in an xdt file.

    Asserting these instructions in the cfg file is aphasiac . No errors are declared but no actions are taken.

    I now have 2 problems: Calling and naming my own exception handler(see previous forum dialog) in the Interrupt vector table and placing the dispatcher where I want it.

    Time to dig in to XDT user's manual.

  • Richard,

    Can you post your .xdt file?  

    If you are seeing *no* effect at all (no movement, nor warnings or errors) then I expect the relevant template section is not being expanded for the build.

    I expected you to add this to your application’s .cfg file.  Can you try it there first, even if you want to have it in an xdt file eventually?  

    Before sending you the recommendation on using Program.sectMap() I’d double checked what I thought would work for you, not on an OMAP4430 but on another C64x+ target I had handy, and saw the expected movement of the dispatcher code in the map file.  So… I think this should indeed work for you, but there is an issue with the usage in the .xdt file…

    Scott