Ignore:
Timestamp:
Aug 7, 2012, 6:37:49 PM (12 years ago)
Author:
alain
Message:

Introducing a new release where all initialisation
is done in the boot code.

File:
1 edited

Legend:

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

    r181 r189  
    1313// a fixed size header, and 6 variable size arrays:
    1414//
    15 // - mapping_header_t   header              (MAPPING_HEADER_SIZE)
    16 // - mapping_cluster_t  cluster[clusters]   (MAPPING_CLUSTER_SIZE * clusters)
    17 // - mapping_pseg_t     pseg[psegs]         (MAPPING_PSEG_SIZE * psegs)
    18 // - mapping_vspace_t   vspace[vspaces]     (MAPPING_VSPACE_SIZE * vspaces)
    19 // - mapping_vseg_t     vseg[vsegs]         (MAPPING_VSEG_SIZE * vsegs)
    20 // - mapping_vseg_t     vobj[vsegs]         (MAPPING_VOBJ_SIZE * vsegs)
    21 // - mapping_task_t     task[tasks]         (MAPPING_TASK_SIZE * tasks)
    22 //
    23 // The number of clusters and the number of vspaces are defined in the header.
    24 // The number of psegs are defined in each cluster.
    25 // The number of vsegs, tasks ans mwmrs are defined in each vspace.
     15// - mapping_cluster_t  cluster[] 
     16// - mapping_pseg_t     pseg[]       
     17// - mapping_vspace_t   vspace[] 
     18// - mapping_vseg_t     vseg[]     
     19// - mapping_vseg_t     vobj[]   
     20// - mapping_task_t     task[] 
     21// - mapping_irq_t      irq[irqs]   
     22// - mapping_coproc_t   coproc[]
     23// - mapping_cp_port_t  cp_port[]
     24// - mapping_periph_t   periph[]
    2625//
    2726// It is intended to be stored in the boot ROM at address MAPPING_BOOT_BASE.
    28 // For each cluster, the base address of the first pseg descriptor
    29 // is defined by a pseg_offset relative to MAPPING_BOOT_BASE.
    30 // For each vspace, the base address of the first vseg descriptor
    31 // is defined by a vseg_offset relative to MAPPING_BOOT_BASE.
    32 // For each vspace, the base address of the first task desciptor
    33 // is defined by a task_offset relative to MAPPING_BOOT_BASE.
    34 // For each vspace, the base address of the first mwmr desciptor
    35 // is defined by a mwmr_offset relative to MAPPING_BOOT_BASE.
    3627////////////////////////////////////////////////////////////////////////////
    3728
     
    4940#define MAPPING_IRQ_SIZE            sizeof(mapping_irq_t)
    5041#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)
     42#define MAPPING_CP_PORT_SIZE    sizeof(mapping_cp_port_t)
    5343
    5444#define C_MODE_MASK     0b1000      // cacheable
     
    8171enum
    8272{
    83     IRQ_TYPE_HARD     = 0,          // hardware interrupt (peripheral)
    84     IRQ_TYPE_SOFT     = 1,          // software interrupt (IPI)
    85 };
    86 
    87 enum
    88 {
    89     ISR_SWITCH        = 0,
    90     ISR_IOC           = 1,
    91     ISR_FBDMA         = 2,
    92     ISR_TTY           = 3,
    93 };
    94 
    95 enum
    96 {
    97     REG_TYPE_STATUS   = 0,          // status register
    98     REG_TYPE_CONFIG   = 1,          // config register
     73    PERIPH_TYPE_IOC   = 0,
     74    PERIPH_TYPE_TTY   = 1,
     75    PERIPH_TYPE_TIM   = 2,
     76    PERIPH_TYPE_DMA   = 3,
     77    PERIPH_TYPE_FBF   = 4,
     78    PERIPH_TYPE_NIC   = 5,
     79    PERIPH_TYPE_IOB   = 6,
    9980};
    10081
     
    10687
    10788///////////////////////////////
     89
    10890typedef struct mapping_header_s
    10991{
    11092    unsigned int    signature;      // must contain MAPPING_SIGNATURE
    11193        unsigned int    clusters;           // number of clusters
    112     unsigned int    ttys;           // number of TTY terminals
    113     unsigned int    fbs;            // number of FBDMA channels
    11494        unsigned int    globals;                // number of vsegs mapped in all vspaces
    11595        unsigned int    vspaces;                // number of virtual spaces
     96
     97    unsigned int    tty_clusterid;  // index of cluster containing TTY controler
     98    unsigned int    ioc_clusterid;  // index of cluster containing IOC controler
     99    unsigned int    nic_clusterid;  // index of cluster containing NIC controler
     100    unsigned int    fbf_clusterid;  // index of cluster containing FBF controler
     101
    116102    unsigned int    psegs;          // total number of physical segments (for all clusters)
    117103        unsigned int    vsegs;                  // total number of virtual segments (for all vspaces)
    118104        unsigned int    vobjs;                  // total number of virtual objects (for all vspaces)
    119105        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
     106        unsigned int    procs;                  // total number of procs (for all clusters)
     107        unsigned int    irqs;           // total number of irqs (for all processors)
     108        unsigned int    coprocs;                // total number of coprocs (for all clusters)
     109        unsigned int    cp_ports;               // total number of cp_ports (for all coprocs)
     110    unsigned int    periphs;        // total number of peripherals (for all clusters)
     111
    125112    char            name[32];       // mapping name
    126113} mapping_header_t;
     
    129116typedef struct mapping_cluster_s
    130117{
     118    unsigned int    psegs;          // number of psegs in cluster
     119    unsigned int    pseg_offset;    // index of first pseg in pseg set
     120
    131121    unsigned int    procs;          // number of processors in cluster
    132122    unsigned int    proc_offset;    // index of first proc in proc set
     123
    133124    unsigned int    coprocs;        // number of coprocessors in cluster
    134125    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
     126
     127    unsigned int    periphs;        // number of peripherals in cluster
     128    unsigned int    periph_offset;  // index of first coproc in coproc set
    137129} mapping_cluster_t;
    138130
     
    183175    unsigned int    vobjlocid;      // stack vobj index in vspace
    184176    unsigned int    startid;        // index in start_vector
    185     unsigned int    use_tty;        // TTY terminal required
    186     unsigned int    use_fb;         // DMA channel to frame buffer required
     177    unsigned int    use_tty;        // TTY terminal required (global)
     178    unsigned int    use_nic;        // NIC channel required (global)
     179    unsigned int    use_timer;      // user timer required (local)
     180    unsigned int    use_fbdma;      // DMA channel to frame buffer required (local)
    187181} mapping_task_t;
    188182
     
    210204typedef struct mapping_irq_s
    211205{
    212     unsigned int    type;           // HW_IRQ  / SW_IRQ
     206    unsigned int    type;           // 0 => HW_IRQ  / 1 => SW_IRQ
    213207    unsigned int    icuid;          // IRQ Index for the ICU component
    214208    unsigned int    isr;            // Interrupt Service Routine Index
    215209    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)
    219210} mapping_irq_t;
    220211
     
    226217    unsigned int    ports;          // number of MWMR ports used by coprocessor
    227218    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
    230219} mapping_coproc_t;
    231220
    232 ///////////////////////////////////////
    233 typedef struct mapping_coproc_port_s
     221////////////////////////////////
     222typedef struct mapping_cp_port_s
    234223{
    235224    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 ///////////////////////////////////
    241 typedef 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;
     225    unsigned int    vspaceid;       // index of the vspace containing the MWMR channel
     226    unsigned int    vobjlocid;      // local index of the vobj containing the MWMR channel
     227} mapping_cp_port_t;
     228
     229///////////////////////////////
     230typedef struct mapping_periph_s
     231{
     232    unsigned int    type;           // IOC / TTY / TIM / DMA / FBF / NIC / IOB
     233    unsigned int    psegid;         // pseg index in cluster
     234    unsigned int    channels;       // number of channels
     235} mapping_periph_t;
     236
    249237
    250238#endif
Note: See TracChangeset for help on using the changeset viewer.