You are not logged in.

#1 2007-12-15 14:54:33

vincde
Member
Registered: 2007-05-22
Posts: 18

where is outb (<asm/io.h>) ?

I'm migrating my alarm system based on libk8000 from a FreeBSD.
I'm facing the issue that <asm/io.h> is not present on the new archlinux machine.

From asm/io.h, I'm using mainly the "outb" function.

example of this file is here: http://www.koders.com/c/fidF8BACE7ED1FD … 294A7.aspx

Should I recompile the kernel ? load a specific module ? ....

Moreover in the linux sources (/usr/src/linux), I can find a asm/io.h in the folder "include". 
In the header of that file, i can read:

/*
 * This file contains the definitions for the x86 IO instructions
 * inb/inw/inl/outb/outw/outl and the "string versions" of the same
 * (insb/insw/insl/outsb/outsw/outsl). You can also use "pausing"
 * versions of the single-IO instructions (inb_p/inw_p/..).
 *

But strangely I don't find a "def outb" or equivalent in there.



Thanks for your suggestions/help.

Offline

#2 2007-12-15 15:05:05

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,482
Website

Re: where is outb (<asm/io.h>) ?

I believe it is called <sys/io.h> here.

Offline

#3 2007-12-15 15:50:04

vincde
Member
Registered: 2007-05-22
Posts: 18

Re: where is outb (<asm/io.h>) ?

Allan wrote:

I believe it is called <sys/io.h> here.

No. asm/io.h is for linux machines.

Libk8000 is foreseen for Linux boxes and is defined with asm/io.h. (but this is an old library).

some years ago, I've been forced to "translate' this library to freeBSD and on FreeBSD I'm using machine/cpufunc.h.

Offline

#4 2007-12-15 16:53:50

vincde
Member
Registered: 2007-05-22
Posts: 18

Re: where is outb (<asm/io.h>) ?

Allan wrote:

I believe it is called <sys/io.h> here.

Thanks this is working !!!! ;-)

Indeed, sounds that asm/io.h is for old api and sys/io.h is working great.

Many thanks

Offline

Board footer

Powered by FluxBB