Using sysarch specific syscalls in assembly?

alexander arundel at h3c.de
Mon Aug 8 19:19:43 GMT 2005


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.


More information about the freebsd-hackers mailing list