Andy Lutomirski | 5cec93c | 2011-06-05 13:50:24 -0400 | [diff] [blame] | 1 | /* |
| 2 | * vsyscall_emu_64.S: Vsyscall emulation page |
| 3 | * |
| 4 | * Copyright (c) 2011 Andy Lutomirski |
| 5 | * |
| 6 | * Subject to the GNU General Public License, version 2 |
| 7 | */ |
| 8 | |
| 9 | #include <linux/linkage.h> |
Andy Lutomirski | 3ae3665 | 2011-08-10 11:15:32 -0400 | [diff] [blame] | 10 | |
Andy Lutomirski | 5cec93c | 2011-06-05 13:50:24 -0400 | [diff] [blame] | 11 | #include <asm/irq_vectors.h> |
Andy Lutomirski | 3ae3665 | 2011-08-10 11:15:32 -0400 | [diff] [blame] | 12 | #include <asm/page_types.h> |
| 13 | #include <asm/unistd_64.h> |
Andy Lutomirski | 5cec93c | 2011-06-05 13:50:24 -0400 | [diff] [blame] | 14 | |
Andy Lutomirski | 3ae3665 | 2011-08-10 11:15:32 -0400 | [diff] [blame] | 15 | __PAGE_ALIGNED_DATA |
| 16 | .globl __vsyscall_page |
| 17 | .balign PAGE_SIZE, 0xcc |
| 18 | .type __vsyscall_page, @object |
| 19 | __vsyscall_page: |
Andy Lutomirski | 5cec93c | 2011-06-05 13:50:24 -0400 | [diff] [blame] | 20 | |
Andy Lutomirski | 3ae3665 | 2011-08-10 11:15:32 -0400 | [diff] [blame] | 21 | mov $__NR_gettimeofday, %rax |
| 22 | syscall |
| 23 | ret |
Andy Lutomirski | 5cec93c | 2011-06-05 13:50:24 -0400 | [diff] [blame] | 24 | |
Andy Lutomirski | 3ae3665 | 2011-08-10 11:15:32 -0400 | [diff] [blame] | 25 | .balign 1024, 0xcc |
| 26 | mov $__NR_time, %rax |
| 27 | syscall |
| 28 | ret |
Andy Lutomirski | 5cec93c | 2011-06-05 13:50:24 -0400 | [diff] [blame] | 29 | |
Andy Lutomirski | 3ae3665 | 2011-08-10 11:15:32 -0400 | [diff] [blame] | 30 | .balign 1024, 0xcc |
| 31 | mov $__NR_getcpu, %rax |
| 32 | syscall |
| 33 | ret |
| 34 | |
| 35 | .balign 4096, 0xcc |
| 36 | |
| 37 | .size __vsyscall_page, 4096 |