2005-04-16 15:20:36 -07:00
/ *
* Code f o r t h e v s y s c a l l p a g e . T h i s v e r s i o n u s e s t h e s y s e n t e r i n s t r u c t i o n .
* /
# include < a s m / i a32 _ u n i s t d . h >
2005-09-09 21:28:48 +02:00
# include < a s m / a s m - o f f s e t s . h >
2005-04-16 15:20:36 -07:00
2006-01-11 22:43:54 +01:00
.code32
2005-04-16 15:20:36 -07:00
.text
.section .text .vsyscall , " ax"
.globl __kernel_vsyscall
.type _ _ kernel_ v s y s c a l l ,@function
__kernel_vsyscall :
.LSTART_vsyscall :
push % e c x
.Lpush_ecx :
push % e d x
.Lpush_edx :
push % e b p
.Lenter_kernel :
movl % e s p ,% e b p
sysenter
.space 7 , 0 x9 0
jmp . L e n t e r _ k e r n e l
/* 16: System call normal return point is here! */
pop % e b p
.Lpop_ebp :
pop % e d x
.Lpop_edx :
pop % e c x
.Lpop_ecx :
ret
.LEND_vsyscall :
.size _ _ kernel_ v s y s c a l l ,. - . L S T A R T _ v s y s c a l l
.section .eh_frame , " a" ,@progbits
.LSTARTFRAME :
.long .LENDCIE - .LSTARTCIE
.LSTARTCIE :
.long 0 /* CIE ID */
.byte 1 /* Version number */
.string " zR" / * N U L - t e r m i n a t e d a u g m e n t a t i o n s t r i n g * /
.uleb128 1 /* Code alignment factor */
.sleb128 - 4 /* Data alignment factor */
.byte 8 /* Return address register column */
.uleb128 1 /* Augmentation value length */
.byte 0x1b /* DW_EH_PE_pcrel|DW_EH_PE_sdata4. */
.byte 0x0c /* DW_CFA_def_cfa */
.uleb128 4
.uleb128 4
.byte 0x88 /* DW_CFA_offset, column 0x8 */
.uleb128 1
.align 4
.LENDCIE :
.long .LENDFDE1 - .LSTARTFDE1 /* Length FDE */
.LSTARTFDE1 :
.long .LSTARTFDE1 - .LSTARTFRAME /* CIE pointer */
.long .LSTART_vsyscall - . /* PC-relative start address */
.long .LEND_vsyscall - .LSTART_vsyscall
.uleb128 0 /* Augmentation length */
/ * What f o l l o w s a r e t h e i n s t r u c t i o n s f o r t h e t a b l e g e n e r a t i o n .
We h a v e t o r e c o r d a l l c h a n g e s o f t h e s t a c k p o i n t e r . * /
.byte 0x04 /* DW_CFA_advance_loc4 */
.long .Lpush_ecx - .LSTART_vsyscall
.byte 0x0e /* DW_CFA_def_cfa_offset */
.byte 0x08 /* RA at offset 8 now */
.byte 0x04 /* DW_CFA_advance_loc4 */
.long .Lpush_edx - .Lpush_ecx
.byte 0x0e /* DW_CFA_def_cfa_offset */
.byte 0x0c /* RA at offset 12 now */
.byte 0x04 /* DW_CFA_advance_loc4 */
.long .Lenter_kernel - .Lpush_edx
.byte 0x0e /* DW_CFA_def_cfa_offset */
.byte 0x10 /* RA at offset 16 now */
.byte 0 x8 5 , 0 x04 / * D W _ C F A _ o f f s e t % e b p - 1 6 * /
/* Finally the epilogue. */
.byte 0x04 /* DW_CFA_advance_loc4 */
.long .Lpop_ebp - .Lenter_kernel
.byte 0x0e /* DW_CFA_def_cfa_offset */
.byte 0x12 /* RA at offset 12 now */
.byte 0xc5 /* DW_CFA_restore %ebp */
.byte 0x04 /* DW_CFA_advance_loc4 */
.long .Lpop_edx - .Lpop_ebp
.byte 0x0e /* DW_CFA_def_cfa_offset */
.byte 0x08 /* RA at offset 8 now */
.byte 0x04 /* DW_CFA_advance_loc4 */
.long .Lpop_ecx - .Lpop_edx
.byte 0x0e /* DW_CFA_def_cfa_offset */
.byte 0x04 /* RA at offset 4 now */
.align 4
.LENDFDE1 :
# define S Y S C A L L _ E N T E R _ K E R N E L i n t $ 0 x80
# include " v s y s c a l l - s i g r e t u r n . S "