Ignore:
Timestamp:
Feb 12, 2014, 9:51:23 AM (10 years ago)
Author:
alain
Message:
  • Updatre the gier_tsar to support the vci_iopic component in the tsar_generic_leti plat-form.
  • Modify the soft_transpose_giet application to make optional the graphic display on frame buffer and to introduce a systematic auto-check
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/softs/giet_tsar/reset.S

    r622 r629  
    1010*
    1111* As we don't want to use the virtual memory, the physical address is
    12 * equal to  the virtual address (identity mapping) and all processors use
    13 * the physical memory bank in cluster 0. Both the reset base address and
    14 * the kernel base address can be redefined to use a physical memory bank
    15 * smaller than 4 Gbytes.
     12* equal to  the virtual address (identity mapping) and all processors stacks
     13* and code segments are allocated in the physical memory bank in cluster 0.
     14*
     15* Both the reset base address and the kernel base address must be redefined
     16* to use a physical memory bank smaller than 2 Gbytes.
    1617*
    1718* There is one XCU iand one MMC per cluster.
    18 * All other peripherals (including the boot ROM) are located in cluster 0.
    19 * Only two HWI interrupts are supported:
    20 * - IRQ_IN[0]      IOC
    21 * - IRQ_IN[12]     MMC
     19*
     20* There is one IOPIC component in cluster_io.
     21*
     22* There is two sets of peripherals:
     23*
     24* 1) A block device and a single channel TTY controller are available
     25*    in cluster(0,0).
     26*
     27* 2) Other peripherals (including another Blockdevice, a multi-channels TTY
     28*    contrÃŽler, a Frame buffer) are located in cluster_io.
     29*    For those externals peripherals, hardware interrupts (HWI) are translated
     30*    to software interrupts (WTI) by and IOPIC component, that is programmed
     31*    to route all SWI to to processor 0 in cluster (0,0).
    2232*
    2333* The boot sequence is the following:
     
    2535*   - Each processor initializes the CP0 EBASE register
    2636*       - Only processor 0 initializes the Interrupt vector.
     37*       - Only processor 0 initializes the IOPIC component.
    2738*   - Each processor initializes its private XCU mask.
    2839*       - Each processor initializes the Status Register (SR)
     
    3748        .extern seg_stack_base
    3849        .extern seg_xcu_base
     50        .extern seg_pic_base
    3951    .extern seg_kcode_base
    4052        .extern _interrupt_vector
    4153        .extern _ioc_isr
    4254        .extern _mmc_isr
     55    .extern _tty_isr
    4356    .extern main
    4457
     
    6275    la      $27,    seg_stack_base
    6376    addi    $26,    $10,    1               /* $26 <= (proc_id + 1)           */
    64     sll     $26,    $26,    16          /* $26 <= (proc_id + 1) * 64K     */
     77    sll     $26,    $26,    14          /* $26 <= (proc_id + 1) * 16K     */
    6578    addu    $29,    $27,    $26             /* $29 <= seg_stack_base(proc_id) */
    6679
     
    6982    mtc0    $26,    CP0_EBASE           /* CP0_EBASE <= seg_kcode_base */
    7083
    71 /* only proc (0,0,0) initializes interrupt vector */
     84/* only proc (0,0,0) initializes interrupt vector for IOC, TTY, MMC     */
    7285    bne     $10,    $0,    reset_xcu
    7386    nop
    7487
    75     la      $26,    _interrupt_vector   /* interrupt vector address */
     88    la      $26,    _interrupt_vector   /* interrupt vector address                */
     89    la      $27,    _mmc_isr
     90    sw      $27,    32($26)             /* interrupt_vector[8] <= _mmc_isr         */
    7691    la      $27,    _ioc_isr
    77     sw      $27,     0($26)             /* interrupt_vector[0] <= _isr_ioc */
    78     la      $27,    _mmc_isr
    79     sw      $27,     48($26)            /* interrupt_vector[12] <= _isr_mmc */
    80    
     92    sw      $27,    36($26)             /* interrupt_vector[9] <= _ioc_isr         */
     93    la      $27,    _tty_isr
     94    sw      $27,    40($26)             /* interrupt_vector[10] <= _tty_isr        */
     95
     96/* only proc (0,0,0) initializes IOPIC : IOPIC_ADDRESS[i] <= &XICU[0].WTI_REG[i]   */
     97
     98    li      $20,    X_SIZE
     99    addi    $20,    $20,    -1
     100    sll     $20,    $20,    4
     101    li      $21,    Y_SIZE
     102    add     $22,    $20,    $21         /* $22 <= cluster(X_SIZE-1, Y_SIZE)        */
     103
     104    mtc2    $22,    CP2_PADDR_EXT       /* CP2_PADDR_EXT <= cluster_io             */
     105
     106    li      $24,    16                  /* $24  iteration (de)counter              */
     107    la      $27,    seg_xcu_base        /* $27 <= &(XICU[0].WTI_REG[0])            */
     108    la      $26,    seg_pic_base        /* $26 <= &IOPIC_ADDRESS[0]                */
     109
     110reset_loop:
     111    sw      $27,    0($26)              /* IOPIC_ADDRESS[i] <= &XICU[0].WTI_REG[i] */
     112    addi    $24,    $24,    -1          /* decrement iteration index               */
     113    addi    $27,    $27,     4          /* $27 <= &(XICU[0].WTI_REG[i++]           */
     114    addi    $26,    $26,     16         /* $26 <= &IOPIC_ADDRESS[i++]              */
     115    bne     $24,    $0, reset_loop
     116    nop
     117
     118    mtc2    $0,     CP2_PADDR_EXT       /* CP2_PADDR_EXT <= zero                   */
     119   
    81120reset_xcu:
    82121
    83 /* only proc (x,y,0) receive IRQs and initialise its private XCU mask */
     122/* only proc (x,y,0) receive IRQs and initialise HWI and WTI XICU masks */
    84123    bne     $11,    $0,     reset_end
    85124    nop
    86125    la      $26,    seg_xcu_base
    87     li      $27,    0b010010000000      /* offset for MSK_HWI_ENABLE & lpid == 0 */
    88     addu    $24,    $26,    $27         /* $24 <= &MASK  */
    89     li      $25,    0x00001001              /* IOC: IRQ[0] / MEMC: IRQ[12] */
    90     sw      $25,    0($24)              /* set MASK */
     126    li      $27,    0b010010000000      /* offset for MSK_HWI_ENABLE[lpid == 0]    */
     127    addu    $24,    $26,    $27         /* $24 <= &HWI_MASK                        */
     128    li      $25,    0x0700                      /* TTY:HWI[10]  IOC:HWI[9]  MEMC:HWI[8]    */
     129    sw      $25,    0($24)              /* set HWI mask                            */
     130
     131    li      $27,    0b011010000000      /* offset for MSK_WTI_ENABLE[lpid == 0]    */
     132    addu    $24,    $26,    $27         /* $24 <= $WTI_MASK                        */
     133    li      $25,    0xFFFFFFFF          /* all WTI enabled                         */
     134    sw      $25,    0($24)              /* set WTI mask                            */
    91135
    92136reset_end:
Note: See TracChangeset for help on using the changeset viewer.