-
Notifications
You must be signed in to change notification settings - Fork 0
/
kernel.list
364 lines (324 loc) · 11.6 KB
/
kernel.list
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
build/output.elf: file format elf32-littlearm
Disassembly of section .init:
00008000 <_start>:
8000: ea0000d0 b 8348 <main>
Disassembly of section .text:
00008004 <SetForeColor>:
8004: e3500801 cmp r0, #65536 ; 0x10000
8008: 21a0f00e movcs pc, lr
800c: e59f11b8 ldr r1, [pc, #440] ; 81cc <STRINGLOOPEND$+0x4>
8010: e1c100b0 strh r0, [r1]
8014: e1a0f00e mov pc, lr
00008018 <SetGraphicsAddress>:
8018: e59f11b0 ldr r1, [pc, #432] ; 81d0 <STRINGLOOPEND$+0x8>
801c: e5810000 str r0, [r1]
8020: e1a0f00e mov pc, lr
00008024 <DrawPixel>:
8024: e59f21a4 ldr r2, [pc, #420] ; 81d0 <STRINGLOOPEND$+0x8>
8028: e5922000 ldr r2, [r2]
802c: e5923004 ldr r3, [r2, #4]
8030: e2433001 sub r3, r3, #1
8034: e1510003 cmp r1, r3
8038: 81a0f00e movhi pc, lr
803c: e5923000 ldr r3, [r2]
8040: e2433001 sub r3, r3, #1
8044: e1500003 cmp r0, r3
8048: 81a0f00e movhi pc, lr
804c: e5922020 ldr r2, [r2, #32]
8050: e2833001 add r3, r3, #1
8054: e0200391 mla r0, r1, r3, r0
8058: e0822080 add r2, r2, r0, lsl #1
805c: e59f3168 ldr r3, [pc, #360] ; 81cc <STRINGLOOPEND$+0x4>
8060: e1d330b0 ldrh r3, [r3]
8064: e1c230b0 strh r3, [r2]
8068: e1a0f00e mov pc, lr
0000806c <DrawLine>:
806c: e92d5ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, ip, lr}
8070: e1a09000 mov r9, r0
8074: e1a0a002 mov sl, r2
8078: e1a0b001 mov fp, r1
807c: e1a0c003 mov ip, r3
8080: e15a0009 cmp sl, r9
8084: c04a4009 subgt r4, sl, r9
8088: c3a06001 movgt r6, #1
808c: d049400a suble r4, r9, sl
8090: d3e06000 mvnle r6, #0
8094: e15c000b cmp ip, fp
8098: c04b500c subgt r5, fp, ip
809c: c3a07001 movgt r7, #1
80a0: d04c500b suble r5, ip, fp
80a4: d3e07000 mvnle r7, #0
80a8: e0848005 add r8, r4, r5
80ac: e08aa006 add sl, sl, r6
80b0: e08cc006 add ip, ip, r6
000080b4 <PIXELLOOP$>:
80b4: e139000a teq r9, sl
80b8: 113b000c teqne fp, ip
80bc: 08bd9ff0 popeq {r4, r5, r6, r7, r8, r9, sl, fp, ip, pc}
80c0: e1a00009 mov r0, r9
80c4: e1a0100b mov r1, fp
80c8: ebffffd5 bl 8024 <DrawPixel>
80cc: e1550088 cmp r5, r8, lsl #1
80d0: d0899006 addle r9, r9, r6
80d4: d0888005 addle r8, r8, r5
80d8: e1540088 cmp r4, r8, lsl #1
80dc: a08bb007 addge fp, fp, r7
80e0: a0888004 addge r8, r8, r4
80e4: eafffff2 b 80b4 <PIXELLOOP$>
000080e8 <DrawCharacter>:
80e8: e350007f cmp r0, #127 ; 0x7f
80ec: 83a00000 movhi r0, #0
80f0: 83a01000 movhi r1, #0
80f4: 81a0f00e movhi pc, lr
80f8: e92d41f0 push {r4, r5, r6, r7, r8, lr}
80fc: e1a04001 mov r4, r1
8100: e1a05002 mov r5, r2
8104: e59f60c8 ldr r6, [pc, #200] ; 81d4 <STRINGLOOPEND$+0xc>
8108: e0866200 add r6, r6, r0, lsl #4
0000810c <LINELOOP$>:
810c: e5d67000 ldrb r7, [r6]
8110: e3a08008 mov r8, #8
00008114 <CHARPIXELLOOP$>:
8114: e2588001 subs r8, r8, #1
8118: ba000007 blt 813c <CHARPIXELLOOPEND$>
811c: e1a07087 lsl r7, r7, #1
8120: e3170c01 tst r7, #256 ; 0x100
8124: 0afffffa beq 8114 <CHARPIXELLOOP$>
8128: e0840008 add r0, r4, r8
812c: e1a01005 mov r1, r5
8130: ebffffbb bl 8024 <DrawPixel>
8134: e3380000 teq r8, #0
8138: 1afffff5 bne 8114 <CHARPIXELLOOP$>
0000813c <CHARPIXELLOOPEND$>:
813c: e2855001 add r5, r5, #1
8140: e2866001 add r6, r6, #1
8144: e316000f tst r6, #15
8148: 1affffef bne 810c <LINELOOP$>
814c: e3a00008 mov r0, #8
8150: e3a01010 mov r1, #16
8154: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
00008158 <DrawString>:
8158: e92d43f0 push {r4, r5, r6, r7, r8, r9, lr}
815c: e1a07000 mov r7, r0
8160: e1a08001 mov r8, r1
8164: e1a04002 mov r4, r2
8168: e1a06004 mov r6, r4
816c: e1a05003 mov r5, r3
00008170 <STRINGLOOP$>:
8170: e2588001 subs r8, r8, #1
8174: ba000013 blt 81c8 <STRINGLOOPEND$>
8178: e5d79000 ldrb r9, [r7]
817c: e2877001 add r7, r7, #1
8180: e1a00009 mov r0, r9
8184: e1a01004 mov r1, r4
8188: e1a02005 mov r2, r5
818c: ebffffd5 bl 80e8 <DrawCharacter>
8190: e339000a teq r9, #10
8194: 01a04006 moveq r4, r6
8198: 00855001 addeq r5, r5, r1
819c: 0afffff3 beq 8170 <STRINGLOOP$>
81a0: e3390009 teq r9, #9
81a4: 10844000 addne r4, r4, r0
81a8: 1afffff0 bne 8170 <STRINGLOOP$>
81ac: e0800100 add r0, r0, r0, lsl #2
81b0: e1a01006 mov r1, r6
000081b4 <STRINGLOOPTAB$>:
81b4: e0811000 add r1, r1, r0
81b8: e1540001 cmp r4, r1
81bc: aafffffc bge 81b4 <STRINGLOOPTAB$>
81c0: e1a04001 mov r4, r1
81c4: eaffffe9 b 8170 <STRINGLOOP$>
000081c8 <STRINGLOOPEND$>:
81c8: e8bd83f0 pop {r4, r5, r6, r7, r8, r9, pc}
81cc: 00008480 .word 0x00008480
81d0: 00008484 .word 0x00008484
81d4: 00008490 .word 0x00008490
000081d8 <InitializeFrameBuffer>:
81d8: e3500a01 cmp r0, #4096 ; 0x1000
81dc: 93510a01 cmpls r1, #4096 ; 0x1000
81e0: 93520020 cmpls r2, #32
81e4: 83a00000 movhi r0, #0
81e8: 81a0f00e movhi pc, lr
81ec: e92d4010 push {r4, lr}
81f0: e59f403c ldr r4, [pc, #60] ; 8234 <InitializeFrameBuffer+0x5c>
81f4: e5840000 str r0, [r4]
81f8: e5841004 str r1, [r4, #4]
81fc: e5840008 str r0, [r4, #8]
8200: e584100c str r1, [r4, #12]
8204: e5842014 str r2, [r4, #20]
8208: e1a00004 mov r0, r4
820c: e2800101 add r0, r0, #1073741824 ; 0x40000000
8210: e3a01001 mov r1, #1
8214: eb00002f bl 82d8 <MailboxWrite>
8218: e3a00001 mov r0, #1
821c: eb00003a bl 830c <MailboxRead>
8220: e3300000 teq r0, #0
8224: 13a00000 movne r0, #0
8228: 18bd8010 popne {r4, pc}
822c: e1a00004 mov r0, r4
8230: e8bd8010 pop {r4, pc}
8234: 00008c90 .word 0x00008c90
00008238 <GetGpioBase>:
8238: e59f008c ldr r0, [pc, #140] ; 82cc <SetGpio+0x3c>
823c: e1a0f00e mov pc, lr
00008240 <SetGpioFunction>:
8240: e3500035 cmp r0, #53 ; 0x35
8244: 93510007 cmpls r1, #7
8248: 81a0f00e movhi pc, lr
824c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
8250: e1a02000 mov r2, r0
8254: ebfffff7 bl 8238 <GetGpioBase>
00008258 <FUNCTIONLOOP$>:
8258: e3520009 cmp r2, #9
825c: 8242200a subhi r2, r2, #10
8260: 82800004 addhi r0, r0, #4
8264: 8afffffb bhi 8258 <FUNCTIONLOOP$>
8268: e0822082 add r2, r2, r2, lsl #1
826c: e1a01211 lsl r1, r1, r2
8270: e3a03007 mov r3, #7
8274: e1a03213 lsl r3, r3, r2
8278: e1e03003 mvn r3, r3
827c: e5902000 ldr r2, [r0]
8280: e0022003 and r2, r2, r3
8284: e1811002 orr r1, r1, r2
8288: e5801000 str r1, [r0]
828c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
00008290 <SetGpio>:
8290: e3500035 cmp r0, #53 ; 0x35
8294: 81a0f00e movhi pc, lr
8298: e52de004 push {lr} ; (str lr, [sp, #-4]!)
829c: e1a02000 mov r2, r0
82a0: ebffffe4 bl 8238 <GetGpioBase>
82a4: e1a032a2 lsr r3, r2, #5
82a8: e1a03103 lsl r3, r3, #2
82ac: e0800003 add r0, r0, r3
82b0: e202201f and r2, r2, #31
82b4: e3a03001 mov r3, #1
82b8: e1a03213 lsl r3, r3, r2
82bc: e3310000 teq r1, #0
82c0: 05803028 streq r3, [r0, #40] ; 0x28
82c4: 1580301c strne r3, [r0, #28]
82c8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
82cc: 20200000 .word 0x20200000
000082d0 <GetMailboxBase>:
82d0: e59f006c ldr r0, [pc, #108] ; 8344 <RIGHTMAIL$+0x24>
82d4: e1a0f00e mov pc, lr
000082d8 <MailboxWrite>:
82d8: e310000f tst r0, #15
82dc: 11a0f00e movne pc, lr
82e0: e351000f cmp r1, #15
82e4: 81a0f00e movhi pc, lr
82e8: e1a02000 mov r2, r0
82ec: e52de004 push {lr} ; (str lr, [sp, #-4]!)
82f0: ebfffff6 bl 82d0 <GetMailboxBase>
000082f4 <WAIT1$>:
82f4: e5903018 ldr r3, [r0, #24]
82f8: e3130102 tst r3, #-2147483648 ; 0x80000000
82fc: 1afffffc bne 82f4 <WAIT1$>
8300: e0822001 add r2, r2, r1
8304: e5802020 str r2, [r0, #32]
8308: e49df004 pop {pc} ; (ldr pc, [sp], #4)
0000830c <MailboxRead>:
830c: e350000f cmp r0, #15
8310: 81a0f00e movhi pc, lr
8314: e1a01000 mov r1, r0
8318: e52de004 push {lr} ; (str lr, [sp, #-4]!)
831c: ebffffeb bl 82d0 <GetMailboxBase>
00008320 <RIGHTMAIL$>:
8320: e5902018 ldr r2, [r0, #24]
8324: e3120101 tst r2, #1073741824 ; 0x40000000
8328: 1afffffc bne 8320 <RIGHTMAIL$>
832c: e5902000 ldr r2, [r0]
8330: e202300f and r3, r2, #15
8334: e1330001 teq r3, r1
8338: 1afffff8 bne 8320 <RIGHTMAIL$>
833c: e3c2000f bic r0, r2, #15
8340: e49df004 pop {pc} ; (ldr pc, [sp], #4)
8344: 2000b880 .word 0x2000b880
00008348 <main>:
8348: e3a0d902 mov sp, #32768 ; 0x8000
834c: e3a00b01 mov r0, #1024 ; 0x400
8350: e3a01c03 mov r1, #768 ; 0x300
8354: e3a02010 mov r2, #16
8358: ebffff9e bl 81d8 <InitializeFrameBuffer>
835c: e3300000 teq r0, #0
8360: 1a000006 bne 8380 <NOERROR$>
8364: e3a0002f mov r0, #47 ; 0x2f
8368: e3a01001 mov r1, #1
836c: ebffffb3 bl 8240 <SetGpioFunction>
8370: e3a0002f mov r0, #47 ; 0x2f
8374: e3a01000 mov r1, #0
8378: ebffffc4 bl 8290 <SetGpio>
0000837c <ERROR$>:
837c: eafffffe b 837c <ERROR$>
00008380 <NOERROR$>:
8380: ebffff24 bl 8018 <SetGraphicsAddress>
8384: e3a00009 mov r0, #9
8388: eb00001d bl 8404 <FindTag>
838c: e5901000 ldr r1, [r0]
8390: e1a01101 lsl r1, r1, #2
8394: e2411008 sub r1, r1, #8
8398: e2800008 add r0, r0, #8
839c: e3a02000 mov r2, #0
83a0: e3a03000 mov r3, #0
83a4: ebffff6b bl 8158 <DrawString>
000083a8 <LOOP$>:
83a8: eafffffe b 83a8 <LOOP$>
000083ac <Random>:
83ac: e3a01cef mov r1, #61184 ; 0xef00
83b0: e0010190 mul r1, r0, r1
83b4: e0010190 mul r1, r0, r1
83b8: e0811000 add r1, r1, r0
83bc: e2810049 add r0, r1, #73 ; 0x49
83c0: e1a0f00e mov pc, lr
000083c4 <GetSystemTimerBase>:
83c4: e59f0034 ldr r0, [pc, #52] ; 8400 <LOOP$+0x14>
83c8: e1a0f00e mov pc, lr
000083cc <GetCurrentTime>:
83cc: e52de004 push {lr} ; (str lr, [sp, #-4]!)
83d0: ebfffffb bl 83c4 <GetSystemTimerBase>
83d4: e1c000d4 ldrd r0, [r0, #4]
83d8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
000083dc <Wait>:
83dc: e1a02000 mov r2, r0
83e0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
83e4: ebfffff8 bl 83cc <GetCurrentTime>
83e8: e1a03000 mov r3, r0
000083ec <LOOP$>:
83ec: ebfffff6 bl 83cc <GetCurrentTime>
83f0: e0401003 sub r1, r0, r3
83f4: e1510002 cmp r1, r2
83f8: 9afffffb bls 83ec <LOOP$>
83fc: e49df004 pop {pc} ; (ldr pc, [sp], #4)
8400: 20003000 .word 0x20003000
00008404 <FindTag>:
8404: e2400001 sub r0, r0, #1
8408: e3500008 cmp r0, #8
840c: 83a00000 movhi r0, #0
8410: 81a0f00e movhi pc, lr
8414: e59f1054 ldr r1, [pc, #84] ; 8470 <TAGLOOP$+0x2c>
00008418 <TAGRETURN$>:
8418: e0812100 add r2, r1, r0, lsl #2
841c: e5922000 ldr r2, [r2]
8420: e3320000 teq r2, #0
8424: 11a00002 movne r0, r2
8428: 11a0f00e movne pc, lr
842c: e5912000 ldr r2, [r1]
8430: e3320000 teq r2, #0
8434: 13a00000 movne r0, #0
8438: 11a0f00e movne pc, lr
843c: e3a02c01 mov r2, #256 ; 0x100
8440: e52d4004 push {r4} ; (str r4, [sp, #-4]!)
00008444 <TAGLOOP$>:
8444: e1d230b4 ldrh r3, [r2, #4]
8448: e2533001 subs r3, r3, #1
844c: b49d4004 poplt {r4} ; (ldrlt r4, [sp], #4)
8450: bafffff0 blt 8418 <TAGRETURN$>
8454: e0813103 add r3, r1, r3, lsl #2
8458: e5934000 ldr r4, [r3]
845c: e3340000 teq r4, #0
8460: 05832000 streq r2, [r3]
8464: e5923000 ldr r3, [r2]
8468: e0822103 add r2, r2, r3, lsl #2
846c: eafffff4 b 8444 <TAGLOOP$>
8470: 00008cc0 .word 0x00008cc0