Andrius Štikonas
6bf7bafb50
Fix a typo.
2024-01-02 00:49:35 +00:00
Andrius Štikonas
c0baf959ab
Make sure brk area is zeroed on start.
...
Some stage0 applications, e.g. M0 assume that newly allocated memory
is empty.
We also need to do that for forked processes but it's not part of this commit.
2024-01-02 00:47:32 +00:00
Andrius Štikonas
c7c827a1e9
Fix _brk issues and workaround some M2-Planet assign on initialization bugs.
2024-01-01 22:22:37 +00:00
Andrius Štikonas
008899d565
Add memory allocation failure checks.
2024-01-01 12:28:29 +00:00
Andrius Štikonas
a870103aad
Fix argc of the first process.
2024-01-01 00:55:28 +00:00
Andrius Štikonas
a34bce78ba
Add sys_chroot.
2023-12-31 21:34:04 +00:00
Andrius Štikonas
0e5f18fa2f
Add sys_uname.
2023-12-31 21:29:04 +00:00
Andrius Štikonas
7ad5f2afac
Free memory of process that exited.
2023-12-31 21:18:01 +00:00
Andrius Štikonas
1cbca175a0
Fix pushing argv onto stack from execve calls.
2023-12-31 20:36:39 +00:00
Andrius Štikonas
db2d001395
Simplify argc counting.
2023-12-31 20:05:09 +00:00
Andrius Štikonas
ac13be4291
Initial version of sys_fork, sys_execve and sys_wait4.
...
It is not fully working yet, in particular child programs have broken
initial stack and argv returns garbage.
2023-12-30 23:45:10 +00:00
Andrius Štikonas
4f2a62fa34
Push envp onto a stack of new process.
2023-12-29 21:59:23 +00:00
Andrius Štikonas
29f38d943a
Just in case make sure to save and restore more registers.
2023-12-28 23:59:12 +00:00
Andrius Štikonas
e894942e52
Add sys_lseek.
2023-12-28 23:59:00 +00:00
Andrius Štikonas
572513c916
posix-runner: Add read,write and open syscalls.
2023-12-27 23:10:21 +00:00
Andrius Štikonas
ebf61b2e9a
Add syscall_table.
2023-12-26 23:57:20 +00:00
Andrius Štikonas
ffe3f524a5
Initial version of posix-runner.
2023-12-26 21:30:19 +00:00