Changeset 238 for soft/giet_vm/xml/mapping_info.h
- Timestamp:
- May 29, 2013, 1:24:09 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/xml/mapping_info.h
r232 r238 50 50 #define OUT_MAPPING_SIGNATURE 0xBABEF00D 51 51 52 enum vobjType { 53 VOBJ_TYPE_ELF = 0, // loadable code/data object of elf files 54 VOBJ_TYPE_BLOB = 1, // loadable blob object 55 VOBJ_TYPE_PTAB = 2, // page table 56 VOBJ_TYPE_PERI = 3, // hardware component 57 VOBJ_TYPE_MWMR = 4, // MWMR channel 58 VOBJ_TYPE_LOCK = 5, // Lock 59 VOBJ_TYPE_BUFFER = 6, // Any "no initialization needed" objects (stacks...) 60 VOBJ_TYPE_BARRIER = 7, // Barrier 61 VOBJ_TYPE_CONST = 8, // Constant 62 VOBJ_TYPE_MEMSPACE = 9, // Memspace; different from buffer because we add infos at the beginning 63 }; 64 65 66 enum psegType { 52 typedef unsigned long long paddr_t; 53 54 enum vobjType 55 { 56 VOBJ_TYPE_ELF = 0, // loadable code/data object of elf files 57 VOBJ_TYPE_BLOB = 1, // loadable blob object 58 VOBJ_TYPE_PTAB = 2, // page table 59 VOBJ_TYPE_PERI = 3, // hardware component 60 VOBJ_TYPE_MWMR = 4, // MWMR channel 61 VOBJ_TYPE_LOCK = 5, // Lock 62 VOBJ_TYPE_BUFFER = 6, // Any "no initialization" objects (stacks...) 63 VOBJ_TYPE_BARRIER = 7, // Barrier 64 VOBJ_TYPE_CONST = 8, // Constant 65 VOBJ_TYPE_MEMSPACE = 9, // Memspace (descriptor must be initialised) 66 VOBJ_TYPE_SCHED = 10, // Array of schedulers (one per cluster) 67 }; 68 69 70 enum psegType 71 { 67 72 PSEG_TYPE_RAM = 0, 68 73 PSEG_TYPE_ROM = 1, … … 71 76 72 77 73 enum periphType { 74 PERIPH_TYPE_ICU = 0, 75 PERIPH_TYPE_TIM = 1, 76 PERIPH_TYPE_XICU = 2, 77 PERIPH_TYPE_DMA = 3, 78 PERIPH_TYPE_IOC = 4, 79 PERIPH_TYPE_TTY = 5, 80 PERIPH_TYPE_FBF = 6, 81 PERIPH_TYPE_NIC = 7, 82 PERIPH_TYPE_IOB = 8, 83 }; 84 85 86 enum mwmrPortDirection { 78 enum periphType 79 { 80 PERIPH_TYPE_ICU = 0, 81 PERIPH_TYPE_TIM = 1, 82 PERIPH_TYPE_DMA = 2, 83 PERIPH_TYPE_CMA = 3, 84 PERIPH_TYPE_IOC = 4, 85 PERIPH_TYPE_TTY = 5, 86 PERIPH_TYPE_FBF = 6, 87 PERIPH_TYPE_NIC = 7, 88 PERIPH_TYPE_IOB = 8, 89 PERIPH_TYPE_GCD = 9, 90 PERIPH_TYPE_MAX_VALUE = 10, 91 }; 92 93 94 enum mwmrPortDirection 95 { 87 96 PORT_TO_COPROC = 0, // status register 88 97 PORT_FROM_COPROC = 1, // config register … … 92 101 /////////////////////////////// 93 102 94 typedef struct mapping_header_s { 95 unsigned int signature; // must contain MAPPING_SIGNATURE 96 unsigned int clusters; // number of clusters 97 unsigned int cluster_x; // number of cluster on the abcsisse axe 98 unsigned int cluster_y; // number of cluster on the ordinate axe 99 unsigned int globals; // number of vsegs mapped in all vspaces 100 unsigned int vspaces; // number of virtual spaces 101 102 unsigned int tty_clusterid; // index of cluster containing TTY controler 103 unsigned int ioc_clusterid; // index of cluster containing IOC controler 104 unsigned int nic_clusterid; // index of cluster containing NIC controler 105 unsigned int fbf_clusterid; // index of cluster containing FBF controler 106 107 unsigned int psegs; // total number of physical segments (for all clusters) 108 unsigned int vsegs; // total number of virtual segments (for all vspaces) 109 unsigned int vobjs; // total number of virtual objects (for all vspaces) 110 unsigned int tasks; // total number of tasks (for all vspaces) 111 unsigned int procs; // total number of procs (for all clusters) 112 unsigned int irqs; // total number of irqs (for all processors) 113 unsigned int coprocs; // total number of coprocs (for all clusters) 114 unsigned int cp_ports; // total number of cp_ports (for all coprocs) 115 unsigned int periphs; // total number of peripherals (for all clusters) 116 117 char name[32]; // mapping name 103 typedef struct mapping_header_s 104 { 105 unsigned int signature; // must contain MAPPING_SIGNATURE 106 unsigned int clusters; // number of clusters 107 unsigned int cluster_x; // number of cluster in a row 108 unsigned int cluster_y; // number of cluster in a column 109 unsigned int globals; // number of vsegs mapped in all vspaces 110 unsigned int vspaces; // number of virtual spaces 111 112 unsigned int tty_cluster; // index of cluster containing TTY controler 113 unsigned int tty_cluster_bis; // index of cluster containing second TTY controler 114 unsigned int ioc_cluster; // index of cluster containing IOC controler 115 unsigned int ioc_cluster_bis; // index of cluster containing second IOC controler 116 unsigned int nic_cluster; // index of cluster containing NIC controler 117 unsigned int nic_cluster_bis; // index of cluster containing second NIC controler 118 unsigned int fbf_cluster; // index of cluster containing FBF controler 119 unsigned int fbf_cluster_bis; // index of cluster containing second FBF controler 120 unsigned int cma_cluster; // index of cluster containing CMA controler 121 unsigned int cma_cluster_bis; // index of cluster containing second CMA controler 122 unsigned int iob_cluster; // index of cluster containing IOB controler 123 unsigned int iob_cluster_bis; // index of cluster containing second IOB controler 124 125 unsigned int psegs; // total number of physical segments (for all clusters) 126 unsigned int vsegs; // total number of virtual segments (for all vspaces) 127 unsigned int vobjs; // total number of virtual objects (for all vspaces) 128 unsigned int tasks; // total number of tasks (for all vspaces) 129 unsigned int procs; // total number of procs (for all clusters) 130 unsigned int irqs; // total number of irqs (for all processors) 131 unsigned int coprocs; // total number of coprocs (for all clusters) 132 unsigned int cp_ports; // total number of cp_ports (for all coprocs) 133 unsigned int periphs; // total number of peripherals (for all clusters) 134 135 char name[32]; // mapping name 118 136 } mapping_header_t; 119 137 120 138 121 139 //////////////////////////////// 122 typedef struct mapping_cluster_s { 140 typedef struct mapping_cluster_s 141 { 123 142 unsigned int psegs; // number of psegs in cluster 124 143 unsigned int pseg_offset; // index of first pseg in pseg set … … 136 155 137 156 ///////////////////////////// 138 typedef struct mapping_pseg_s { 139 char name[32]; // pseg name (unique in a cluster) 140 unsigned int base; // base address in physical space 141 unsigned int length; // size (bytes) 157 typedef struct mapping_pseg_s 158 { 159 char name[32]; // pseg name (unique in a cluster) 160 paddr_t base; // base address in physical space 161 paddr_t length; // size (bytes) 142 162 unsigned int type; // RAM / ROM / PERI 143 163 unsigned int cluster; // index of cluster containing pseg 144 unsigned intnext_base; // first free page base address164 paddr_t next_base; // first free page base address 145 165 } mapping_pseg_t; 146 166 147 167 148 168 /////////////////////////////// 149 typedef struct mapping_vspace_s { 150 char name[32]; // virtual space name 169 typedef struct mapping_vspace_s 170 { 171 char name[32]; // virtual space name 151 172 unsigned int start_offset; // offset of the vobj containing the start vector 152 173 unsigned int vsegs; // number of vsegs in vspace … … 160 181 161 182 ///////////////////////////// 162 typedef struct mapping_vseg_s { 163 char name[32]; // vseg name (unique in vspace) 164 unsigned int vbase; // base address in virtual space (hexa) 165 unsigned int pbase; // base address in physical space (hexa) 183 typedef struct mapping_vseg_s 184 { 185 char name[32]; // vseg name (unique in vspace) 186 unsigned int vbase; // base address in virtual space 187 paddr_t pbase; // base address in physical space 166 188 unsigned int length; // size (bytes) 167 189 unsigned int psegid; // physical segment global index … … 169 191 unsigned int ident; // identity mapping if non zero 170 192 unsigned int vobjs; // number of vobjs in vseg 171 unsigned int vobj_offset; // index of first vobj sin vseg193 unsigned int vobj_offset; // index of first vobj in vseg 172 194 } mapping_vseg_t; 173 195 174 196 175 197 ///////////////////////////// 176 typedef struct mapping_task_s { 177 char name[32]; // task name (unique in vspace) 198 typedef struct mapping_task_s 199 { 200 char name[32]; // task name (unique in vspace) 178 201 unsigned int clusterid; // physical cluster index 179 202 unsigned int proclocid; // processor local index (inside cluster) … … 181 204 unsigned int heap_vobjid; // heap vobj index in vspace 182 205 unsigned int startid; // index in start_vector 183 unsigned int use_tty; // TTY terminal required (global)206 unsigned int use_tty; // TTY channel required (global) 184 207 unsigned int use_nic; // NIC channel required (global) 185 unsigned int use_timer; // user timer required (local) 186 unsigned int use_fbdma; // DMA channel to frame buffer required (local) 208 unsigned int use_cma; // CMA channel required (global) 209 unsigned int use_ioc; // IOC channel required (global) 210 unsigned int use_tim; // user timer required (local) 211 unsigned int use_dma; // DMA channel required (local) 187 212 } mapping_task_t; 188 213 189 214 190 215 ///////////////////////////// 191 typedef struct mapping_vobj_s { 192 char name[32]; // vobj name (unique in a vspace) 193 char binpath[64]; // path for the binary code ("*.elf") 216 typedef struct mapping_vobj_s 217 { 218 char name[32]; // vobj name (unique in a vspace) 219 char binpath[64]; // path for the binary code ("*.elf") 194 220 unsigned int type; // type of vobj 195 221 unsigned int length; // size (bytes) 196 222 unsigned int align; // required alignement (logarithm of 2) 197 223 unsigned int vaddr; // virtual base addresse of the vobj 198 unsigned intpaddr; // physical base addresse of the vobj224 paddr_t paddr; // physical base addresse of the vobj 199 225 unsigned int init; // init value (used by barrier or mwmr channel) 200 226 } mapping_vobj_t; … … 202 228 203 229 ///////////////////////////// 204 typedef struct mapping_proc_s { 230 typedef struct mapping_proc_s 231 { 205 232 unsigned int irqs; // number of IRQs allocated to processor 206 233 unsigned int irq_offset; // index of first IRQ allocated to processor … … 209 236 210 237 ///////////////////////////// 211 typedef struct mapping_irq_s { 238 typedef struct mapping_irq_s 239 { 212 240 unsigned int type; // 0 => HW_IRQ / 1 => SW_IRQ 213 241 unsigned int icuid; // IRQ Index for the ICU component 214 unsigned int isr; // I nterrupt Service Routine Index215 unsigned int channel; // Channel Index (for multi-c annels peripherals)242 unsigned int isr; // ISR Index (defined in irq_handler.h) 243 unsigned int channel; // Channel Index (for multi-channels peripherals) 216 244 } mapping_irq_t; 217 245 218 246 219 247 /////////////////////////////// 220 typedef struct mapping_coproc_s { 221 char name[32]; // coprocessor name 248 typedef struct mapping_coproc_s 249 { 250 char name[32]; // coprocessor name 222 251 unsigned int psegid; // global pseg index 223 252 unsigned int ports; // number of MWMR ports used by coprocessor … … 227 256 228 257 //////////////////////////////// 229 typedef struct mapping_cp_port_s { 258 typedef struct mapping_cp_port_s 259 { 230 260 unsigned int direction; // TO_COPROC == 0 / FROM_COPROC == 1 231 261 unsigned int vspaceid; // index of the vspace containing the MWMR channel 232 unsigned int mwmr_vobjid; 262 unsigned int mwmr_vobjid; // local index of the vobj containing the MWMR channel 233 263 } mapping_cp_port_t; 234 264 235 265 236 266 /////////////////////////////// 237 typedef struct mapping_periph_s { 267 typedef struct mapping_periph_s 268 { 238 269 unsigned int type; // IOC / TTY / TIM / DMA / FBF / NIC / IOB 239 270 unsigned int psegid; // pseg index in cluster
Note: See TracChangeset
for help on using the changeset viewer.