summaryrefslogtreecommitdiffstats
path: root/src/mm/page.s
diff options
context:
space:
mode:
Diffstat (limited to 'src/mm/page.s')
-rw-r--r--src/mm/page.s40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/mm/page.s b/src/mm/page.s
new file mode 100644
index 0000000..9ebf3f7
--- /dev/null
+++ b/src/mm/page.s
@@ -0,0 +1,40 @@
1/*
2 * linux/mm/page.s
3 *
4 * (C) 1991 Linus Torvalds
5 */
6
7/*
8 * page.s contains the low-level page-exception code.
9 * the real work is done in mm.c
10 */
11
12.globl page_fault
13
14page_fault:
15 xchgl %eax,(%esp)
16 pushl %ecx
17 pushl %edx
18 push %ds
19 push %es
20 push %fs
21 movl $0x10,%edx
22 mov %dx,%ds
23 mov %dx,%es
24 mov %dx,%fs
25 movl %cr2,%edx
26 pushl %edx
27 pushl %eax
28 testl $1,%eax
29 jne 1f
30 call do_no_page
31 jmp 2f
321: call do_wp_page
332: addl $8,%esp
34 pop %fs
35 pop %es
36 pop %ds
37 popl %edx
38 popl %ecx
39 popl %eax
40 iret