comparison compal/c156-fw-disasm @ 287:5259ce993e87

compal/c156-fw-disasm: got to Init_Target()
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 23 Mar 2019 05:11:09 +0000
parents e5b0164f6060
children
comparison
equal deleted inserted replaced
286:dd8a9ebcd8b1 287:5259ce993e87
106 1a4198: e1a02004 mov r2, r4 106 1a4198: e1a02004 mov r2, r4
107 1a419c: e51f0174 ldr r0, =0x3e79c ; via 0x1a4030 107 1a419c: e51f0174 ldr r0, =0x3e79c ; via 0x1a4030
108 1a41a0: e3700001 cmn r0, #1 108 1a41a0: e3700001 cmn r0, #1
109 1a41a4: 1b000083 blne 0x1a43b8 109 1a41a4: 1b000083 blne 0x1a43b8
110 1a41a8: e1a00002 mov r0, r2 110 1a41a8: e1a00002 mov r0, r2
111 1a41ac: ea19d513 b 0x819600 111 1a41ac: ea19d513 b 0x819600 ; _INC_Initialize
112 112
113 1a4250: ea0cc185 b 0x4d486c 113 1a4250: ea0cc185 b 0x4d486c
114 1a4254: eaf9efa9 b 0x20100 114 1a4254: eaf9efa9 b 0x20100
115 1a4258: eafffffe b 0x1a4258 115 1a4258: eafffffe b 0x1a4258
116 1a425c: eafffffe b 0x1a425c 116 1a425c: eafffffe b 0x1a425c
117 1a4260: eafffffe b 0x1a4260 117 1a4260: eafffffe b 0x1a4260
118 1a4264: eafffffe b 0x1a4264 118 1a4264: eafffffe b 0x1a4264
119
120 $Init_Target:
121 4bf76c: b570 push {r4, r5, r6, lr}
122 4bf76e: b081 sub sp, #4
123 4bf770: 4c73 ldr r4, =0xfffef006 ; via 0x4bf940
124 4bf772: 2003 mov r0, #3
125 4bf774: 0340 lsl r0, r0, #13
126 4bf776: 8060 strh r0, [r4, #2]
127 4bf778: f00e ffce bl 0x4ce718 ; $TM_DisableWatchdog
128 ; 8 MiB MEMIF setting
129 4bf77c: 2008 mov r0, #8
130 4bf77e: 8821 ldrh r1, [r4, #0]
131 4bf780: 4308 orr r0, r1
132 4bf782: 8020 strh r0, [r4, #0]
133 ; standard code continues
134 4bf784: 486f ldr r0, =0xfffffd02 ; via 0x4bf944
135 4bf786: 2105 mov r1, #5
136 4bf788: 8001 strh r1, [r0, #0]
137 4bf78a: 2180 mov r1, #128 ; 0x80
138 4bf78c: 8802 ldrh r2, [r0, #0]
139 4bf78e: 4311 orr r1, r2
140 4bf790: 8001 strh r1, [r0, #0]
141 4bf792: 2180 mov r1, #128 ; 0x80
142 4bf794: 8802 ldrh r2, [r0, #0]
143 4bf796: 4311 orr r1, r2
144 4bf798: 8001 strh r1, [r0, #0]
145 4bf79a: 496b ldr r1, =0xffdf ; via 0x4bf948
146 4bf79c: 8802 ldrh r2, [r0, #0]
147 4bf79e: 4011 and r1, r2
148 4bf7a0: 8001 strh r1, [r0, #0]
149 4bf7a2: 4e6a ldr r6, =0xfffff900 ; via 0x4bf94c
150 4bf7a4: 20ff mov r0, #255 ; 0xff
151 4bf7a6: 0200 lsl r0, r0, #8
152 4bf7a8: 8030 strh r0, [r6, #0]
153 4bf7aa: 4d69 ldr r5, =0xffff9800 ; via 0x4bf950
154 4bf7ac: 4869 ldr r0, =0xfff3 ; via 0x4bf954
155 4bf7ae: 8829 ldrh r1, [r5, #0]
156 4bf7b0: 4008 and r0, r1
157 4bf7b2: 8028 strh r0, [r5, #0]
158 4bf7b4: 8828 ldrh r0, [r5, #0]
159 4bf7b6: 8028 strh r0, [r5, #0]
160 4bf7b8: 4867 ldr r0, =0xf01f ; via 0x4bf958
161 4bf7ba: 8829 ldrh r1, [r5, #0]
162 4bf7bc: 4008 and r0, r1
163 4bf7be: 8028 strh r0, [r5, #0]
164 4bf7c0: 2001 mov r0, #1
165 4bf7c2: 0280 lsl r0, r0, #10
166 4bf7c4: 8829 ldrh r1, [r5, #0]
167 4bf7c6: 4308 orr r0, r1
168 4bf7c8: 8028 strh r0, [r5, #0]
169 4bf7ca: 2000 mov r0, #0
170 4bf7cc: 2102 mov r1, #2
171 4bf7ce: 2200 mov r2, #0
172 4bf7d0: f010 f806 bl 0x4cf7e0 ; $CLKM_InitARMClock
173 4bf7d4: 4961 ldr r1, =0xfffffb00 ; via 0x4bf95c
174 4bf7d6: 20a4 mov r0, #164 ; 0xa4
175 4bf7d8: 8008 strh r0, [r1, #0]
176 4bf7da: 8048 strh r0, [r1, #2]
177 4bf7dc: 22a5 mov r2, #165 ; 0xa5
178 4bf7de: 808a strh r2, [r1, #4]
179 4bf7e0: 80c8 strh r0, [r1, #6]
180 4bf7e2: 20a6 mov r0, #166 ; 0xa6
181 4bf7e4: 8148 strh r0, [r1, #10] ; 0xa
182 4bf7e6: 20c0 mov r0, #192 ; 0xc0
183 4bf7e8: 8188 strh r0, [r1, #12] ; 0xc
184 4bf7ea: 2040 mov r0, #64 ; 0x40
185 4bf7ec: 8108 strh r0, [r1, #8]
186 4bf7ee: 2020 mov r0, #32 ; 0x20
187 4bf7f0: 8070 strh r0, [r6, #2]
188 4bf7f2: 2000 mov r0, #0
189 4bf7f4: 80b0 strh r0, [r6, #4]
190 4bf7f6: 2010 mov r0, #16 ; 0x10
191 4bf7f8: 8829 ldrh r1, [r5, #0]
192 4bf7fa: 4308 orr r0, r1
193 4bf7fc: 8028 strh r0, [r5, #0]
194 4bf7fe: 4858 ldr r0, =0xfffffa08 ; via 0x4bf960
195 4bf800: 4958 ldr r1, =0xffff ; via 0x4bf964
196 4bf802: 8001 strh r1, [r0, #0]
197 4bf804: 8041 strh r1, [r0, #2]
198 4bf806: 2103 mov r1, #3
199 4bf808: 8181 strh r1, [r0, #12] ; 0xc
200 4bf80a: f00d f8a7 bl 0x4cc95c ; $IQ_SetupInterrupts
201 4bf80e: 4856 ldr r0, =0xfffffc00 ; via 0x4bf968
202 4bf810: 2124 mov r1, #36 ; 0x24
203 4bf812: 8001 strh r1, [r0, #0]
204 4bf814: 210d mov r1, #13 ; 0xd
205 4bf816: 8041 strh r1, [r0, #2]
206 4bf818: 2500 mov r5, #0
207 4bf81a: 4854 ldr r0, =0xfffe2016 ; via 0x4bf96c
208 4bf81c: 8005 strh r5, [r0, #0]
209 4bf81e: 4954 ldr r1, =0xfffe2014 ; via 0x4bf970
210 4bf820: 2002 mov r0, #2
211 4bf822: 8008 strh r0, [r1, #0]
212 4bf824: 4953 ldr r1, =0xfffe2002 ; via 0x4bf974
213 4bf826: 2084 mov r0, #132 ; 0x84
214 4bf828: 8008 strh r0, [r1, #0]
215 4bf82a: 4953 ldr r1, =0xfffe2000 ; via 0x4bf978
216 4bf82c: 4853 ldr r0, =0x3de0 ; via 0x4bf97c
217 4bf82e: 8008 strh r0, [r1, #0]
218 4bf830: 4a53 ldr r2, =0xfffe2022 ; via 0x4bf980
219 4bf832: 200a mov r0, #10 ; 0xa
220 4bf834: 8010 strh r0, [r2, #0]
221 4bf836: 4a53 ldr r2, =0xfffe2020 ; via 0x4bf984
222 4bf838: 4853 ldr r0, =0x45a ; via 0x4bf988
223 4bf83a: 8010 strh r0, [r2, #0]
224 4bf83c: 4a53 ldr r2, =0xfffe201e ; via 0x4bf98c
225 4bf83e: 20ff mov r0, #255 ; 0xff
226 4bf840: 304b add r0, #75 ; 0x4b
227 4bf842: 8010 strh r0, [r2, #0]
228 4bf844: 4852 ldr r0, =0xfffe201c ; via 0x4bf990
229 4bf846: 221f mov r2, #31 ; 0x1f
230 4bf848: 8002 strh r2, [r0, #0]
231 4bf84a: 4852 ldr r0, =0xfffe2024 ; via 0x4bf994
232 4bf84c: 8005 strh r5, [r0, #0]
233 4bf84e: 4a52 ldr r2, =0xfffe2010 ; via 0x4bf998
234 4bf850: 2002 mov r0, #2
235 4bf852: 8813 ldrh r3, [r2, #0]
236 4bf854: 4318 orr r0, r3
237 4bf856: 8010 strh r0, [r2, #0]
238 4bf858: 2004 mov r0, #4
239 4bf85a: 8813 ldrh r3, [r2, #0]
240 4bf85c: 4318 orr r0, r3
241 4bf85e: 8010 strh r0, [r2, #0]
242 4bf860: 2027 mov r0, #39 ; 0x27
243 4bf862: 80e0 strh r0, [r4, #6]
244 4bf864: 8a08 ldrh r0, [r1, #16] ; 0x10
245 4bf866: 0840 lsr r0, r0, #1
246 4bf868: d30f bcc 0x4bf88a
247 4bf86a: 8a08 ldrh r0, [r1, #16] ; 0x10
248 4bf86c: 0400 lsl r0, r0, #16
249 4bf86e: 0c40 lsr r0, r0, #17
250 4bf870: 0040 lsl r0, r0, #1
251 4bf872: 8208 strh r0, [r1, #16] ; 0x10
252 4bf874: 2001 mov r0, #1
253 4bf876: e001 b 0x4bf87c
254 4bf878: 9800 ldr r0, [sp, #0]
255 4bf87a: 3001 add r0, #1
256 4bf87c: 9000 str r0, [sp, #0]
257 4bf87e: 9800 ldr r0, [sp, #0]
258 4bf880: 2832 cmp r0, #50 ; 0x32
259 4bf882: d3f9 bcc 0x4bf878
260 4bf884: 8a48 ldrh r0, [r1, #18] ; 0x12
261 4bf886: 2800 cmp r0, #0
262 4bf888: d0fc beq 0x4bf884
263 4bf88a: f00f f92c bl 0x4ceae6 ; ARMIO setup?
264 4bf88e: 2027 mov r0, #39 ; 0x27
265 4bf890: 0500 lsl r0, r0, #20
266 4bf892: 8005 strh r5, [r0, #0]
267 4bf894: 2001 mov r0, #1
268 4bf896: f00e ff4f bl 0x4ce738
269 4bf89a: 2002 mov r0, #2
270 4bf89c: f00e ff4c bl 0x4ce738
271 4bf8a0: b001 add sp, #4
272 4bf8a2: bd70 pop {r4, r5, r6, pc}
273
274 4bf8a4: b500 push {lr}
275 4bf8a6: f79c fdc9 bl 0x45c43c
276 4bf8aa: f70f f9e4 bl 0x3cec76
277 4bf8ae: f73c f835 bl 0x3fb91c
278 4bf8b2: f7d4 fbb7 bl 0x494024
279 4bf8b6: f699 f8b5 bl 0x358a24
280 4bf8ba: bd00 pop {pc}
281
282 4bf8bc: b500 push {lr}
283 4bf8be: 4837 ldr r0, =0x1175c94 ; via 0x4bf99c
284 4bf8c0: f756 ff05 bl 0x4166ce
285 4bf8c4: f757 f9ca bl 0x416c5c
286 4bf8c8: bd00 pop {pc}
287
288 4bf8ca: b500 push {lr}
289 4bf8cc: 2004 mov r0, #4
290 4bf8ce: f00d f8a6 bl 0x4cca1e
291 4bf8d2: 2012 mov r0, #18 ; 0x12
292 4bf8d4: f00d f8a3 bl 0x4cca1e
293 4bf8d8: 2007 mov r0, #7
294 4bf8da: f00d f8a0 bl 0x4cca1e
295 4bf8de: 2008 mov r0, #8
296 4bf8e0: f00d f89d bl 0x4cca1e
297 4bf8e4: bd00 pop {pc}
298
299 4bf8e6: b510 push {r4, lr}
300 4bf8e8: 1c04 add r4, r0, #0
301 4bf8ea: 2012 mov r0, #18 ; 0x12
302 4bf8ec: f00d f8a8 bl 0x4cca40
303 4bf8f0: 2007 mov r0, #7
304 4bf8f2: f00d f8a5 bl 0x4cca40
305 4bf8f6: 2c00 cmp r4, #0
306 4bf8f8: d012 beq 0x4bf920
307 4bf8fa: 3c01 sub r4, #1
308 4bf8fc: 2c00 cmp r4, #0
309 4bf8fe: d009 beq 0x4bf914
310 4bf900: 3c01 sub r4, #1
311 4bf902: 2c00 cmp r4, #0
312 4bf904: d114 bne 0x4bf930
313 4bf906: 2049 mov r0, #73 ; 0x49
314 4bf908: 00c0 lsl r0, r0, #3
315 4bf90a: f756 fdef bl 0x4164ec
316 4bf90e: 2101 mov r1, #1
317 4bf910: 4a23 ldr r2, =0x4a502f ; via 0x4bf9a0
318 4bf912: e00a b 0x4bf92a
319 4bf914: 20ff mov r0, #255 ; 0xff
320 4bf916: 3069 add r0, #105 ; 0x69
321 4bf918: f756 fde8 bl 0x4164ec
322 4bf91c: 4a20 ldr r2, =0x4a502f ; via 0x4bf9a0
323 4bf91e: e003 b 0x4bf928
324 4bf920: 2068 mov r0, #104 ; 0x68
325 4bf922: f756 fde3 bl 0x4164ec
326 4bf926: 2200 mov r2, #0
327 4bf928: 2100 mov r1, #0
328 4bf92a: 2001 mov r0, #1
329 4bf92c: f757 f938 bl 0x416ba0
330 4bf930: 2012 mov r0, #18 ; 0x12
331 4bf932: f00d f874 bl 0x4cca1e
332 4bf936: 2007 mov r0, #7
333 4bf938: f00d f871 bl 0x4cca1e
334 4bf93c: bd10 pop {r4, pc}
335 4bf93e: 46c0 nop (mov r8, r8)
336
337 4cfb9a: 4770 bx lr
338 4cfb9c: 4770 bx lr
339 4cfb9e: 4806 ldr r0, =0x1175c90 ; via 0x4cfbb8
340 4cfba0: 7800 ldrb r0, [r0, #0]
341 4cfba2: 4770 bx lr
119 342
120 ; code looks like TI's bootloader.s, not int.s 343 ; code looks like TI's bootloader.s, not int.s
121 4d486c: e51f101c ldr r1, =0xffff9800 ; via 0x4d4858 344 4d486c: e51f101c ldr r1, =0xffff9800 ; via 0x4d4858
122 4d4870: e15f21b2 ldrh r2, =0x2006 ; via 0x4d4866 345 4d4870: e15f21b2 ldrh r2, =0x2006 ; via 0x4d4866
123 4d4874: e1c120b0 strh r2, [r1] 346 4d4874: e1c120b0 strh r2, [r1]
158 4d4900: e2411004 sub r1, r1, #4 381 4d4900: e2411004 sub r1, r1, #4
159 4d4904: e0802001 add r2, r0, r1 382 4d4904: e0802001 add r2, r0, r1
160 4d4908: e3c22003 bic r2, r2, #3 383 4d4908: e3c22003 bic r2, r2, #3
161 4d490c: e1a0d002 mov sp, r2 384 4d490c: e1a0d002 mov sp, r2
162 4d4910: eaf33dc7 b 0x1a4034 385 4d4910: eaf33dc7 b 0x1a4034
386
387 4d6b80: 2900 cmp r1, #0
388 4d6b82: d006 beq 0x4d6b92
389 4d6b84: 6803 ldr r3, [r0, #0]
390 4d6b86: 6013 str r3, [r2, #0]
391 4d6b88: 3204 add r2, #4
392 4d6b8a: 3004 add r0, #4
393 4d6b8c: 3904 sub r1, #4
394 4d6b8e: 2900 cmp r1, #0
395 4d6b90: d1f8 bne 0x4d6b84
396 4d6b92: 4770 bx lr
397
398 4d6bc0: b500 push {lr}
399 4d6bc2: 2000 mov r0, #0
400 4d6bc4: 4909 ldr r1, =0x116a020 ; via 0x4d6bec
401 4d6bc6: 8008 strh r0, [r1, #0]
402 4d6bc8: 4909 ldr r1, =0x116a022 ; via 0x4d6bf0
403 4d6bca: 8008 strh r0, [r1, #0]
404 4d6bcc: 4a09 ldr r2, =0x800000 ; via 0x4d6bf4
405 4d6bce: 480a ldr r0, =0x20188 ; via 0x4d6bf8
406 4d6bd0: 490a ldr r1, =0x81e614 ; via 0x4d6bfc
407 4d6bd2: 1a89 sub r1, r1, r2
408 4d6bd4: 3904 sub r1, #4
409 4d6bd6: 2304 mov r3, #4
410 4d6bd8: 189a add r2, r3, r2
411 4d6bda: f7ff ffd1 bl 0x4d6b80
412 4d6bde: 4a08 ldr r2, =0x81e618 ; via 0x4d6c00
413 4d6be0: 4808 ldr r0, =0x4d9280 ; via 0x4d6c04
414 4d6be2: 4909 ldr r1, =0x81e868 ; via 0x4d6c08
415 4d6be4: 1a89 sub r1, r1, r2
416 4d6be6: f7ff ffcb bl 0x4d6b80
417 4d6bea: bd00 pop {pc}
418
419 ; code from 0x20188 is moved to 0x800004, length 0x1E610
420 ; code from 0x4D9280 is moved to 0x81E618, length 0x250
421
422 $Application_Initialize:
423 4d751a: b500 push {lr}
424 4d751c: f7f8 fb3d bl 0x4cfb9a ; empty function
425 4d7520: 4916 ldr r1, =0x116b56c ; via 0x4d757c
426 4d7522: 4817 ldr r0, =0xffff5800 ; via 0x4d7580
427 4d7524: 6008 str r0, [r1, #0]
428 4d7526: 2000 mov r0, #0
429 4d7528: 2107 mov r1, #7
430 4d752a: f7e3 fba9 bl 0x4bac80
431 4d752e: f001 f8db bl 0x4d86e8
432 4d7532: f7d8 fde2 bl 0x4b00fa
433 4d7536: f329 ff4b bl 0x8013d0
434 4d753a: f7d8 fdde bl 0x4b00fa
435 4d753e: f001 f8d9 bl 0x4d86f4
436 4d7542: 2000 mov r0, #0
437 4d7544: 2102 mov r1, #2
438 4d7546: 4a0f ldr r2, =0x4d7519 ; via 0x4d7584
439 4d7548: f73f fb2a bl 0x416ba0
440 4d754c: f7fe fb82 bl 0x4d5c54
441 4d7550: f75d fc05 bl 0x434d5e
442 4d7554: f7f8 fb21 bl 0x4cfb9a ; empty function
443 4d7558: 4808 ldr r0, =0x116b56c ; via 0x4d757c
444 4d755a: 4909 ldr r1, =0xffff5800 ; via 0x4d7580
445 4d755c: 6001 str r1, [r0, #0]
446 4d755e: 2000 mov r0, #0
447 4d7560: 2107 mov r1, #7
448 4d7562: f7e3 fb8d bl 0x4bac80
449 4d7566: f7b4 fa1d bl 0x48b9a4
450 4d756a: bd00 pop {pc}
451
452 4d86e8: b500 push {lr}
453 4d86ea: f7e7 f83f bl 0x4bf76c
454 4d86ee: f7e7 f8d9 bl 0x4bf8a4
455 4d86f2: bd00 pop {pc}
456
457 4d86f4: b500 push {lr}
458 4d86f6: f7e7 f8e1 bl 0x4bf8bc
459 4d86fa: bd00 pop {pc}
460
461 4d86fc: b500 push {lr}
462 4d86fe: f7e7 f8e4 bl 0x4bf8ca
463 4d8702: bd00 pop {pc}
464
465 4d8704: b500 push {lr}
466 4d8706: 200a mov r0, #10 ; 0xa
467 4d8708: f7f4 f989 bl 0x4cca1e
468 4d870c: bd00 pop {pc}
469 4d870e: 0000
470
471 4d8710: 4770 bx lr
472 4d8712: 4770 bx lr
473 4d8714: 4770 bx lr
474 4d8716: 4770 bx lr
475 4d8718: 4770 bx lr
476 4d871a: 4770 bx lr
477 4d871c: 4770 bx lr
478 4d871e: 4770 bx lr
479 4d8720: 4770 bx lr
480 4d8722: 4770 bx lr
481
482 4d8724: 4803 ldr r0, =0xfffe480e ; via 0x4d8734
483 4d8726: 8800 ldrh r0, [r0, #0]
484 4d8728: 07c0 lsl r0, r0, #31
485 4d872a: 0fc0 lsr r0, r0, #31
486 4d872c: 0600 lsl r0, r0, #24
487 4d872e: 0e00 lsr r0, r0, #24
488 4d8730: 4770 bx lr
489 4d8732: 46c0 nop (mov r8, r8)
490
491 4d8ea4: e92d4000 stmdb sp!, {lr}
492 4d8ea8: e28fe001 add lr, pc, #1
493 4d8eac: e12fff1e bx lr
494 4d8eb0: f7fd fe86 bl 0x4d6bc0
495 4d8eb4: 4778 bx pc
496 4d8eb6: 46c0 nop (mov r8, r8)
497 4d8eb8: e8bd8000 ldmia sp!, {pc}
498
499 ; IRAM code
500
501 _INC_Initialize: ; call veneer
502 819600: e92d4000 stmdb sp!, {lr}
503 819604: e28fe001 add lr, pc, #1
504 819608: e12fff1e bx lr
505 81960c: f000 f804 bl 0x819618
506 819610: 4778 bx pc
507 819612: 46c0 nop (mov r8, r8)
508 819614: e8bd8000 ldmia sp!, {pc}
509
510 $INC_Initialize:
511 819618: b500 push {lr}
512 81961a: b081 sub sp, #4
513 81961c: 9000 str r0, [sp, #0]
514 81961e: 4914 ldr r1, =0x82ef7c ; via 0x819670
515 819620: 2001 mov r0, #1
516 819622: 6008 str r0, [r1, #0]
517 819624: f000 f836 bl 0x819694
518 819628: f000 f85c bl 0x8196e4
519 81962c: f000 f908 bl 0x819840
520 819630: f000 f8ee bl 0x819810
521 819634: f000 f91a bl 0x81986c
522 819638: f000 f85c bl 0x8196f4
523 81963c: f000 f8d8 bl 0x8197f0
524 819640: f000 f904 bl 0x81984c
525 819644: f000 f9c0 bl 0x8199c8
526 819648: f000 f82c bl 0x8196a4
527 81964c: f000 f83a bl 0x8196c4
528 819650: f000 f810 bl 0x819674
529 819654: f000 f86e bl 0x819734
530 819658: f000 f85c bl 0x819714
531 81965c: 9800 ldr r0, [sp, #0]
532 81965e: f4bd ff5c bl 0x4d751a ; $Application_Initialize
533 819662: 4803 ldr r0, =0x82ef7c ; via 0x819670
534 819664: 2102 mov r1, #2
535 819666: 6001 str r1, [r0, #0]
536 819668: f7fb fa48 bl 0x814afc
537 81966c: b001 add sp, #4
538 81966e: bd00 pop {pc}