From 860fb468a90e1b0be2f8b2b3bfc113fa0c11744d Mon Sep 17 00:00:00 2001 From: antifallobst Date: Mon, 29 May 2023 18:39:52 +0200 Subject: [PATCH] added 'nx_drv_init' to SysABI --- kernel/sysabi.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/kernel/sysabi.md b/kernel/sysabi.md index 946f68a..d00f8ec 100644 --- a/kernel/sysabi.md +++ b/kernel/sysabi.md @@ -54,11 +54,12 @@ The following calls should be implemented to some degree in noxos 1.0. | 0x0207 | `nx_proc_thread_kill` | Kills the current processes' thread with thread id _tid_. | tid | | | | status | N/A | ## Drivers -| ID | Name | Description | Arg1 | Arg2 | Arg3 | Arg4 | Result | Status | -|--------|--------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------|------|-------|------|--------|--------| -| 0x0301 | `nx_drv_register` | Registers the executable at the _n_ bytes long _path_ as driver with the configuration _conf_. The format of the conf struct can be found below. | path | len | *conf | | status | N/A | -| 0x0302 | `nx_drv_create_command_buffer` | This has to be called from a driver. Registers _addr_ as command queue buffer with the length _len_, which has to be greater or equal 16384. If _addr_ is NULL or not aligned to 32 bytes or _len_ is less than 16384, the kernel will map a command queue buffer into the drivers address space, which is of length _len_ but at least 16384. The address to the registered buffer will be returned. | addr | len | | | addr | N/A | -| 0x0303 | `nx_drv_flush_command_buffer` | This has to be called from a driver. Flushes the command queue buffer at _addr_. | addr | | | | status | N/A | +| ID | Name | Description | Arg1 | Arg2 | Arg3 | Arg4 | Result | Status | +|--------|--------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------|------|------|------|--------|--------| +| 0x0301 | `nx_drv_register` | Registers the executable at the file descriptor _fd_ as driver. | fd | | | | status | N/A | +| 0x0302 | `nx_drv_init` | This has to be called from a driver. This can only be called once per driver. Initializes the calling driver process with the configuration _conf_. The format of the conf struct can be found below. | *conf | | | | status | N/A | +| 0x0303 | `nx_drv_create_command_buffer` | This has to be called from a driver. Registers _addr_ as command queue buffer with the length _len_, which has to be greater or equal 16384. If _addr_ is NULL or not aligned to 32 bytes or _len_ is less than 16384, the kernel will map a command queue buffer into the drivers address space, which is of length _len_ but at least 16384. The address to the registered buffer will be returned. | addr | len | | | addr | N/A | +| 0x0304 | `nx_drv_flush_command_buffer` | This has to be called from a driver. Flushes the command queue buffer at _addr_. | addr | | | | status | N/A | ## Kernel These syscalls can only be called from the kernel process.