about summary refs log tree commit diff stats
path: root/src/focaccia/qemu/x86.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/focaccia/qemu/x86.py')
-rw-r--r--src/focaccia/qemu/x86.py40
1 files changed, 37 insertions, 3 deletions
diff --git a/src/focaccia/qemu/x86.py b/src/focaccia/qemu/x86.py
index ef071c1..d8641fc 100644
--- a/src/focaccia/qemu/x86.py
+++ b/src/focaccia/qemu/x86.py
@@ -4,12 +4,46 @@ from focaccia.qemu.syscall import SyscallInfo
 emulated_system_calls = {
     0: SyscallInfo('read', patchup_address_registers=['rsi']),
     1: SyscallInfo('write'),
+    2: SyscallInfo('open'),
+    3: SyscallInfo('close'),
+    4: SyscallInfo('stat', patchup_address_registers=['rsi']),
+    5: SyscallInfo('fstat', patchup_address_registers=['rsi']),
+    6: SyscallInfo('lstat', patchup_address_registers=['rsi']),
+    8: SyscallInfo('lseek'),
+    16: SyscallInfo('ioctl', patchup_address_registers=['rdx']),
+    17: SyscallInfo('pread64', patchup_address_registers=['rsi']),
+    18: SyscallInfo('pwrite64'),
     19: SyscallInfo('readv', patchup_address_registers=['rsi']),
     20: SyscallInfo('writev'),
     21: SyscallInfo('access'),
-    34:  SyscallInfo('pause', []),
-    39:  SyscallInfo('getpid', []),
-    102: SyscallInfo('getuid', []),
+    24: SyscallInfo('sched_yield'),
+    34:  SyscallInfo('pause'),
+    39:  SyscallInfo('getpid'),
+    72:  SyscallInfo('fcntl', patchup_address_registers=['rdx']),
+    73:  SyscallInfo('flock'),
+    74:  SyscallInfo('fsync'),
+    75:  SyscallInfo('fdatasync'),
+    76:  SyscallInfo('truncate'),
+    77:  SyscallInfo('ftruncate'),
+    78:  SyscallInfo('getdents', patchup_address_registers=['rsi']),
+    79:  SyscallInfo('getcwd', patchup_address_registers=['rdi']),
+    80:  SyscallInfo('chdir'),
+    81:  SyscallInfo('fchdir'),
+    82:  SyscallInfo('rename'),
+    83:  SyscallInfo('mkdir'),
+    84:  SyscallInfo('rmdir'),
+    85:  SyscallInfo('creat'),
+    86:  SyscallInfo('link'),
+    87:  SyscallInfo('unlink'),
+    88:  SyscallInfo('symlink'),
+    89:  SyscallInfo('readlink', patchup_address_registers=['rsi']),
+    90:  SyscallInfo('chmod'),
+    91:  SyscallInfo('fchmod'),
+    92:  SyscallInfo('chown'),
+    93:  SyscallInfo('fchown'),
+    94:  SyscallInfo('lchown'),
+    95:  SyscallInfo('umask'),
+    102: SyscallInfo('getuid'),
     318: SyscallInfo('getrandom', patchup_address_registers=['rdi'])
 }