page.s

来自「一份精简的linux内核源代码」· S 代码 · 共 41 行

S
41
字号
/* *  linux/mm/page.s * *  (C) 1991  Linus Torvalds *//* * page.s contains the low-level page-exception code. * the real work is done in mm.c */.globl _page_fault_page_fault:	xchgl %eax,(%esp)  /*取出错码到eax*/	pushl %ecx	pushl %edx	push %ds	push %es	push %fs	movl $0x10,%edx	mov %dx,%ds	mov %dx,%es	mov %dx,%fs	movl %cr2,%edx  	pushl %edx   /*将引起页异常的地址压栈*/	pushl %eax   /*将出错码压栈*/	testl $1,%eax   /*判断是缺页还是写保护(通过p值)*/	jne 1f	call _do_no_page	jmp 2f1:	call _do_wp_page2:	addl $8,%esp	pop %fs	pop %es	pop %ds	popl %edx	popl %ecx	popl %eax	iret

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?