Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Jan 2001 10:31:17 +0000 (GMT)
From:      Doug Rabson <dfr@nlsystems.com>
To:        Vijo Cherian <vijo@clickarray.com>
Cc:        hackers@freebsd.org, mhsu@clickarray.com
Subject:   Re: kobj, makedevops.pl etc.
Message-ID:  <Pine.BSF.4.21.0101091028060.677-100000@salmon.nlsystems.com>
In-Reply-To: <01010817314705.21412@b52.clickarray.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 8 Jan 2001, Vijo Cherian wrote:

> hi,
> 
>  I have some questions... but most of them may be prerry lame because I am new
> to FreeBSD. 
> 
>  I am running 5.0 and I have a driver for a card which was written for 4.1.
> The driver uses bus_if.h, device_if.h and pci_if.h and these files are generated
> by makedevops.pl. The driver is written as a module and is loaded using kldload.
> But loading fails because BUS_READ_IVAR and friends are not available. 
> Using makeobjops.pl works. My questions are 
>    1. Is this the right way?
>    2. When did kobj find place in the kernel? (which release)
>         (that is what makeobjops.pl does,right?)
>    3. If all that I did is wrong, what is the right way?
>    4. Can you point me to a driver that can be loaded as kld?   
> 
> waiting to see how the community treats a new  convert ;-)

Unfortunately, the device driver ABIs (and many others) are different
between 4.1 and 5.0-current so you cannot load a binary driver intended
for 4.1 on a 5.0-current system.

For newbus at least, the programming API is the same, although in 5.0 it
uses kobj for its object model instead of the slightly less flexible
system used in 4.x. You need to rebuild the driver, using makeobjops.pl
instead of makedevops.pl.

-- 
Doug Rabson				Mail:  dfr@nlsystems.com
					Phone: +44 20 8348 6160




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0101091028060.677-100000>