linux kernel的异常量表介绍(irq,fiq,swi,svc...)
armv8-arch64架构下,linux kernel的异常量表,再entry.S中:/** Exception vectors.*/.align11ENTRY(vectors)kernel_ventry1, sync_invalid// Synchronous EL1tkernel_ventry1, irq_invalid// IRQ EL1tkernel_ventry1, fiq_inval
·
文章目录
1、linux kernel - arch64的异常向量表-(irq,fiq,svc…)
armv8-arch64架构下,linux kernel的异常量表,再entry.S中:
/*
* Exception vectors.
*/
.align 11
ENTRY(vectors)
kernel_ventry 1, sync_invalid // Synchronous EL1t
kernel_ventry 1, irq_invalid // IRQ EL1t
kernel_ventry 1, fiq_invalid // FIQ EL1t
kernel_ventry 1, error_invalid // Error EL1t
kernel_ventry 1, sync // Synchronous EL1h
kernel_ventry 1, irq // IRQ EL1h
kernel_ventry 1, fiq_invalid // FIQ EL1h
kernel_ventry 1, error_invalid // Error EL1h
kernel_ventry 0, sync // Synchronous 64-bit EL0
kernel_ventry 0, irq // IRQ 64-bit EL0
kernel_ventry 0, fiq_invalid // FIQ 64-bit EL0
kernel_ventry 0, error_invalid // Error 64-bit EL0
#ifdef CONFIG_COMPAT
kernel_ventry 0, sync_compat, 32 // Synchronous 32-bit EL0
kernel_ventry 0, irq_compat, 32 // IRQ 32-bit EL0
kernel_ventry 0, fiq_invalid_compat, 32 // FIQ 32-bit EL0
kernel_ventry 0, error_invalid_compat, 32 // Error 32-bit EL0
#else
kernel_ventry 0, sync_invalid, 32 // Synchronous 32-bit EL0
kernel_ventry 0, irq_invalid, 32 // IRQ 32-bit EL0
kernel_ventry 0, fiq_invalid, 32 // FIQ 32-bit EL0
kernel_ventry 0, error_invalid, 32 // Error 32-bit EL0
#endif
END(vectors)
我们这里讲解如下四行:
kernel_ventry 1, irq // IRQ EL1h
kernel_ventry 0, irq // IRQ 64-bit EL0
kernel_ventry 1, sync // Synchronous EL1h
kernel_ventry 0, sync // Synchronous 64-bit EL0
kernel_ventry是宏,翻译后的函数名分别是:
el1_irq
el0_riq
el1_sync
el0_sync
对应的函数入口我们就找到了,也就是说,当触发irq异常、或svc异常时会跳转到这几个函数中。
2、linux kernel - arch的异常向量表-(irq,fiq,swi…)
在arch架构下,linux kernel的同步异常向量表__stubs_start 和 异步异常向量表__vectors_start,在entry-armv.S中:
.section .stubs, "ax", %progbits
__stubs_start:
@ This must be the first word
.word vector_swi
.section .vectors, "ax", %progbits
__vectors_start:
W(b) vector_rst
W(b) vector_und
W(ldr) pc, __vectors_start + 0x1000
W(b) vector_pabt
W(b) vector_dabt
W(b) vector_addrexcptn
W(b) vector_irq
W(b) vector_fiq
更多推荐
已为社区贡献5条内容
所有评论(0)