Date: Mon, 8 Aug 2005 21:19:10 +0200 From: alexander <arundel@h3c.de> To: freebsd-hackers@freebsd.org Subject: Using sysarch specific syscalls in assembly? Message-ID: <20050808191910.GA91484@skatecity>
next in thread | raw e-mail | index | archive | help
Hi there. I wrote a program that needs to access I/O ports with the in/out machinecodes. To gain priviliges to do so I have opened /dev/io. Now somebody told me that I'd rather use i386_set_ioperm which will be much saver, because of the port range limitation. Plus it will make the program more portable because Linux does not have a /dev/io device node. i386_set_ioperm(2) states that this procedure is a system call. So it should be easily accessable through assembly language and it's specific syscall id. Unfortunately I wasn't able to find the syscall id in any of the syscalls.master files that are part of the source tree. <machine/sysarch.h> states that this is a sysarch specific syscall for i386 (hence the i386_*). The following definitions are being made: #define I386_GET_IOPERM 3 #define I386_SET_IOPERM 4 These syscall numbers however are already taken by read(2) and write(2). So how can I make use of these i386 specific syscalls? Is it even possible? Thx in advance.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050808191910.GA91484>