source: soft/giet_vm/mappings/1c_4p_four_tsar_generic_mmu.xml @ 231

Last change on this file since 231 was 231, checked in by joannou, 11 years ago
  • Bugfix in Interruption mechanism :
    • _it_mask() and _it_restore() functions now share a global array indexed by the proc_id (used a simple global variable before => problem with multiproc)
    • added 2 new fuctions _it_enable() and _it_disable() that only affect the IE bit of the status register in COP0
    • replaced interrupt masking/restoring arround _ctx_switch() in sys_handler by a simple interrupt disabling before the call to _ctx_switch (restoring after a _ctx_switch wouldn't restore the correct task's status register)
    • replaced the use of _ctx_switch in _exit() by a call to _context_switch() (this function actually does the interrupt disabling)
  • Added some comments in the ctx_handler.h
  • Added the delay reset in the idle task (ctx_handler.c)
  • Added a new irq type (PTI)
    • Modifications in xml_parser.c to accept PTI irq type (now used in xml mappings)
    • Added the test on the irq type in the _irq_demux() function. This leads to a different argument passed to the ISR (i.e. either channel_id or irq_id (aka icuid) )
File size: 14.0 KB
Line 
1<?xml version="1.0"?>
2
3<mapping_info   signature = "0xdeadbeef" name = "1c_4p_four" cluster_x = "1" cluster_y = "1" vspaces  = "4" >
4
5    <clusterset>
6        <cluster index  = "0" >
7
8*** RAM, ROM and Peripherals used in the hardware architecture
9
10            <pseg name = "PSEG_RAM" type = "RAM"  base = "0x00000000" length = "0x00C00000" />
11            <pseg name = "PSEG_ROM" type = "ROM"  base = "0xBFC00000" length = "0x00100000" /> 
12            <pseg name = "PSEG_FBF" type = "PERI" base = "0xBFD00000" length = "0x00200000" /> 
13            <pseg name = "PSEG_ICU" type = "PERI" base = "0x00F00000" length = "0x00001000" /> 
14            <pseg name = "PSEG_IOC" type = "PERI" base = "0xBFF10000" length = "0x00001000" /> 
15            <pseg name = "PSEG_TTY" type = "PERI" base = "0xBFF20000" length = "0x00001000" /> 
16            <pseg name = "PSEG_DMA" type = "PERI" base = "0x00F30000" length = "0x00001000" /> 
17            <pseg name = "PSEG_NIC" type = "PERI" base = "0xBFF80000" length = "0x00021000" /> 
18             
19*** Peripherals unused in the hardware architecture
20
21            <pseg name = "PSEG_GCD" type = "PERI" base = "0x00F50000" length = "0x00001000" /> 
22            <pseg name = "PSEG_COP" type = "PERI" base = "0x00F60000" length = "0x00001000" /> 
23            <pseg name = "PSEG_IOB" type = "PERI" base = "0x00FF0000" length = "0x00001000" /> 
24
25            <proc index = "0" >
26                <irq type = "PTI"  icuid = "0"  isr = "ISR_SWITCH" /> 
27                <irq type = "HARD" icuid = "8"  isr = "ISR_DMA" channel = "0" /> 
28                <irq type = "HARD" icuid = "9"  isr = "ISR_DMA" channel = "1" /> 
29                <irq type = "HARD" icuid = "10" isr = "ISR_DMA" channel = "2" /> 
30                <irq type = "HARD" icuid = "11" isr = "ISR_DMA" channel = "3" /> 
31                <irq type = "HARD" icuid = "12" isr = "ISR_DMA" channel = "4" /> 
32                <irq type = "HARD" icuid = "13" isr = "ISR_DMA" channel = "5" /> 
33                <irq type = "HARD" icuid = "14" isr = "ISR_DMA" channel = "6" /> 
34                <irq type = "HARD" icuid = "15" isr = "ISR_DMA" channel = "7" /> 
35                <irq type = "HARD" icuid = "16" isr = "ISR_TTY" channel = "0" /> 
36                <irq type = "HARD" icuid = "17" isr = "ISR_TTY" channel = "1" /> 
37                <irq type = "HARD" icuid = "18" isr = "ISR_TTY" channel = "2" /> 
38                <irq type = "HARD" icuid = "19" isr = "ISR_TTY" channel = "3" /> 
39                <irq type = "HARD" icuid = "20" isr = "ISR_TTY" channel = "4" /> 
40                <irq type = "HARD" icuid = "21" isr = "ISR_TTY" channel = "5" /> 
41                <irq type = "HARD" icuid = "22" isr = "ISR_TTY" channel = "6" /> 
42                <irq type = "HARD" icuid = "23" isr = "ISR_TTY" channel = "7" /> 
43                <irq type = "HARD" icuid = "24" isr = "ISR_TTY" channel = "8" /> 
44                <irq type = "HARD" icuid = "25" isr = "ISR_TTY" channel = "9" /> 
45                <irq type = "HARD" icuid = "26" isr = "ISR_TTY" channel = "10" /> 
46                <irq type = "HARD" icuid = "27" isr = "ISR_TTY" channel = "11" /> 
47                <irq type = "HARD" icuid = "28" isr = "ISR_TTY" channel = "12" /> 
48                <irq type = "HARD" icuid = "29" isr = "ISR_TTY" channel = "13" /> 
49                <irq type = "HARD" icuid = "30" isr = "ISR_TTY" channel = "14" /> 
50                <irq type = "HARD" icuid = "31" isr = "ISR_IOC" /> 
51            </proc>
52
53            <proc index = "1" >
54                <irq type = "PTI" icuid = "1" isr = "ISR_SWITCH" />
55            </proc>
56
57            <proc index = "2" >
58                <irq type = "PTI" icuid = "2" isr = "ISR_SWITCH" />
59            </proc>
60
61            <proc    index  = "3" >
62                <irq type = "PTI" icuid = "3" isr = "ISR_SWITCH" />
63            </proc>
64
65            <periph type = "IOC" psegname = "PSEG_IOC" channels  = "1" /> 
66            <periph type = "NIC" psegname = "PSEG_NIC" channels  = "8" /> 
67            <periph type = "TTY" psegname = "PSEG_TTY" channels  = "8" /> 
68            <periph type = "DMA" psegname = "PSEG_DMA" channels  = "1" /> 
69            <periph type = "XICU" psegname = "PSEG_ICU" channels  = "5" /> 
70            <periph type = "FBF" psegname = "PSEG_FBF" /> 
71
72        </cluster>
73    </clusterset>
74
75    <globalset> 
76
77*** Global vsegs used in the boot phase
78
79        <vseg name = "seg_boot_code"    vbase = "0xBFC00000" mode = "CXW_" clusterid = "0" psegname = "PSEG_ROM" ident = "1" >
80            <vobj name = "boot_code"    type = "ELF" length  = "0x00010000" binpath = "build/boot/boot.elf" />
81        </vseg>
82        <vseg name = "seg_boot_stack"   vbase = "0xBFC08000" mode = "C_W_" clusterid = "0" psegname = "PSEG_ROM" ident = "1" > 
83            <vobj name = "boot_stack"   type = "BUFFER" length  = "0x00004000" />
84        </vseg>
85        <vseg name = "seg_boot_mapping" vbase = "0xBFC0c000" mode = "C_W_" clusterid = "0" psegname = "PSEG_ROM" ident = "1" > 
86            <vobj name = "boot_mapping" type = "BLOB" length  = "0x00004000" binpath    = "map.bin" />
87        </vseg>
88
89*** Global vsegs used by the kernel
90
91        <vseg name = "seg_kernel_code"  vbase = "0x80000000" mode = "CX__" clusterid = "0" psegname = "PSEG_RAM" > 
92            <vobj name = "kernel_code"  type = "ELF" length  = "0x00010000" binpath     = "build/sys/sys.elf" /> 
93        </vseg>
94        <vseg name = "seg_kernel_data"  vbase = "0x80010000" mode = "C_W_" clusterid = "0" psegname = "PSEG_RAM" > 
95            <vobj name = "kernel_data"  type = "ELF" length  = "0x00010000" binpath     = "build/sys/sys.elf" /> 
96        </vseg>
97        <vseg name = "seg_kernel_unc"   vbase = "0x80080000" mode = "__W_" clusterid = "0" psegname = "PSEG_RAM" > 
98            <vobj name = "kernel_unc"   type = "ELF" length  = "0x00010000" binpath     = "build/sys/sys.elf" /> 
99        </vseg>
100        <vseg name = "seg_kernel_init"  vbase = "0x80090000" mode = "CX__" clusterid = "0" psegname = "PSEG_RAM" > 
101            <vobj name = "kernel_init"  type = "ELF" length  = "0x00100000" binpath     = "build/sys/sys.elf" />
102        </vseg>
103
104*** Frame buffer (up to 2 Mbytes)
105
106        <vseg name = "seg_fbf"          vbase = "0xBFD00000" mode = "__W_" clusterid = "0" psegname = "PSEG_FBF" ident = "1" > 
107            <vobj name = "fbf"          type = "PERI" length  = "0x00200000" /> 
108        </vseg>
109
110*** Peripherals (4 Kbytes per peripheral / 4 Kbytes per channel for the DMA / 16 Kbytes per channel + 4Kbytes for NIC
111
112        <vseg name = "seg_icu"          vbase = "0x00F00000" mode = "__W_" clusterid = "0" psegname = "PSEG_ICU" ident = "1" > 
113            <vobj name = "icu"          type = "PERI" length  = "0x00001000" /> 
114        </vseg>
115        <vseg name = "seg_ioc"          vbase = "0xBFF10000" mode = "__W_" clusterid = "0" psegname = "PSEG_IOC" ident = "1" > 
116            <vobj name = "ioc"          type = "PERI" length  = "0x00001000" /> 
117        </vseg>
118        <vseg name = "seg_tty"          vbase = "0xBFF20000" mode = "__W_" clusterid = "0" psegname = "PSEG_TTY" ident = "1" > 
119            <vobj name = "tty"          type = "PERI" length  = "0x00001000" />
120        </vseg>
121        <vseg name = "seg_dma"          vbase = "0x00F30000" mode = "__W_" clusterid = "0" psegname = "PSEG_DMA" ident = "1" > 
122            <vobj name = "dma"          type = "PERI" length  = "0x00001000" /> 
123        </vseg>
124        <vseg name = "seg_gcd"          vbase = "0x00F50000" mode = "__W_" clusterid = "0" psegname = "PSEG_GCD" ident = "1" > 
125            <vobj name = "gcd"          type = "PERI" length  = "0x00001000" />
126        </vseg>
127        <vseg name = "seg_iob"          vbase = "0x00FF0000" mode = "__W_" clusterid = "0" psegname = "PSEG_IOB" ident = "1" > 
128            <vobj name = "iob"          type = "PERI" length  = "0x00001000" />
129        </vseg>
130        <vseg name = "seg_nic"          vbase = "0xBFFA0000" mode = "__W_" clusterid = "0" psegname = "PSEG_NIC" ident = "1" > 
131            <vobj name = "nic"          type = "PERI" length  = "0x00001000" />
132        </vseg>
133
134    </globalset> 
135
136    <vspaceset>
137
138        <vspace name = "router" startname = "data" >
139
140            <vseg name = "seg_data"     vbase = "0x00800000" mode = "__WU" clusterid = "0" psegname  = "PSEG_RAM" > 
141                <vobj name = "data"     type = "ELF" length  = "0x00010000" binpath = "build/router/router.elf" /> 
142            </vseg>
143            <vseg name = "seg_code"     vbase = "0x00400000" mode = "CX_U" clusterid = "0" psegname  = "PSEG_RAM" > 
144                <vobj name = "code"     type = "ELF" length  = "0x00010000" binpath = "build/router/router.elf" /> 
145            </vseg>
146            <vseg name = "seg_ptab"     vbase = "0x00300000" mode = "C___" clusterid = "0" psegname  = "PSEG_RAM" > 
147                <vobj name = "ptab"     type = "PTAB" length  = "0x00012000" align   = "13" /> 
148            </vseg>
149            <vseg name = "seg_stack_p"  vbase = "0x00010000" mode = "C_WU" clusterid = "0" psegname  = "PSEG_RAM" > 
150                <vobj name = "stack_p"  type = "BUFFER" length  = "0x00010000" />
151                        </vseg>
152            <vseg name = "seg_stack_c"  vbase = "0x00020000" mode = "C_WU" clusterid = "0" psegname  = "PSEG_RAM" >
153                <vobj name = "stack_c"  type = "BUFFER" length  = "0x00010000" />
154                                                </vseg>
155            <vseg name = "seg_stack_rA" vbase = "0x00030000" mode = "C_WU" clusterid = "0" psegname  = "PSEG_RAM" >
156                <vobj name = "stack_rA" type = "BUFFER" length  = "0x00010000" /> 
157            </vseg>
158            <vseg name = "seg_stack_rB" vbase = "0x00040000" mode = "C_WU" clusterid = "0" psegname  = "PSEG_RAM" >
159                <vobj name = "stack_rB" type = "BUFFER" length  = "0x00010000" /> 
160            </vseg>
161            <vseg name = "seg_mwmrs"    vbase = "0x00050000" mode = "__WU" clusterid = "0" psegname  = "PSEG_RAM" >
162                <vobj name = "mwmr_in"  type = "MWMR" length  = "0x00000020" init = "1" />
163                <vobj name = "mwmr_out" type = "MWMR" length  = "0x00000020" init = "1" />
164            </vseg>
165
166            <task name = "producer" clusterid = "0" proclocid = "1" stackname = "stack_p"  startid = "0" usetty = "1" />
167            <task name = "consumer" clusterid = "0" proclocid = "1" stackname = "stack_c"  startid = "1" usetty = "1" />
168            <task name = "router_A" clusterid = "0" proclocid = "2" stackname = "stack_rA" startid = "2" usetty = "1" />
169            <task name = "router_B" clusterid = "0" proclocid = "3" stackname = "stack_rB" startid = "2" usetty = "1" />
170
171        </vspace>
172
173        <vspace name = "hello" startname = "data" >
174
175            <vseg name = "seg_data"     vbase = "0x00800000" mode = "C_WU" clusterid = "0" psegname  = "PSEG_RAM" > 
176                <vobj name = "data"     type = "ELF" length    = "0x00010000" binpath = "build/hello/hello.elf" />
177            </vseg>
178            <vseg name = "seg_code"     vbase = "0x00400000" mode = "CX_U" clusterid = "0" psegname  = "PSEG_RAM" > 
179                <vobj name = "code"     type = "ELF" length    = "0x00010000" binpath = "build/hello/hello.elf" />
180            </vseg>
181            <vseg name = "seg_ptab"     vbase = "0x00300000" mode = "C___" clusterid = "0" psegname  = "PSEG_RAM" > 
182                <vobj name = "ptab"     type = "PTAB" length   = "0x00012000" align   = "13" />
183            </vseg>
184            <vseg name = "seg_stack"    vbase = "0x00010000" mode = "C_WU" clusterid = "0" psegname  = "PSEG_RAM" > 
185                <vobj name = "stack"    type = "BUFFER" length  = "0x00010000" />
186            </vseg>
187
188*** allocate NIC channel 2 => base = 0x00F80000 / offset = 0x8000
189
190            <vseg name = "seg_nic_2"    vbase = "0xBFF88000" mode = "__WU" clusterid = "0" psegname  = "PSEG_NIC" ident = "1" >
191                <vobj name = "nic_2"    type = "BUFFER" length  = "0x00004000" />
192            </vseg>
193
194            <task name = "main" clusterid = "0" proclocid = "2" stackname = "stack" startid = "0" usetty = "1" />
195        </vspace>
196
197        <vspace name = "pgcd" startname = "data" >
198
199            <vseg name = "seg_data"     vbase = "0x00800000" mode = "C_WU" clusterid = "0" psegname  = "PSEG_RAM" > 
200                <vobj name = "data"     type = "ELF" length    = "0x00010000" binpath = "build/pgcd/pgcd.elf" />
201            </vseg>
202            <vseg name = "seg_code"     vbase = "0x00400000" mode = "CX_U" clusterid = "0" psegname  = "PSEG_RAM" > 
203                <vobj name = "code"     type = "ELF" length    = "0x00010000" binpath = "build/pgcd/pgcd.elf" />
204            </vseg>
205            <vseg name = "seg_ptab"     vbase = "0x00300000" mode = "C___" clusterid = "0" psegname  = "PSEG_RAM" > 
206                <vobj name = "ptab"     type = "PTAB" length   = "0x00012000" align   = "13" />
207            </vseg>
208            <vseg name = "seg_stack"    vbase = "0x00010000" mode = "C_WU" clusterid = "0" psegname  = "PSEG_RAM" > 
209                <vobj name = "stack"    type = "BUFFER" length  = "0x00010000" />
210            </vseg>
211
212            <task name = "main" clusterid = "0" proclocid = "3" stackname = "stack" startid = "0" usetty = "1" />
213        </vspace>
214
215        <vspace name = "display" startname = "data" >
216
217            <vseg name = "seg_data"     vbase = "0x00800000" mode = "C_WU" clusterid = "0" psegname  = "PSEG_RAM" > 
218                <vobj name = "data"     type = "ELF" length    = "0x00010000" binpath = "build/display/display.elf" />
219            </vseg>
220            <vseg name = "seg_code"     vbase = "0x00400000" mode = "CX_U" clusterid = "0" psegname  = "PSEG_RAM" > 
221                <vobj name = "code"     type = "ELF" length    = "0x00010000" binpath = "build/display/display.elf" />
222            </vseg>
223            <vseg name = "seg_ptab"     vbase = "0x00300000" mode = "C___" clusterid = "0" psegname  = "PSEG_RAM" > 
224                <vobj name = "ptab"     type = "PTAB" length   = "0x00012000" align   = "13" />
225            </vseg>
226            <vseg name = "seg_stack"    vbase = "0x00010000" mode = "C_WU" clusterid = "0" psegname  = "PSEG_RAM" > 
227                <vobj name = "stack"    type = "BUFFER" length  = "0x00010000" />
228            </vseg>
229
230            <task name = "main" clusterid = "0" proclocid = "0" stackname = "stack" startid = "0" usetty = "1" usefbdma = "1" />
231        </vspace>
232
233    </vspaceset>
234</mapping_info>
Note: See TracBrowser for help on using the repository browser.