|
是看0.11 Linux 源码分析中的 Trap_init()进去的调用了N多set_intr_gate();
----------------------------------------------------------
#define _set_gate(gate_addr,type,dpl,addr) \
__asm__ ("movw %%dx,%%ax\n\t" \
"movw %0,%%dx\n\t" \
"movl %%eax,%1\n\t" \
"movl %%edx,%2" \
: \
: "i" ((short) (0x8000+(dpl<<13)+(type<<)), \
"o" (*((char *) (gate_addr))), \
"o" (*(4+(char *) (gate_addr))), \
"d" ((char *) (addr)),"a" (0x00080000))
#define set_intr_gate(n,addr) \
_set_gate(&idt[n],14,0,addr)
----------------------------------------------------------
>>请牛人详细解释一下_set_gate()里面的一些细节,以及地址数据的含意:比如dpl<<13,0x00080000
谢谢 |
|