From owner-freebsd-questions@FreeBSD.ORG Fri Dec 10 08:04:28 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D310116A4CE for ; Fri, 10 Dec 2004 08:04:28 +0000 (GMT) Received: from hosea.tallye.com (joel.tallye.com [216.99.199.78]) by mx1.FreeBSD.org (Postfix) with ESMTP id E0D9843D41 for ; Fri, 10 Dec 2004 08:04:27 +0000 (GMT) (envelope-from lorenl@alzatex.com) Received: from hosea.tallye.com (hosea.tallye.com [127.0.0.1]) by hosea.tallye.com (8.12.8/8.12.10) with ESMTP id iBA84RYs014495 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 10 Dec 2004 00:04:27 -0800 Received: (from sttng359@localhost) by hosea.tallye.com (8.12.8/8.12.10/Submit) id iBA84RbY014493 for freebsd-questions@freebsd.org; Fri, 10 Dec 2004 00:04:27 -0800 X-Authentication-Warning: hosea.tallye.com: sttng359 set sender to lorenl@alzatex.com using -f Date: Fri, 10 Dec 2004 00:04:27 -0800 From: "Loren M. Lang" To: FreeBSD Mailing list Message-ID: <20041210080426.GE32126@alzatex.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-GPG-Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc X-GPG-Fingerprint: B3B9 D669 69C9 09EC 1BCD 835A FAF3 7A46 E4A3 280C Subject: Compatibility layer for device drivers X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Dec 2004 08:04:28 -0000 I have some hardware that is neither supported by linux nor freebsd, but I'd like to take up the challenge and try to get it working. My first problem though is choosing with os to develop it for since both have completely different apis. Now it seems to me that I should be able to write a compatibility layer for certain subsystems that are probably similar between the two kernels. For example, I'd expect the usb and pci subsystems both have very similar apis since they are both based on the same low-level specifications. In some cases, simple macros may be all that are needed so there will be no slow-down, and most other cases probably won't need very much code and might be just inline functions. I'd like to do this in a way that many device drivers can use this api to help make them more portable between kernels. Now some parts may require very drastic code differences and need to be written for each architecture, but if this can be minimized it can help keep devices supported to the same degree. I'd be intrested in any thoughts on this. Has anyone does anything similar to this before or are there any device drivers in freebsd that share a common code base with linux drivers? I'm thinking that that might be the case with the maestro driver since it's GPLed. -- I sense much NT in you. NT leads to Bluescreen. Bluescreen leads to downtime. Downtime leads to suffering. NT is the path to the darkside. Powerful Unix is. Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc Fingerprint: B3B9 D669 69C9 09EC 1BCD 835A FAF3 7A46 E4A3 280C