Changeset 181 for soft/giet_vm/xml/mapping_info.h
- Timestamp:
- Jul 26, 2012, 5:43:08 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/xml/mapping_info.h
r173 r181 46 46 #define MAPPING_PSEG_SIZE sizeof(mapping_pseg_t) 47 47 #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) 48 53 49 54 #define C_MODE_MASK 0b1000 // cacheable … … 67 72 }; 68 73 74 enum 75 { 76 PSEG_TYPE_RAM = 0, 77 PSEG_TYPE_ROM = 1, 78 PSEG_TYPE_PERI = 2, 79 }; 80 81 enum 82 { 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 99 }; 100 101 enum 102 { 103 PORT_TO_COPROC = 0, // status register 104 PORT_FROM_COPROC = 1, // config register 105 }; 69 106 70 107 /////////////////////////////// … … 73 110 unsigned int signature; // must contain MAPPING_SIGNATURE 74 111 unsigned int clusters; // number of clusters 75 unsigned int psegs; // number of psegs76 112 unsigned int ttys; // number of TTY terminals 77 unsigned int fbs; // number of F rame BufferDMA channels113 unsigned int fbs; // number of FBDMA channels 78 114 unsigned int globals; // number of vsegs mapped in all vspaces 79 115 unsigned int vspaces; // number of virtual spaces 116 unsigned int psegs; // total number of physical segments (for all clusters) 80 117 unsigned int vsegs; // total number of virtual segments (for all vspaces) 81 118 unsigned int vobjs; // total number of virtual objects (for all vspaces) 82 119 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 83 125 char name[32]; // mapping name 84 126 } mapping_header_t; … … 88 130 { 89 131 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 90 137 } mapping_cluster_t; 91 138 … … 96 143 unsigned int base; // base address in physical space 97 144 unsigned int length; // size (bytes) 145 unsigned int type; // RAM / ROM / PERI 146 unsigned int cluster; // index of cluster containing pseg 98 147 unsigned int next_base; // first free page base address 99 148 } mapping_pseg_t; … … 119 168 unsigned int pbase; // base address in physical space (hexa) 120 169 unsigned int length; // size (bytes) 121 unsigned int psegid; // physical segment index170 unsigned int psegid; // physical segment global index 122 171 unsigned int mode; // C-X-W-U flags 123 172 unsigned int ident; // identity mapping if non zero … … 148 197 unsigned int vaddr; // virtual base addresse of the vobj 149 198 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) 151 200 } mapping_vobj_t; 201 202 ///////////////////////////// 203 typedef 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 ///////////////////////////// 210 typedef 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 /////////////////////////////// 222 typedef 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 /////////////////////////////////////// 233 typedef 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 /////////////////////////////////// 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; 152 249 153 250 #endif
Note: See TracChangeset
for help on using the changeset viewer.