diff options
author | Austin Yuan <shengquan.yuan@intel.com> | 2015-05-20 13:26:26 +0800 |
---|---|---|
committer | Austin Yuan <shengquan.yuan@intel.com> | 2015-05-20 13:26:26 +0800 |
commit | 23bd23703b9e23491935d4657ad9472305c10409 (patch) | |
tree | c96f5623fea47cde99e7e803087bb43c59dd6347 /iopl.S |
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
Diffstat (limited to 'iopl.S')
-rw-r--r-- | iopl.S | 35 |
1 files changed, 35 insertions, 0 deletions
@@ -0,0 +1,35 @@ + /* autogenerated by gensyscalls.py */ + /* #include <sys/linux-syscalls.h> */ + +#if !defined __ASM_ARM_UNISTD_H && !defined __ASM_I386_UNISTD_H +#if defined __arm__ && !defined __ARM_EABI__ && !defined __thumb__ + # define __NR_SYSCALL_BASE 0x900000 + #else + # define __NR_SYSCALL_BASE 0 + #endif +#endif + + +#define __NR_iopl (__NR_SYSCALL_BASE+110) /* refert to linux-2.6/arch/x86/include/asm/unistd_32.h */ + + .text + .type iopl, @function + .globl iopl + .align 4 + + iopl: + pushl %ebx + mov 8(%esp), %ebx + movl $__NR_iopl, %eax + int $0x80 + cmpl $-129, %eax + jb 1f + negl %eax + pushl %eax + call __set_errno + addl $4, %esp + orl $-1, %eax + 1: + popl %ebx + ret + |