Changeset 870ff8e9 in rtems for c/src/lib/libbsp/arm/tms570/irq


Ignore:
Timestamp:
Nov 12, 2015, 10:11:31 PM (4 years ago)
Author:
Pavel Pisa <pisa@…>
Branches:
master
Children:
38404cb
Parents:
2f95794e
git-author:
Pavel Pisa <pisa@…> (11/12/15 22:11:31)
git-committer:
Gedare Bloom <gedare@…> (11/18/15 15:19:46)
Message:

bsp/tms570: use POM only when application image does not start at address 0.

Parameters overlay module is initialized and cleared first.
It is used later to replace exception target vectors
only if that is required.

The application loader code with CPU and SDRAM setup
code has to provide well defined pattern of instructions
at addresses 0x00000000 and 0x0000001f, because only data
read accesses can be processed reliably by POM. The expected
instruction pattern can be seen in the next example

https://github.com/hornmich/tms570ls3137-hdk-sdram/blob/master/SDRAM_SCI_configuration/source/sys_intvecs.asm

Comments with detailed description of code, background
and reasons for selected approach have been included
in TMS570 bsp startup code.

Signed-off-by: Pavel Pisa <pisa@…>
Signed-off-by: Premysl Houdek <kom541000@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/tms570/irq/irq.c

    r2f95794e r870ff8e9  
    202202   */
    203203  sctlr &= ~(1 << 24);
     204  #if 0
     205    /*
     206     * Option to enable exception table bypass for interrupts
     207     *
     208     * Because RTEMS requires all interrupts to be serviced through
     209     * common _ARMV4_Exception_interrupt handler to allow task switching
     210     * on exit from interrupt working correctly, vim_vec cannot point
     211     * directly to individual vector handlers and need to point
     212     * to single entry path. But if TMS570_VIM.IRQINDEX is then used
     213     * to target execution to corresponding service then for some
     214     * peripherals (i.e. EMAC) interrupt is already acknowledged
     215     * by VIM and IRQINDEX is read as zero which leads to spurious
     216     * interrupt and peripheral not serviced/blocked.
     217     *
     218     * To analyze this behavior we used trampolines which setup
     219     * bsp_interrupt_vector_inject and pass execution to
     220     * _ARMV4_Exception_interrupt. It works but is more ugly than
     221     * use of POM remap for these cases where application does not
     222     * start at address 0x00000000. If RTEMS image is placed at
     223     * memory space beginning then no of these constructs is necessary.
     224     */
     225    sctlr |= 1 << 24;
     226  #endif
    204227  asm volatile ("mcr p15, 0, %0, c1, c0, 0\n": : "r" (sctlr));
    205228
Note: See TracChangeset for help on using the changeset viewer.