Hi,
While reading the code of interrupt handler named ignore_int, I
have some questions about it. The code is as follows:
379/* This is the default interrupt "handler" :-) */
380 ALIGN
381ignore_int:
382 cld
383 pushl %eax
384 pushl %ecx
385 pushl %edx
386 pushl %es
387 pushl %ds
388 movl $(__KERNEL_DS),%eax
389 movl %eax,%ds
390 movl %eax,%es
391 pushl 16(%esp)
392 pushl 24(%esp)
393 pushl 32(%esp)
394 pushl 40(%esp)
395 pushl $int_msg
396 call printk
397 addl $(5*4),%esp
398 popl %ds
399 popl %es
400 popl %edx
401 popl %ecx
402 popl %eax
403 iret
431int_msg:
432 .asciz "Unknown interrupt or fault at EIP %p %p %p\n"
1. At the line of 382, why we need clear the DF flag?
2. As for the lines from 391 to 395, we push five parameters into the
stack, which are used by printk. But, according to the definition of
the string 'int_msg', the printk just need four parameters. Among
them, three parameters are specified by three format character '%p',
and the other one is the address of 'int_msg'. It seems that the line
of 391 is redundant, because it corresponds to the eax register which
pushed at the line 383. Is that true?
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ