diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-07-07 18:12:55 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-07-07 18:12:55 +0300 |
| commit | fe4c623cb9320226866829317cea8ba0c49e7dbc (patch) | |
| tree | 7ea3723077c72ff7969747a70ece0b94d88d2219 /arch/riscv64/conf | |
| parent | d592abd8ccc4026c51e196777031eb65c4acc4de (diff) | |
| download | kmi-fe4c623cb9320226866829317cea8ba0c49e7dbc.tar.gz kmi-fe4c623cb9320226866829317cea8ba0c49e7dbc.zip | |
make executable entrypoint universal callback
+ Effectively means that all executables can be called into, but if an
exe doesn't want to deal with anyone else it should just set a flag
like `not_really_a_server` or whatever
Diffstat (limited to 'arch/riscv64/conf')
| -rwxr-xr-x | arch/riscv64/conf/init | bin | 3960 -> 3960 bytes | |||
| -rw-r--r-- | arch/riscv64/conf/init.c | 16 | ||||
| -rw-r--r-- | arch/riscv64/conf/initrd | bin | 4608 -> 4608 bytes |
3 files changed, 3 insertions, 13 deletions
diff --git a/arch/riscv64/conf/init b/arch/riscv64/conf/init Binary files differindex 5b06586..5248f8f 100755 --- a/arch/riscv64/conf/init +++ b/arch/riscv64/conf/init diff --git a/arch/riscv64/conf/init.c b/arch/riscv64/conf/init.c index c61848e..c3e8334 100644 --- a/arch/riscv64/conf/init.c +++ b/arch/riscv64/conf/init.c @@ -178,14 +178,6 @@ static uint64_t sys_swap(long tid) return 0; } -static void sys_ipc_server(void *f) -{ - struct sys_ret r = ecall2(SYS_IPC_SERVER, (long)f); - - if (r.s != 0) - print_value("ipc_server() failed with error ", r.s); -} - static inline struct sys_ret sys_ipc_req(sys_arg_t pid, sys_arg_t d0, sys_arg_t d1, sys_arg_t d2, @@ -381,14 +373,12 @@ static void handle_kernel(long a0, long a1, long d0, long d1, long d2, long d3) sys_poweroff(0); } -void _start(long a0, long a1, long d0, long d1, long d2, long d3) +void _start(long pid, long tid, long d0, long d1, long d2, long d3) { - if (a0 == 0) - handle_kernel(a0, a1, d0, d1, d2, d3); + if (pid == 0) + handle_kernel(pid, tid, d0, d1, d2, d3); /* otherwise, implement test functionality */ - long pid = a0; - long tid = a1; if (d0 == 1) { void *cbuf = 0; rw_buf = sys_req_sharedmem(pid, rw_buf_size, &cbuf); diff --git a/arch/riscv64/conf/initrd b/arch/riscv64/conf/initrd Binary files differindex a792456..bc0858e 100644 --- a/arch/riscv64/conf/initrd +++ b/arch/riscv64/conf/initrd |
