From d1296d7ca780daf7c54520831e6ebb5cbe0a3642 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 9 Oct 2025 17:06:22 -0400 Subject: kern: iotap: Expose I/O taps to userland Expose I/O taps to userland using a tap message interface. An application may construct a tap message to send to the kernel requesting data from a specific tap, if there is data, the buffers will be safely populated, otherwise some error returned. An example is accessing the PS/2 keyboard tap: -- char name[] = "i8042.port.0"; char buf[2] = {0, 0}; struct iotap_msg msg = { .opcode = IOTAP_OPC_READ, .buf = buf, .len = len }; ... /* muxtap() may be used */ ... -- Signed-off-by: Ian Moffett --- src/sys/include/compat/unix/syscall.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/sys/include/compat') diff --git a/src/sys/include/compat/unix/syscall.h b/src/sys/include/compat/unix/syscall.h index 5945f75..743e50c 100644 --- a/src/sys/include/compat/unix/syscall.h +++ b/src/sys/include/compat/unix/syscall.h @@ -34,6 +34,7 @@ #include #include #include +#include /* * Exit the current process - exit(2) syscall @@ -69,7 +70,8 @@ scret_t(*g_unix_sctab[])(struct syscall_args *) = { [SYS_query] = sys_query, [SYS_spawn] = sys_spawn, [SYS_mount] = sys_mount, - [SYS_open] = sys_open + [SYS_open] = sys_open, + [SYS_muxtap] = sys_muxtap }; #endif /* !_NEED_UNIX_SCTAB */ -- cgit v1.2.3