Changeset 302


Ignore:
Timestamp:
Feb 26, 2013, 9:19:41 AM (11 years ago)
Author:
cfuguet
Message:

Introducing IRQ_PER_PROC constant in the tsar boot loader
(pre-loader).
This constant is used to know how many XICU irq outputs
are connected to each processor.

i.e.

IRQ_PER_PROC = 3
NPROCS=2

xicu.irq_out[0] -> proc0 xicu.irq_out[3] -> proc1
xicu.irq_out[1] -> proc0 xicu.irq_out[4] -> proc1
xicu.irq_out[2] -> proc0 xicu.irq_out[5] -> proc1

This change the way the mailboxes for each processor
are calculated in the reset.S file.

Location:
trunk/softs/tsar_boot
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/softs/tsar_boot/README.txt

    r292 r302  
    44===============================================================================
    55src/        Source files
    6                         The entry point of this boot loader is the file reset.S
     6            The entry point of this boot loader is the file reset.S
    77
    88include/    Header files
     
    1313      --->  defs_platform.h:
    1414
    15                         This file is mandatory. This file defines the
     15            This file is mandatory. This file defines the
    1616             NB_PROCS per cluster, the NB_CLUSTERS and the base address of
    1717             the TTY, IOC and XICU devices.
     18             It also defines the IRQ_PER_PROC constant. This constant is used
     19             to know how many XICU irq outputs are connected to each processor.
    1820
    1921      --->  platform_soclib.dts:
    2022
    21                         Device tree file. It is mandatory if compiling
    22                         for a SOCLIB platform. If the application to execute does not use
    23                         a device tree file, create an empty one.
     23            Device tree file. It is mandatory if compiling
     24            for a SOCLIB platform. If the application to execute does not use
     25            a device tree file, create an empty one.
    2426
    2527      --->  platform_fpga.dts:
    26                         Device tree file. It is mandatory if compiling
    27                         for a FPGA platform. If the application to execute does not use
    28                         a device tree file, create an empty one.
     28            Device tree file. It is mandatory if compiling
     29            for a FPGA platform. If the application to execute does not use
     30            a device tree file, create an empty one.
    2931
    3032      --->  ldscript:
    31                         LD script defining the segments of this boot loader.
     33            LD script defining the segments of this boot loader.
    3234             We define two segments:
    3335                seg_stack_base: Base address of the stack used by processor 0
  • trunk/softs/tsar_boot/conf/platform_fpga_de2-115/defs_platform.h

    r292 r302  
    1 #define NB_PROCS        4
    2 #define NB_CLUSTERS     1
     1#define NB_PROCS     4
     2#define NB_CLUSTERS  1
    33
    4 #define IOC_BASE        0xFB000000
    5 #define VCIBD_BASE      0xFB000000
    6 #define TTY_BASE        0xFC000000
    7 #define ICU_BASE        0xFD000000
     4#define IRQ_PER_PROC 1
     5
     6#define IOC_BASE     0xFB000000
     7#define VCIBD_BASE   0xFB000000
     8#define TTY_BASE     0xFC000000
     9#define ICU_BASE     0xFD000000
  • trunk/softs/tsar_boot/src/boot_ioc.c

    r292 r302  
    33
    44#ifndef SOCLIB_IOC
    5 static struct sdcard_dev  _sdcard_device;
    6 static struct spi_dev   * _spi_device   = ( struct spi_dev * )IOC_BASE;
    7 #endif
    85
    96#ifndef SYSCLK_FREQ
     
    118#define SYSCLK_FREQ 50000000U
    129#endif
     10
     11static struct sdcard_dev  _sdcard_device;
     12static struct spi_dev   * _spi_device   = ( struct spi_dev * )IOC_BASE;
     13#endif
     14
    1315
    1416int boot_ioc_init()
  • trunk/softs/tsar_boot/src/reset.S

    r292 r302  
    9999     * Compute the output index for the Write Triggered Interruption mask.
    100100     * Each processor enable the WTI for its irq output
    101      */
    102      
    103     sll     t4,     t1,     2       /* t4 <= OUT_INDEX = local_id * 4  */
    104     li      t5,     (0xC << 7)      /* t5 <= FUNC      = XICU_MSK_HWI  */
    105     or      t4,     t4,     t5      /* t4 <= FUNC | INDEX | 00         */
    106     or      t5,     t3,     t4      /* t5 <= &XICU[MSK_WTI][OUT_INDEX] */
     101     * Each processor may have IRQ_PER_PROC private irq outputs from
     102     * the XICU
     103     */
     104
     105    move    t4,     t1              /* t4 <= local_id                   */
     106    li      t5,     IRQ_PER_PROC    /* t5 <= IRQ_PER_PROC               */
     107    multu   t4,     t5             
     108    mflo    t6                      /* t6 <= IRQ_PER_PROC * local_id    */
     109    sll     t4,     t6,     2       /* t4 <= OUT_INDEX = t6 * 4         */
     110
     111    li      t5,     (0xC << 7)      /* t5 <= FUNC      = XICU_MSK_HWI   */
     112    or      t4,     t4,     t5      /* t4 <= FUNC | INDEX | 00          */
     113    or      t5,     t3,     t4      /* t5 <= &XICU[MSK_WTI][OUT_INDEX]  */
    107114   
    108115    /* Compute and set WTI mask */
     
    142149
    143150    /**
    144      * Jump to the boot elf loader routing routine
     151     * Jump to the boot elf loader routine
    145152     * Passing as argument the block number in which it must be
    146      * the boot loader elf file
     153     * the executable elf file to load
    147154     */
    148155
     
    209216
    210217    .set reorder
     218
     219/*
     220 * vim: tabstop=4 : shiftwidth=4 : expandtab
     221 */
Note: See TracChangeset for help on using the changeset viewer.