From owner-freebsd-current@FreeBSD.ORG Mon Sep 1 15:09:55 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4A3EB16A4BF for ; Mon, 1 Sep 2003 15:09:55 -0700 (PDT) Received: from heron.mail.pas.earthlink.net (heron.mail.pas.earthlink.net [207.217.120.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id F2B7843FE1 for ; Mon, 1 Sep 2003 15:09:53 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-38ldt94.dialup.mindspring.com ([209.86.245.36] helo=mindspring.com) by heron.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19twrp-0005H8-00; Mon, 01 Sep 2003 15:09:46 -0700 Message-ID: <3F53C36A.464DFA5E@mindspring.com> Date: Mon, 01 Sep 2003 15:08:42 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Daniel O'Connor References: <20030831150129.M53465@root.org> <200309011159.51690.doconnor@gsoft.com.au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a477c284240cba6ef377a6a829fdad9466a2d4e88014a4647c350badd9bab72f9c350badd9bab72f9c cc: Mark Kettenis cc: current@freebsd.org cc: nate@root.org Subject: Re: Anyone ported HCF/HSF modem drivers to FreeBSD? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2003 22:09:55 -0000 Daniel O'Connor wrote: > On Monday 01 September 2003 08:41, Mark Kettenis wrote: > > I asked this on -hackers a little while ago but no response. I'm > > curious if anyone has made an attempt to port these Winmodem drivers. > > http://www.linuxant.com/drivers/ > > > > I did look into it, but concluded that it was pretty hopeless. For > > starters, the DSP routines in there seem to need the FPU, and FreeBSD > > doesn't seem to allow that in the kernel. Apart from that, almost > > I don't think that would be _that_ hard to fix at least for that specific > driver, but I'm not 100% sure. I ported the HCF driver for use on my Sony VAIO, a while back, and the author of the thing was kind enough to compile it as PIC so that I could load it as a kernel module. The FPU stuff is pretty embedded; without disassembling, changing, and reassembling the code, which is prohibited by the license, there's really no way to yank the FPU stuff out. So you have to change the lazy FPU context switching, to enable use of the FPU inside the kernel. Which really blows, on many levels. > > 100% of the code is in the binary-only modules, including a lot of > > Linux-specific code, which makes it very hard to see how the code is > > supposed to interface with the kernel. > > Have you seen these drivers -> > http://www.smlink.com/main/index1.php?ln=en&main_id=32 No good for the HCF modems. > And the binary code appears to only call shim routines for which the source is > available. The HCF drivers have threading and timer code dependencies. They also have an expectation of being able to import symbols from the Linux kernel (though most of them actually use a jump-table via a registration function that you pass a structure to). The main problem I ran into was the FPU code; the next main problem was the PIC code (as I said, though, the author was willing to go PIC on the code, and I believe that's still how it's now distributed for Linux). The next main problem was emulating enough of the Linux kernel environment to pass glue functions down to the modem (and the big mess there was interval timers -- the driver tends to use a lot of CPU time). I would really recommend what I ended up doing, which is leaving the FPU code along and using a real modem in a PCMCIA slot, instead. -- Terry