Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

i386_set_ioperm(2)/i386_get_ioperm(2) replacement after switch from x86 to amd64

0 views
Skip to first unread message

Alexander Best

unread,
Dec 1, 2009, 8:22:53 AM12/1/09
to freebsd...@freebsd.org
hi there,

i recently switch from x86 to amd64. right now i'm looking for a way to
replace i386_set_ioperm(2) and i386_get_ioperm(2) (which are x86 specific).
any suggestions?

* full /dev/io access is rather nasty
* the app i'm developing is using inb/outb opcodes through inline assembly in
order to access the parallel port. i tried using ppi(4), but that slows down
things dramatically (see:
http://lists.freebsd.org/pipermail/freebsd-hackers/2009-July/029188.html)

cheers.
alex
_______________________________________________
freebsd...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hacke...@freebsd.org"

Kostik Belousov

unread,
Dec 1, 2009, 9:14:02 AM12/1/09
to Alexander Best, freebsd...@freebsd.org
On Tue, Dec 01, 2009 at 02:22:23PM +0100, Alexander Best wrote:
> hi there,
>
> i recently switch from x86 to amd64. right now i'm looking for a way to
> replace i386_set_ioperm(2) and i386_get_ioperm(2) (which are x86 specific).
> any suggestions?
>
> * full /dev/io access is rather nasty
> * the app i'm developing is using inb/outb opcodes through inline assembly in
> order to access the parallel port. i tried using ppi(4), but that slows down
> things dramatically (see:
> http://lists.freebsd.org/pipermail/freebsd-hackers/2009-July/029188.html)

FreeBSD 8.0 supports these syscalls on amd64.

Alexander Best

unread,
Dec 1, 2009, 10:22:45 AM12/1/09
to Kostik Belousov, freebsd...@freebsd.org
i'm getting this during compilation/linking:

undefined reference to `i386_set_ioperm'

do i need to link against some x86 compat lib?

alex

ps: also the ioperm manuals are not getting installed on amd64 it seems.

Kostik Belousov

unread,
Dec 1, 2009, 10:52:06 AM12/1/09
to Alexander Best, freebsd...@freebsd.org
On Tue, Dec 01, 2009 at 04:21:39PM +0100, Alexander Best wrote:
> i'm getting this during compilation/linking:
>
> undefined reference to `i386_set_ioperm'
Libc wrappers for these syscalls are not provided by amd64 libc.
Use sysarch(2) to execute them.

>
> do i need to link against some x86 compat lib?

You cannot link 32bit library to amd64 binary.

Alexander Best

unread,
Dec 2, 2009, 4:20:02 PM12/2/09
to Kostik Belousov, freebsd...@freebsd.org
ahh. thanks for the hint. wasn't aware of sysarch(2).

cheers.
alex


> > alex

0 new messages