Changeset 189 for soft/giet_vm/xml/mapping_info.h
- Timestamp:
- Aug 7, 2012, 6:37:49 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/xml/mapping_info.h
r181 r189 13 13 // a fixed size header, and 6 variable size arrays: 14 14 // 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[] 26 25 // 27 26 // 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 descriptor29 // is defined by a pseg_offset relative to MAPPING_BOOT_BASE.30 // For each vspace, the base address of the first vseg descriptor31 // is defined by a vseg_offset relative to MAPPING_BOOT_BASE.32 // For each vspace, the base address of the first task desciptor33 // is defined by a task_offset relative to MAPPING_BOOT_BASE.34 // For each vspace, the base address of the first mwmr desciptor35 // is defined by a mwmr_offset relative to MAPPING_BOOT_BASE.36 27 //////////////////////////////////////////////////////////////////////////// 37 28 … … 49 40 #define MAPPING_IRQ_SIZE sizeof(mapping_irq_t) 50 41 #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) 53 43 54 44 #define C_MODE_MASK 0b1000 // cacheable … … 81 71 enum 82 72 { 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, 99 80 }; 100 81 … … 106 87 107 88 /////////////////////////////// 89 108 90 typedef struct mapping_header_s 109 91 { 110 92 unsigned int signature; // must contain MAPPING_SIGNATURE 111 93 unsigned int clusters; // number of clusters 112 unsigned int ttys; // number of TTY terminals113 unsigned int fbs; // number of FBDMA channels114 94 unsigned int globals; // number of vsegs mapped in all vspaces 115 95 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 116 102 unsigned int psegs; // total number of physical segments (for all clusters) 117 103 unsigned int vsegs; // total number of virtual segments (for all vspaces) 118 104 unsigned int vobjs; // total number of virtual objects (for all vspaces) 119 105 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 125 112 char name[32]; // mapping name 126 113 } mapping_header_t; … … 129 116 typedef struct mapping_cluster_s 130 117 { 118 unsigned int psegs; // number of psegs in cluster 119 unsigned int pseg_offset; // index of first pseg in pseg set 120 131 121 unsigned int procs; // number of processors in cluster 132 122 unsigned int proc_offset; // index of first proc in proc set 123 133 124 unsigned int coprocs; // number of coprocessors in cluster 134 125 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 137 129 } mapping_cluster_t; 138 130 … … 183 175 unsigned int vobjlocid; // stack vobj index in vspace 184 176 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) 187 181 } mapping_task_t; 188 182 … … 210 204 typedef struct mapping_irq_s 211 205 { 212 unsigned int type; // HW_IRQ /SW_IRQ206 unsigned int type; // 0 => HW_IRQ / 1 => SW_IRQ 213 207 unsigned int icuid; // IRQ Index for the ICU component 214 208 unsigned int isr; // Interrupt Service Routine Index 215 209 unsigned int channel; // Channel Index (for multi-cannels peripherals) 216 217 unsigned int cluster_id; // physical cluster index218 unsigned int proclocid; // processor local index (inside cluster)219 210 } mapping_irq_t; 220 211 … … 226 217 unsigned int ports; // number of MWMR ports used by coprocessor 227 218 unsigned int port_offset; // index of first MWMR port used by coprocessor 228 unsigned int regs; // number of config/status registers229 unsigned int reg_offset; // index of first register230 219 } mapping_coproc_t; 231 220 232 //////////////////////////////// ///////233 typedef struct mapping_c oproc_port_s221 //////////////////////////////// 222 typedef struct mapping_cp_port_s 234 223 { 235 224 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 /////////////////////////////// 230 typedef 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 249 237 250 238 #endif
Note: See TracChangeset
for help on using the changeset viewer.