Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * AArch32 sigreturn code.
0004  * Based on the kuser helpers in arch/arm/kernel/entry-armv.S.
0005  *
0006  * Copyright (C) 2005-2011 Nicolas Pitre <nico@fluxnic.net>
0007  * Copyright (C) 2012-2018 ARM Ltd.
0008  *
0009  * For ARM syscalls, the syscall number has to be loaded into r7.
0010  * We do not support an OABI userspace.
0011  *
0012  * For Thumb syscalls, we also pass the syscall number via r7. We therefore
0013  * need two 16-bit instructions.
0014  */
0015 
0016 #include <asm/unistd.h>
0017 
0018     .section .rodata
0019     .globl __aarch32_sigret_code_start
0020 __aarch32_sigret_code_start:
0021 
0022     /*
0023      * ARM Code
0024      */
0025     .byte   __NR_compat_sigreturn, 0x70, 0xa0, 0xe3     // mov  r7, #__NR_compat_sigreturn
0026     .byte   __NR_compat_sigreturn, 0x00, 0x00, 0xef     // svc  #__NR_compat_sigreturn
0027 
0028     /*
0029      * Thumb code
0030      */
0031     .byte   __NR_compat_sigreturn, 0x27         // svc  #__NR_compat_sigreturn
0032     .byte   __NR_compat_sigreturn, 0xdf         // mov  r7, #__NR_compat_sigreturn
0033 
0034     /*
0035      * ARM code
0036      */
0037     .byte   __NR_compat_rt_sigreturn, 0x70, 0xa0, 0xe3  // mov  r7, #__NR_compat_rt_sigreturn
0038     .byte   __NR_compat_rt_sigreturn, 0x00, 0x00, 0xef  // svc  #__NR_compat_rt_sigreturn
0039 
0040     /*
0041      * Thumb code
0042      */
0043     .byte   __NR_compat_rt_sigreturn, 0x27          // svc  #__NR_compat_rt_sigreturn
0044     .byte   __NR_compat_rt_sigreturn, 0xdf          // mov  r7, #__NR_compat_rt_sigreturn
0045 
0046         .globl __aarch32_sigret_code_end
0047 __aarch32_sigret_code_end: