Ignore:
Timestamp:
Jul 26, 2012, 5:43:08 PM (12 years ago)
Author:
karaoui
Message:

new version of map.xml supporting the routage and the coproc.
the xml_parser/xml_driver are also updated aproprietly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/xml/mapping_info.h

    r173 r181  
    4646#define MAPPING_PSEG_SIZE           sizeof(mapping_pseg_t)
    4747#define MAPPING_TASK_SIZE           sizeof(mapping_task_t)
     48#define MAPPING_PROC_SIZE           sizeof(mapping_proc_t)
     49#define MAPPING_IRQ_SIZE            sizeof(mapping_irq_t)
     50#define MAPPING_COPROC_SIZE         sizeof(mapping_coproc_t)
     51#define MAPPING_CP_PORT_SIZE    sizeof(mapping_coproc_port_t)
     52#define MAPPING_CP_REG_SIZE         sizeof(mapping_coproc_reg_t)
    4853
    4954#define C_MODE_MASK     0b1000      // cacheable
     
    6772};
    6873
     74enum
     75{
     76    PSEG_TYPE_RAM     = 0,
     77    PSEG_TYPE_ROM     = 1,
     78    PSEG_TYPE_PERI    = 2,
     79};
     80
     81enum
     82{
     83    IRQ_TYPE_HARD     = 0,          // hardware interrupt (peripheral)
     84    IRQ_TYPE_SOFT     = 1,          // software interrupt (IPI)
     85};
     86
     87enum
     88{
     89    ISR_SWITCH        = 0,
     90    ISR_IOC           = 1,
     91    ISR_FBDMA         = 2,
     92    ISR_TTY           = 3,
     93};
     94
     95enum
     96{
     97    REG_TYPE_STATUS   = 0,          // status register
     98    REG_TYPE_CONFIG   = 1,          // config register
     99};
     100
     101enum
     102{
     103    PORT_TO_COPROC    = 0,          // status register
     104    PORT_FROM_COPROC  = 1,          // config register
     105};
    69106
    70107///////////////////////////////
     
    73110    unsigned int    signature;      // must contain MAPPING_SIGNATURE
    74111        unsigned int    clusters;           // number of clusters
    75         unsigned int    psegs;          // number of psegs
    76112    unsigned int    ttys;           // number of TTY terminals
    77     unsigned int    fbs;            // number of Frame Buffer DMA channels
     113    unsigned int    fbs;            // number of FBDMA channels
    78114        unsigned int    globals;                // number of vsegs mapped in all vspaces
    79115        unsigned int    vspaces;                // number of virtual spaces
     116    unsigned int    psegs;          // total number of physical segments (for all clusters)
    80117        unsigned int    vsegs;                  // total number of virtual segments (for all vspaces)
    81118        unsigned int    vobjs;                  // total number of virtual objects (for all vspaces)
    82119        unsigned int    tasks;                  // total number of tasks (for all vspaces)
     120        unsigned int    procs;                  // total number of procs
     121        unsigned int    irqs;           // total number of irqs
     122        unsigned int    coprocs;                // total number of coprocs
     123        unsigned int    cp_ports;               // total number of cp_ports
     124        unsigned int    cp_regs;                // total number of cp_regss
    83125    char            name[32];       // mapping name
    84126} mapping_header_t;
     
    88130{
    89131    unsigned int    procs;          // number of processors in cluster
     132    unsigned int    proc_offset;    // index of first proc in proc set
     133    unsigned int    coprocs;        // number of coprocessors in cluster
     134    unsigned int    coproc_offset;  // index of first coproc in coproc set
     135    unsigned int    psegs;          // number of psegs in cluster
     136    unsigned int    pseg_offset;    // index of first pseg in pseg set
    90137} mapping_cluster_t;
    91138
     
    96143        unsigned int    base;           // base address in physical space
    97144        unsigned int    length;         // size (bytes)
     145    unsigned int    type;           // RAM / ROM / PERI
     146    unsigned int    cluster;        // index of cluster containing pseg
    98147    unsigned int    next_base;      // first free page base address
    99148} mapping_pseg_t;
     
    119168        unsigned int    pbase;          // base address in physical space (hexa)
    120169        unsigned int    length;         // size (bytes)
    121         unsigned int    psegid;         // physical segment index
     170        unsigned int    psegid;         // physical segment global index
    122171        unsigned int    mode;           // C-X-W-U flags
    123172    unsigned int    ident;          // identity mapping if non zero
     
    148197        unsigned int    vaddr;          // virtual base addresse of the vobj
    149198        unsigned int    paddr;          // physical base addresse of the vobj
    150         unsigned int    init;           // init value (number of participants for a barrier)
     199        unsigned int    init;           // init value (used by barrier or mwmr channel)
    151200} mapping_vobj_t;
     201
     202/////////////////////////////
     203typedef struct mapping_proc_s
     204{
     205    unsigned int    irqs;           // number of IRQs allocated to processor
     206    unsigned int    irq_offset;     // index of first IRQ allocated to processor
     207} mapping_proc_t;
     208
     209/////////////////////////////
     210typedef struct mapping_irq_s
     211{
     212    unsigned int    type;           // HW_IRQ  / SW_IRQ
     213    unsigned int    icuid;          // IRQ Index for the ICU component
     214    unsigned int    isr;            // Interrupt Service Routine Index
     215    unsigned int    channel;        // Channel Index (for multi-cannels peripherals)
     216
     217    unsigned int    cluster_id;     // physical cluster index
     218        unsigned int    proclocid;      // processor local index (inside cluster)
     219} mapping_irq_t;
     220
     221///////////////////////////////
     222typedef struct mapping_coproc_s
     223{
     224    char            name[32];       // coprocessor name
     225    unsigned int    psegid;         // pseg index in cluster
     226    unsigned int    ports;          // number of MWMR ports used by coprocessor
     227    unsigned int    port_offset;    // index of first MWMR port used by coprocessor
     228    unsigned int    regs;           // number of config/status registers
     229    unsigned int    reg_offset;     // index of first register
     230} mapping_coproc_t;
     231
     232///////////////////////////////////////
     233typedef struct mapping_coproc_port_s
     234{
     235    unsigned int    direction;      // TO_COPROC == 0 / FROM_COPROC == 1
     236    unsigned int    vspaceid;      // global index of the vspace containing the MWMR channel
     237    unsigned int    vobjlocid;        // local(to vspace) index of the vobj containing the MWMR channel
     238} mapping_coproc_port_t;
     239
     240///////////////////////////////////
     241typedef struct mapping_coproc_reg_s
     242{
     243    char            name[32];       // register name
     244    unsigned int    type;           // STATUS = 0 / CONFIG == 1
     245    unsigned int    loc_id;         // register index in coprocessor (word offset)
     246    unsigned int    channel_id;     // channel index in coprocessor (page offset)
     247    unsigned int    value;          // initialisation value
     248}  mapping_coproc_reg_t;
    152249
    153250#endif
Note: See TracChangeset for help on using the changeset viewer.