aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/vsyscall-sysenter.S
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/i386/kernel/vsyscall-sysenter.S
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'arch/i386/kernel/vsyscall-sysenter.S')
-rw-r--r--arch/i386/kernel/vsyscall-sysenter.S104
1 files changed, 104 insertions, 0 deletions
diff --git a/arch/i386/kernel/vsyscall-sysenter.S b/arch/i386/kernel/vsyscall-sysenter.S
new file mode 100644
index 000000000000..4daefb2ec1b2
--- /dev/null
+++ b/arch/i386/kernel/vsyscall-sysenter.S
@@ -0,0 +1,104 @@
1/*
2 * Code for the vsyscall page. This version uses the sysenter instruction.
3 *
4 * NOTE:
5 * 1) __kernel_vsyscall _must_ be first in this page.
6 * 2) there are alignment constraints on this stub, see vsyscall-sigreturn.S
7 * for details.
8 */
9
10 .text
11 .globl __kernel_vsyscall
12 .type __kernel_vsyscall,@function
13__kernel_vsyscall:
14.LSTART_vsyscall:
15 push %ecx
16.Lpush_ecx:
17 push %edx
18.Lpush_edx:
19 push %ebp
20.Lenter_kernel:
21 movl %esp,%ebp
22 sysenter
23
24 /* 7: align return point with nop's to make disassembly easier */
25 .space 7,0x90
26
27 /* 14: System call restart point is here! (SYSENTER_RETURN - 2) */
28 jmp .Lenter_kernel
29 /* 16: System call normal return point is here! */
30 .globl SYSENTER_RETURN /* Symbol used by entry.S. */
31SYSENTER_RETURN:
32 pop %ebp
33.Lpop_ebp:
34 pop %edx
35.Lpop_edx:
36 pop %ecx
37.Lpop_ecx:
38 ret
39.LEND_vsyscall:
40 .size __kernel_vsyscall,.-.LSTART_vsyscall
41 .previous
42
43 .section .eh_frame,"a",@progbits
44.LSTARTFRAMEDLSI:
45 .long .LENDCIEDLSI-.LSTARTCIEDLSI
46.LSTARTCIEDLSI:
47 .long 0 /* CIE ID */
48 .byte 1 /* Version number */
49 .string "zR" /* NUL-terminated augmentation string */
50 .uleb128 1 /* Code alignment factor */
51 .sleb128 -4 /* Data alignment factor */
52 .byte 8 /* Return address register column */
53 .uleb128 1 /* Augmentation value length */
54 .byte 0x1b /* DW_EH_PE_pcrel|DW_EH_PE_sdata4. */
55 .byte 0x0c /* DW_CFA_def_cfa */
56 .uleb128 4
57 .uleb128 4
58 .byte 0x88 /* DW_CFA_offset, column 0x8 */
59 .uleb128 1
60 .align 4
61.LENDCIEDLSI:
62 .long .LENDFDEDLSI-.LSTARTFDEDLSI /* Length FDE */
63.LSTARTFDEDLSI:
64 .long .LSTARTFDEDLSI-.LSTARTFRAMEDLSI /* CIE pointer */
65 .long .LSTART_vsyscall-. /* PC-relative start address */
66 .long .LEND_vsyscall-.LSTART_vsyscall
67 .uleb128 0
68 /* What follows are the instructions for the table generation.
69 We have to record all changes of the stack pointer. */
70 .byte 0x04 /* DW_CFA_advance_loc4 */
71 .long .Lpush_ecx-.LSTART_vsyscall
72 .byte 0x0e /* DW_CFA_def_cfa_offset */
73 .byte 0x08 /* RA at offset 8 now */
74 .byte 0x04 /* DW_CFA_advance_loc4 */
75 .long .Lpush_edx-.Lpush_ecx
76 .byte 0x0e /* DW_CFA_def_cfa_offset */
77 .byte 0x0c /* RA at offset 12 now */
78 .byte 0x04 /* DW_CFA_advance_loc4 */
79 .long .Lenter_kernel-.Lpush_edx
80 .byte 0x0e /* DW_CFA_def_cfa_offset */
81 .byte 0x10 /* RA at offset 16 now */
82 .byte 0x85, 0x04 /* DW_CFA_offset %ebp -16 */
83 /* Finally the epilogue. */
84 .byte 0x04 /* DW_CFA_advance_loc4 */
85 .long .Lpop_ebp-.Lenter_kernel
86 .byte 0x0e /* DW_CFA_def_cfa_offset */
87 .byte 0x0c /* RA at offset 12 now */
88 .byte 0xc5 /* DW_CFA_restore %ebp */
89 .byte 0x04 /* DW_CFA_advance_loc4 */
90 .long .Lpop_edx-.Lpop_ebp
91 .byte 0x0e /* DW_CFA_def_cfa_offset */
92 .byte 0x08 /* RA at offset 8 now */
93 .byte 0x04 /* DW_CFA_advance_loc4 */
94 .long .Lpop_ecx-.Lpop_edx
95 .byte 0x0e /* DW_CFA_def_cfa_offset */
96 .byte 0x04 /* RA at offset 4 now */
97 .align 4
98.LENDFDEDLSI:
99 .previous
100
101/*
102 * Get the common code for the sigreturn entry points.
103 */
104#include "vsyscall-sigreturn.S"