diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2007-10-11 05:17:21 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2007-10-11 05:17:21 -0400 |
commit | 2db55d344e529492545cb3b755c7e9ba8e4fa94e (patch) | |
tree | fea163affb8eec3d927acb498cb3aa1b13c053b8 /arch/x86/ia32/vsyscall-syscall.S | |
parent | 33fc6d51336046bd6e8c7d1a42faff881fa6fb45 (diff) |
x86_64: move ia32
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/ia32/vsyscall-syscall.S')
-rw-r--r-- | arch/x86/ia32/vsyscall-syscall.S | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/arch/x86/ia32/vsyscall-syscall.S b/arch/x86/ia32/vsyscall-syscall.S new file mode 100644 index 000000000000..cf9ef678de3e --- /dev/null +++ b/arch/x86/ia32/vsyscall-syscall.S | |||
@@ -0,0 +1,69 @@ | |||
1 | /* | ||
2 | * Code for the vsyscall page. This version uses the syscall instruction. | ||
3 | */ | ||
4 | |||
5 | #include <asm/ia32_unistd.h> | ||
6 | #include <asm/asm-offsets.h> | ||
7 | #include <asm/segment.h> | ||
8 | |||
9 | .code32 | ||
10 | .text | ||
11 | .section .text.vsyscall,"ax" | ||
12 | .globl __kernel_vsyscall | ||
13 | .type __kernel_vsyscall,@function | ||
14 | __kernel_vsyscall: | ||
15 | .LSTART_vsyscall: | ||
16 | push %ebp | ||
17 | .Lpush_ebp: | ||
18 | movl %ecx, %ebp | ||
19 | syscall | ||
20 | movl $__USER32_DS, %ecx | ||
21 | movl %ecx, %ss | ||
22 | movl %ebp, %ecx | ||
23 | popl %ebp | ||
24 | .Lpop_ebp: | ||
25 | ret | ||
26 | .LEND_vsyscall: | ||
27 | .size __kernel_vsyscall,.-.LSTART_vsyscall | ||
28 | |||
29 | .section .eh_frame,"a",@progbits | ||
30 | .LSTARTFRAME: | ||
31 | .long .LENDCIE-.LSTARTCIE | ||
32 | .LSTARTCIE: | ||
33 | .long 0 /* CIE ID */ | ||
34 | .byte 1 /* Version number */ | ||
35 | .string "zR" /* NUL-terminated augmentation string */ | ||
36 | .uleb128 1 /* Code alignment factor */ | ||
37 | .sleb128 -4 /* Data alignment factor */ | ||
38 | .byte 8 /* Return address register column */ | ||
39 | .uleb128 1 /* Augmentation value length */ | ||
40 | .byte 0x1b /* DW_EH_PE_pcrel|DW_EH_PE_sdata4. */ | ||
41 | .byte 0x0c /* DW_CFA_def_cfa */ | ||
42 | .uleb128 4 | ||
43 | .uleb128 4 | ||
44 | .byte 0x88 /* DW_CFA_offset, column 0x8 */ | ||
45 | .uleb128 1 | ||
46 | .align 4 | ||
47 | .LENDCIE: | ||
48 | |||
49 | .long .LENDFDE1-.LSTARTFDE1 /* Length FDE */ | ||
50 | .LSTARTFDE1: | ||
51 | .long .LSTARTFDE1-.LSTARTFRAME /* CIE pointer */ | ||
52 | .long .LSTART_vsyscall-. /* PC-relative start address */ | ||
53 | .long .LEND_vsyscall-.LSTART_vsyscall | ||
54 | .uleb128 0 /* Augmentation length */ | ||
55 | /* What follows are the instructions for the table generation. | ||
56 | We have to record all changes of the stack pointer. */ | ||
57 | .byte 0x40 + .Lpush_ebp-.LSTART_vsyscall /* DW_CFA_advance_loc */ | ||
58 | .byte 0x0e /* DW_CFA_def_cfa_offset */ | ||
59 | .uleb128 8 | ||
60 | .byte 0x85, 0x02 /* DW_CFA_offset %ebp -8 */ | ||
61 | .byte 0x40 + .Lpop_ebp-.Lpush_ebp /* DW_CFA_advance_loc */ | ||
62 | .byte 0xc5 /* DW_CFA_restore %ebp */ | ||
63 | .byte 0x0e /* DW_CFA_def_cfa_offset */ | ||
64 | .uleb128 4 | ||
65 | .align 4 | ||
66 | .LENDFDE1: | ||
67 | |||
68 | #define SYSCALL_ENTER_KERNEL syscall | ||
69 | #include "vsyscall-sigreturn.S" | ||