-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.s
411 lines (411 loc) · 8.53 KB
/
init.s
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
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
.file "init.c"
.stabs "kern/init.c",100,0,2,.Ltext0
.text
.Ltext0:
.stabs "gcc2_compiled.",60,0,0,0
.stabs "int:t(0,1)=r(0,1);-2147483648;2147483647;",128,0,0,0
.stabs "char:t(0,2)=r(0,2);0;127;",128,0,0,0
.stabs "long int:t(0,3)=r(0,3);-0;4294967295;",128,0,0,0
.stabs "unsigned int:t(0,4)=r(0,4);0;4294967295;",128,0,0,0
.stabs "long unsigned int:t(0,5)=r(0,5);0;-1;",128,0,0,0
.stabs "__int128:t(0,6)=r(0,6);0;-1;",128,0,0,0
.stabs "__int128 unsigned:t(0,7)=r(0,7);0;-1;",128,0,0,0
.stabs "long long int:t(0,8)=r(0,8);-0;4294967295;",128,0,0,0
.stabs "long long unsigned int:t(0,9)=r(0,9);0;-1;",128,0,0,0
.stabs "short int:t(0,10)=r(0,10);-32768;32767;",128,0,0,0
.stabs "short unsigned int:t(0,11)=r(0,11);0;65535;",128,0,0,0
.stabs "signed char:t(0,12)=r(0,12);-128;127;",128,0,0,0
.stabs "unsigned char:t(0,13)=r(0,13);0;255;",128,0,0,0
.stabs "float:t(0,14)=r(0,1);4;0;",128,0,0,0
.stabs "double:t(0,15)=r(0,1);8;0;",128,0,0,0
.stabs "long double:t(0,16)=r(0,1);16;0;",128,0,0,0
.stabs "_Decimal32:t(0,17)=r(0,1);4;0;",128,0,0,0
.stabs "_Decimal64:t(0,18)=r(0,1);8;0;",128,0,0,0
.stabs "_Decimal128:t(0,19)=r(0,1);16;0;",128,0,0,0
.stabs "void:t(0,20)=(0,20)",128,0,0,0
.stabs "./inc/stdio.h",130,0,0,0
.stabs "./inc/stdarg.h",130,0,0,0
.stabs "va_list:t(2,1)=(2,2)=ar(2,3)=r(2,3);0;-1;;0;0;(2,4)=xs__va_list_tag:",128,0,0,0
.stabn 162,0,0,0
.stabn 162,0,0,0
.stabs "./inc/string.h",130,0,0,0
.stabs "./inc/types.h",130,0,0,0
.stabs "bool:t(4,1)=(4,2)=eFalse:0,True:1,;",128,0,0,0
.stabs " :T(4,3)=efalse:0,true:1,;",128,0,0,0
.stabs "int8_t:t(4,4)=(0,12)",128,0,0,0
.stabs "uint8_t:t(4,5)=(0,13)",128,0,0,0
.stabs "int16_t:t(4,6)=(0,10)",128,0,0,0
.stabs "uint16_t:t(4,7)=(0,11)",128,0,0,0
.stabs "int32_t:t(4,8)=(0,1)",128,0,0,0
.stabs "uint32_t:t(4,9)=(0,4)",128,0,0,0
.stabs "int64_t:t(4,10)=(0,8)",128,0,0,0
.stabs "uint64_t:t(4,11)=(0,9)",128,0,0,0
.stabs "intptr_t:t(4,12)=(4,8)",128,0,0,0
.stabs "uintptr_t:t(4,13)=(4,9)",128,0,0,0
.stabs "physaddr_t:t(4,14)=(4,9)",128,0,0,0
.stabs "ppn_t:t(4,15)=(4,9)",128,0,0,0
.stabs "size_t:t(4,16)=(4,9)",128,0,0,0
.stabs "ssize_t:t(4,17)=(4,8)",128,0,0,0
.stabs "off_t:t(4,18)=(4,8)",128,0,0,0
.stabn 162,0,0,0
.stabn 162,0,0,0
.section .rodata.str1.1,"aMS",@progbits,1
.LC0:
.string "entering test_backtrace %d\n"
.LC1:
.string "leaving test_backtrace %d\n"
.section .text.unlikely,"ax",@progbits
.LCOLDB2:
.text
.LHOTB2:
.p2align 4,,15
.stabs "test_backtrace:F(0,20)",36,0,0,test_backtrace
.stabs "x:P(0,1)",64,0,0,3
.globl test_backtrace
.type test_backtrace, @function
test_backtrace:
.stabn 68,0,13,.LM0-.LFBB1
.LM0:
.LFBB1:
.LFB0:
.cfi_startproc
pushq %rbx
.cfi_def_cfa_offset 16
.cfi_offset 3, -16
.stabn 68,0,14,.LM1-.LFBB1
.LM1:
movl %edi, %esi
.stabn 68,0,13,.LM2-.LFBB1
.LM2:
movl %edi, %ebx
.stabn 68,0,14,.LM3-.LFBB1
.LM3:
xorl %eax, %eax
movl $.LC0, %edi
call cprintf
.stabn 68,0,15,.LM4-.LFBB1
.LM4:
testl %ebx, %ebx
jle .L2
.stabn 68,0,16,.LM5-.LFBB1
.LM5:
leal -1(%rbx), %edi
call test_backtrace
.stabn 68,0,19,.LM6-.LFBB1
.LM6:
movl %ebx, %esi
movl $.LC1, %edi
xorl %eax, %eax
.stabn 68,0,20,.LM7-.LFBB1
.LM7:
popq %rbx
.cfi_remember_state
.cfi_def_cfa_offset 8
.stabn 68,0,19,.LM8-.LFBB1
.LM8:
jmp cprintf
.p2align 4,,10
.p2align 3
.L2:
.cfi_restore_state
.stabn 68,0,18,.LM9-.LFBB1
.LM9:
xorl %esi, %esi
xorl %edi, %edi
xorl %edx, %edx
call mon_backtrace
.stabn 68,0,19,.LM10-.LFBB1
.LM10:
movl %ebx, %esi
movl $.LC1, %edi
xorl %eax, %eax
.stabn 68,0,20,.LM11-.LFBB1
.LM11:
popq %rbx
.cfi_def_cfa_offset 8
.stabn 68,0,19,.LM12-.LFBB1
.LM12:
jmp cprintf
.cfi_endproc
.LFE0:
.size test_backtrace, .-test_backtrace
.section .text.unlikely
.LCOLDE2:
.text
.LHOTE2:
.Lscope1:
.section .rodata.str1.1
.LC3:
.string "6828 decimal is %o octal!\n"
.section .text.unlikely
.LCOLDB4:
.text
.LHOTB4:
.p2align 4,,15
.stabs "i386_init:F(0,20)",36,0,0,i386_init
.globl i386_init
.type i386_init, @function
i386_init:
.stabn 68,0,24,.LM13-.LFBB2
.LM13:
.LFBB2:
.LFB1:
.cfi_startproc
.stabn 68,0,30,.LM14-.LFBB2
.LM14:
movl $end, %edx
.stabn 68,0,24,.LM15-.LFBB2
.LM15:
subq $8, %rsp
.cfi_def_cfa_offset 16
.stabn 68,0,30,.LM16-.LFBB2
.LM16:
xorl %esi, %esi
subq $edata, %rdx
movl $edata, %edi
call memset
.stabn 68,0,34,.LM17-.LFBB2
.LM17:
call cons_init
.stabn 68,0,36,.LM18-.LFBB2
.LM18:
movl $.LC3, %edi
movl $6828, %esi
xorl %eax, %eax
call cprintf
.stabn 68,0,39,.LM19-.LFBB2
.LM19:
movl $5, %edi
call test_backtrace
.p2align 4,,10
.p2align 3
.L7:
.stabn 68,0,43,.LM20-.LFBB2
.LM20:
xorl %edi, %edi
call monitor
jmp .L7
.cfi_endproc
.LFE1:
.size i386_init, .-i386_init
.section .text.unlikely
.LCOLDE4:
.text
.LHOTE4:
.Lscope2:
.section .rodata.str1.1
.LC5:
.string "kernel panic at %s:%d: "
.LC6:
.string "\n"
.section .text.unlikely
.LCOLDB7:
.text
.LHOTB7:
.p2align 4,,15
.stabs "_panic:F(0,20)",36,0,0,_panic
.stabs "file:P(0,21)=*(0,2)",64,0,0,5
.stabs "line:P(0,1)",64,0,0,4
.stabs "fmt:P(0,21)",64,0,0,3
.globl _panic
.type _panic, @function
_panic:
.stabn 68,0,59,.LM21-.LFBB3
.LM21:
.LFBB3:
.LFB2:
.cfi_startproc
pushq %rbx
.cfi_def_cfa_offset 16
.cfi_offset 3, -16
movq %rdx, %rbx
subq $208, %rsp
.cfi_def_cfa_offset 224
testb %al, %al
movq %rcx, 56(%rsp)
movq %r8, 64(%rsp)
movq %r9, 72(%rsp)
je .L10
movaps %xmm0, 80(%rsp)
movaps %xmm1, 96(%rsp)
movaps %xmm2, 112(%rsp)
movaps %xmm3, 128(%rsp)
movaps %xmm4, 144(%rsp)
movaps %xmm5, 160(%rsp)
movaps %xmm6, 176(%rsp)
movaps %xmm7, 192(%rsp)
.L10:
.stabn 68,0,59,.LM22-.LFBB3
.LM22:
movq %fs:40, %rax
movq %rax, 24(%rsp)
xorl %eax, %eax
.stabn 68,0,62,.LM23-.LFBB3
.LM23:
cmpq $0, panicstr(%rip)
je .L15
.p2align 4,,10
.p2align 3
.L12:
.stabn 68,0,78,.LM24-.LFBB3
.LM24:
xorl %edi, %edi
call monitor
jmp .L12
.L15:
.stabn 68,0,64,.LM25-.LFBB3
.LM25:
movq %rbx, panicstr(%rip)
.stabn 68,0,67,.LM26-.LFBB3
.LM26:
#APP
# 67 "kern/init.c" 1
cli; cld
# 0 "" 2
.stabn 68,0,69,.LM27-.LFBB3
.LM27:
#NO_APP
leaq 224(%rsp), %rax
.stabn 68,0,70,.LM28-.LFBB3
.LM28:
movl %esi, %edx
movq %rdi, %rsi
movl $.LC5, %edi
.stabn 68,0,69,.LM29-.LFBB3
.LM29:
movl $24, (%rsp)
movl $48, 4(%rsp)
movq %rax, 8(%rsp)
leaq 32(%rsp), %rax
movq %rax, 16(%rsp)
.stabn 68,0,70,.LM30-.LFBB3
.LM30:
xorl %eax, %eax
call cprintf
.stabn 68,0,71,.LM31-.LFBB3
.LM31:
movq %rbx, %rdi
movq %rsp, %rsi
call vcprintf
.stabn 68,0,72,.LM32-.LFBB3
.LM32:
movl $.LC6, %edi
xorl %eax, %eax
call cprintf
jmp .L12
.cfi_endproc
.LFE2:
.size _panic, .-_panic
.section .text.unlikely
.LCOLDE7:
.text
.LHOTE7:
.stabs "ap:(2,1)",128,0,0,0
.stabn 192,0,0,.LFBB3-.LFBB3
.stabn 224,0,0,.Lscope3-.LFBB3
.Lscope3:
.section .rodata.str1.1
.LC8:
.string "kernel warning at %s:%d: "
.section .text.unlikely
.LCOLDB9:
.text
.LHOTB9:
.p2align 4,,15
.stabs "_warn:F(0,20)",36,0,0,_warn
.stabs "file:P(0,21)",64,0,0,5
.stabs "line:P(0,1)",64,0,0,4
.stabs "fmt:P(0,21)",64,0,0,3
.globl _warn
.type _warn, @function
_warn:
.stabn 68,0,84,.LM33-.LFBB4
.LM33:
.LFBB4:
.LFB3:
.cfi_startproc
pushq %rbx
.cfi_def_cfa_offset 16
.cfi_offset 3, -16
movq %rdx, %rbx
subq $208, %rsp
.cfi_def_cfa_offset 224
testb %al, %al
movq %rcx, 56(%rsp)
movq %r8, 64(%rsp)
movq %r9, 72(%rsp)
je .L17
movaps %xmm0, 80(%rsp)
movaps %xmm1, 96(%rsp)
movaps %xmm2, 112(%rsp)
movaps %xmm3, 128(%rsp)
movaps %xmm4, 144(%rsp)
movaps %xmm5, 160(%rsp)
movaps %xmm6, 176(%rsp)
movaps %xmm7, 192(%rsp)
.L17:
.stabn 68,0,84,.LM34-.LFBB4
.LM34:
movq %fs:40, %rax
movq %rax, 24(%rsp)
xorl %eax, %eax
.stabn 68,0,87,.LM35-.LFBB4
.LM35:
leaq 224(%rsp), %rax
.stabn 68,0,88,.LM36-.LFBB4
.LM36:
movl %esi, %edx
movq %rdi, %rsi
movl $.LC8, %edi
.stabn 68,0,87,.LM37-.LFBB4
.LM37:
movq %rax, 8(%rsp)
leaq 32(%rsp), %rax
movl $24, (%rsp)
movl $48, 4(%rsp)
movq %rax, 16(%rsp)
.stabn 68,0,88,.LM38-.LFBB4
.LM38:
xorl %eax, %eax
call cprintf
.stabn 68,0,89,.LM39-.LFBB4
.LM39:
movq %rsp, %rsi
movq %rbx, %rdi
call vcprintf
.stabn 68,0,90,.LM40-.LFBB4
.LM40:
xorl %eax, %eax
movl $.LC6, %edi
call cprintf
.stabn 68,0,92,.LM41-.LFBB4
.LM41:
movq 24(%rsp), %rax
xorq %fs:40, %rax
jne .L20
addq $208, %rsp
.cfi_remember_state
.cfi_def_cfa_offset 16
popq %rbx
.cfi_def_cfa_offset 8
ret
.L20:
.cfi_restore_state
call __stack_chk_fail
.cfi_endproc
.LFE3:
.size _warn, .-_warn
.section .text.unlikely
.LCOLDE9:
.text
.LHOTE9:
.stabs "ap:(2,1)",128,0,0,0
.stabn 192,0,0,.LFBB4-.LFBB4
.stabn 224,0,0,.Lscope4-.LFBB4
.Lscope4:
.comm panicstr,8,8
.stabs "panicstr:G(0,21)",32,0,0,0
.stabs "",100,0,0,.Letext0
.Letext0:
.ident "GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609"
.section .note.GNU-stack,"",@progbits