Linux 4.4.6 中断向量分析
来源:互联网 发布:golang占位符 编辑:程序博客网 时间:2024/06/10 12:15
在linux4.4.6中的中断向量的设置过程分析:
//arch/arm/kernel/traps.cvoid __init early_trap_init(void *vectors_base){ unsigned long vectors = (unsigned long)vectors_base; extern char __stubs_start[], __stubs_end[]; extern char __vectors_start[], __vectors_end[]; unsigned i; vectors_page = vectors_base; /* * Poison the vectors page with an undefined instruction. This * instruction is chosen to be undefined for both ARM and Thumb * ISAs. The Thumb version is an undefined instruction with a * branch back to the undefined instruction. */ for (i = 0; i < PAGE_SIZE / sizeof(u32); i++) ((u32 *)vectors_base)[i] = 0xe7fddef1; /* * Copy the vectors, stubs and kuser helpers (in entry-armv.S) * into the vector page, mapped at 0xffff0000, and ensure these * are visible to the instruction stream. */ memcpy((void *)vectors, __vectors_start, __vectors_end - __vectors_start); memcpy((void *)vectors + 0x1000, __stubs_start, __stubs_end - __stubs_start); kuser_init(vectors_base); flush_icache_range(vectors, vectors + PAGE_SIZE * 2);}
/* * arch/arm/kernel/entry-armv.S * vector_rst,vector_und,vector_pabt等都为宏定义 */ .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/* * arch/arm/kernel/vmlinux.lds.S * The vectors and stubs are relocatable code, and the * only thing that matters is their relative offsets */ __vectors_start = .; .vectors 0 : AT(__vectors_start) { *(.vectors) } . = __vectors_start + SIZEOF(.vectors); __vectors_end = .; __stubs_start = .; .stubs 0x1000 : AT(__stubs_start) { *(.stubs) } . = __stubs_start + SIZEOF(.stubs); __stubs_end = .;
vector_stub und, UND_MODE
0 0
- Linux 4.4.6 中断向量分析
- arm linux中断向量注册分析,linu系统调用分析
- 【Linux操作系统分析】中断和异常(1)——中断描述符表IDT,I/O中断处理,中断向量
- linux中断--中断原理分析
- linux中断--中断原理分析
- 中断向量
- 中断向量
- 中断向量
- linux中断机制分析
- ARM Linux中断分析
- ARM Linux 中断分析
- linux 中断分析
- linux中断程序分析
- Linux中断完全分析
- Linux中断流程分析
- linux内核中断分析
- Linux中断机制分析
- 中断流程 中断向量
- 1009 连连看
- 决策树算法以及个人经历吐槽
- UWB在中国可使用频段的担心
- 2016年程序员如何提高自己的方法有哪些?
- 维护篇(5.2)-15. 外网接口性能测试 ❀ 飞塔 (Fortinet) 防火墙
- Linux 4.4.6 中断向量分析
- 页表管理
- leetcode:Tenth Line 【shell】
- jvm调优-垃圾回收算法
- async模块的异步处理
- 解决利用安卓真机调试程序时日志不显示的问题
- opencv_traincascade训练haar时Error: Insufficient memory等问题
- 页面跳转
- Android开源项目分类汇总