免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4240 | 回复: 3
打印 上一主题 下一主题

linux 中断向量表,哪位大侠能给一份,非常感谢 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-01-20 10:55 |只看该作者 |倒序浏览
rt

论坛徽章:
0
2 [报告]
发表于 2009-01-20 11:06 |只看该作者
是不是/proc/interrupts文件的内容啊

论坛徽章:
0
3 [报告]
发表于 2009-01-20 11:10 |只看该作者

回复 #2 zhuhefang2006 的帖子

就是int $0x80这种类似的中断信息,我找不到描述这些内容的资料。

论坛徽章:
0
4 [报告]
发表于 2009-01-20 11:20 |只看该作者
原帖由 rt77789 于 2009-1-20 10:55 发表
rt


在内核源代码中的arch/i386/kernel/traps.c中的trap_init()函数
        set_trap_gate(0,&divide_error);
        set_intr_gate(1,&debug);
        set_intr_gate(2,&nmi);
        set_system_intr_gate(3, &int3); /* int3/4 can be called from all */
        set_system_gate(4,&overflow);
        set_trap_gate(5,&bounds);
        set_trap_gate(6,&invalid_op);
        set_trap_gate(7,&device_not_available);
        set_task_gate(8,GDT_ENTRY_DOUBLEFAULT_TSS);
        set_trap_gate(9,&coprocessor_segment_overrun);
        set_trap_gate(10,&invalid_TSS);
        set_trap_gate(11,&segment_not_present);
        set_trap_gate(12,&stack_segment);
        set_trap_gate(13,&general_protection);
        set_intr_gate(14,&page_fault);
        set_trap_gate(15,&spurious_interrupt_bug);
        set_trap_gate(16,&coprocessor_error);
        set_trap_gate(17,&alignment_check);
#ifdef CONFIG_X86_MCE
        set_trap_gate(18,&machine_check);
#endif
        set_trap_gate(19,&simd_coprocessor_error);

        /*
         * Verify that the FXSAVE/FXRSTOR data will be 16-byte aligned.
         * Generate a build-time error if the alignment is wrong.
         */
        BUILD_BUG_ON(offsetof(struct task_struct, thread.i387.fxsave) & 15);
        if (cpu_has_fxsr) {
                printk(KERN_INFO "Enabling fast FPU save and restore... ");
                set_in_cr4(X86_CR4_OSFXSR);
                printk("done.\n");
        }
        if (cpu_has_xmm) {
                printk(KERN_INFO "Enabling unmasked SIMD FPU exception "
                                "support... ");
                set_in_cr4(X86_CR4_OSXMMEXCPT);
                printk("done.\n");
        }

        set_system_gate(SYSCALL_VECTOR,&system_call); //这个地方就是系统调用


对于其它使用request_irq注册的中断,可以在/proc/interrupts中找到。那里面的0就相当于中断向量的32
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP