|
miniOS
x86_64 hobby kernel with SMP, VFS, and POSIX process model
|
#include <miniOS/syscall.h>#include <miniOS/sched/sched.h>#include <miniOS/fs/vfs.h>#include <miniOS/fs/elf.h>#include <miniOS/mm/heap.h>#include <miniOS/mm/vmm.h>#include <miniOS/mm/pmm.h>#include <miniOS/io.h>#include <miniOS/signal.h>#include <miniOS/arch/x86_64/smp.h>#include <miniOS/arch/x86_64/segment.h>#include <miniOS/net/lwip_netif.h>#include <miniOS/types.h>#include <string.h>#include <stdint.h>#include "syscall_internal.h"
Classes | |
| struct | miniOS_user_regs_struct |
Macros | |
| #define | MINI_OS_DEBUG_SYSCALL_PROC 0 |
| #define | SYSCALL_PROC_DEBUG_PRINT(...) |
| #define | PTRACE_TRACEME 0 |
| #define | PTRACE_PEEKTEXT 1 |
| #define | PTRACE_PEEKDATA 2 |
| #define | PTRACE_POKETEXT 4 |
| #define | PTRACE_POKEDATA 5 |
| #define | PTRACE_CONT 7 |
| #define | PTRACE_KILL 8 |
| #define | PTRACE_SINGLESTEP 9 |
| #define | PTRACE_GETREGS 12 |
| #define | PTRACE_SETREGS 13 |
| #define | PTRACE_SYSCALL 24 |
| #define | EXEC_MAX_ARGS 64 |
| #define | EXEC_MAX_ENVS 128 |
| #define | EXEC_MAX_STRSZ (32 * 1024) |
Functions | |
| static uint64_t | proc_rdtsc (void) |
| static int | wait_status_encode_exit (int exit_code) |
| static int | wait_status_encode_stop (int stop_signal) |
| static int | ptrace_copy_from_tracee (struct thread *target, uint64_t va, void *kbuf, size_t len) |
| static int | ptrace_ensure_writable (struct thread *target, uint64_t page_va) |
| static int | ptrace_copy_to_tracee (struct thread *target, uint64_t va, const void *kbuf, size_t len) |
| static void | ptrace_set_tf (struct thread *target, int on) |
| static struct thread * | ptrace_find_target (uint32_t tracer_tid, uint32_t pid) |
| int64_t | syscall_dispatch_proc (uint64_t nr, uint64_t arg1, uint64_t arg2, uint64_t arg3, uint64_t arg4, uint64_t arg5, uint64_t arg6) |
Variables | |
| uint64_t | miniOS_tsc_hz |
| #define EXEC_MAX_ARGS 64 |
| #define EXEC_MAX_ENVS 128 |
| #define EXEC_MAX_STRSZ (32 * 1024) |
| #define MINI_OS_DEBUG_SYSCALL_PROC 0 |
| #define PTRACE_CONT 7 |
| #define PTRACE_GETREGS 12 |
| #define PTRACE_KILL 8 |
| #define PTRACE_PEEKDATA 2 |
| #define PTRACE_PEEKTEXT 1 |
| #define PTRACE_POKEDATA 5 |
| #define PTRACE_POKETEXT 4 |
| #define PTRACE_SETREGS 13 |
| #define PTRACE_SINGLESTEP 9 |
| #define PTRACE_SYSCALL 24 |
| #define PTRACE_TRACEME 0 |
| #define SYSCALL_PROC_DEBUG_PRINT | ( | ... | ) |
|
inlinestatic |



|
static |





|
static |

| int64_t syscall_dispatch_proc | ( | uint64_t | nr, |
| uint64_t | arg1, | ||
| uint64_t | arg2, | ||
| uint64_t | arg3, | ||
| uint64_t | arg4, | ||
| uint64_t | arg5, | ||
| uint64_t | arg6 ) |


|
inlinestatic |

|
inlinestatic |

|
extern |