linux下IRQ和软中断处理函数定义
来源:互联网 发布:java 创建文本文件 编辑:程序博客网 时间:2024/06/05 17:31
0~31是不可屏蔽的中断和异常
32~47是IRQ中断
48~255是软中断
0x80 系统调用的
IRQ和软中断的定义如下:
在arch/x86_64/i8259.c中
void (*interrupt[NR_IRQS])(void) = {
IRQLIST_16(0x0),
#ifdef CONFIG_X86_IO_APIC
IRQLIST_16(0x1), IRQLIST_16(0x2), IRQLIST_16(0x3),
IRQLIST_16(0x4), IRQLIST_16(0x5), IRQLIST_16(0x6), IRQLIST_16(0x7),
IRQLIST_16(0x8), IRQLIST_16(0x9), IRQLIST_16(0xa), IRQLIST_16(0xb),
IRQLIST_16(0xc), IRQLIST_16(0xd)
#ifdef CONFIG_PCI_MSI
, IRQLIST_14(0xe)
#endif
#endif
};
#define IRQ(x,y) \
IRQ##x##y##_interrupt
#define IRQLIST_16(x) \
IRQ(x,0), IRQ(x,1), IRQ(x,2), IRQ(x,3), \
IRQ(x,4), IRQ(x,5), IRQ(x,6), IRQ(x,7), \
IRQ(x,8), IRQ(x,9), IRQ(x,a), IRQ(x,b), \
IRQ(x,c), IRQ(x,d), IRQ(x,e), IRQ(x,f)
#define IRQLIST_14(x) \
IRQ(x,0), IRQ(x,1), IRQ(x,2), IRQ(x,3), \
IRQ(x,4), IRQ(x,5), IRQ(x,6), IRQ(x,7), \
IRQ(x,8), IRQ(x,9), IRQ(x,a), IRQ(x,b), \
IRQ(x,c), IRQ(x,d)
在i8259.c中中断初始化如下:
void __init init_IRQ(void)
{
int i;
/* all the set up before the call gates are initialised */
pre_intr_init_hook();
/*
* Cover the whole vector space, no vector can escape
* us. (some of these will be overridden and become
* 'special' SMP interrupts)
*/
for (i = 0; i < (NR_VECTORS - FIRST_EXTERNAL_VECTOR); i++) {
int vector = FIRST_EXTERNAL_VECTOR + i;
if (i >= NR_IRQS)
break;
if (vector != SYSCALL_VECTOR)
set_intr_gate(vector, interrupt[i]);
}
/* setup after call gates are initialised (usually add in
* the architecture specific gates)
*/
intr_init_hook();
/*
* Set the clock to HZ Hz, we already have a valid
* vector now:
*/
setup_pit_timer();
/*
* External FPU? Set up irq13 if so, for
* original braindamaged IBM FERR coupling.
*/
if (boot_cpu_data.hard_math && !cpu_has_fpu)
setup_irq(FPU_IRQ, &fpu_irq);
irq_ctx_init(smp_processor_id());
}
- linux下IRQ和软中断处理函数定义
- __irq声明IRQ和FIQ中断处理函数
- __irq声明IRQ和FIQ中断处理函数
- linux下查看中断请求记录 IRQ
- linux下查看中断请求记录 IRQ
- linux下查看中断请求记录 IRQ
- Linux如何区分注册到同一个IRQ上的不同中断处理函数
- linux下的中断(interrupt)IRQ以及IRQ绑核小结
- linux不可屏蔽中断异常处理函数定义
- linux 中断和中断处理
- Linux-中断和中断处理
- ARM对中断IRQ的处理
- linux kernel的中断子系统之(三):IRQ number和中断描述符
- linux kernel的中断子系统之:IRQ number和中断描述符
- linux kernel的中断子系统之(三):IRQ number和中断描述符
- linux kernel的中断子系统之(三):IRQ number和中断描述符
- linux kernel的中断子系统之(三):IRQ number和中断描述符
- 中断函数和中断处理函数
- 关于listview中checkbox的选中问题
- bool不初始化的后果:既不为false也不为true
- VIM 命令
- 免杀gh0st过瑞星
- PHPCMSv9 nginx 伪静态URL规则
- linux下IRQ和软中断处理函数定义
- 目录的基本操作
- 文件的 ContentType 类型大全
- 终端驱动学习笔记
- spring 3 MVC 笔记 4
- php printf & sprintf
- C++编程对缓冲区的理解
- Android源码学习之三-Activity是如何进行自动化测试的
- [Android] BroadCastReceiver的使用