分类: LINUX
2012-02-20 20:17:45
MagicBoy20102012-03-29 12:49:54
按照IA32的文档,硬件逻辑在处理一个中断时,显然是不希望进行中断嵌套的,不过因为ISR这部分已经不受内核控制了,是由设备驱动程序员提供的,他们完全可以不小心地把EFLAGS.IF重新置1.内核的设计再怎么用心良苦,如果让一个对内部机制不太了解的同学来写的话,那么可以很容易就抹煞掉这种努力。。。。
GFree_Wind2012-03-29 12:41:56
关于中断嵌套我有一个问题
根据Intel的开发手册volume 3,6.12.1.2,
The only difference between an interrupt gate and a trap gate is the way the processor handles the IF flag in the EFLAGS register. When accessing an exception- or interrupt-handling procedure through an interrupt gate, the processor clears the IF flag to prevent other interrupts from interfering with the current interrupt handler.
A subsequent IRET instruction restores the IF flag to its value in the saved contents of EFFL