From owner-freebsd-current Thu Feb 17 1:44:13 2000 Delivered-To: freebsd-current@freebsd.org Received: from mail.surf1.de (mail.Surf1.de [194.25.165.21]) by hub.freebsd.org (Postfix) with ESMTP id EB43C37B699 for ; Thu, 17 Feb 2000 01:44:09 -0800 (PST) (envelope-from alex@cichlids.com) Received: from cichlids.com (pC19F546B.dip0.t-ipconnect.de [193.159.84.107]) by mail.surf1.de (8.9.3/8.9.3) with ESMTP id KAA24964 for ; Thu, 17 Feb 2000 10:44:36 +0100 Received: from cichlids.cichlids.com (cichlids.cichlids.com [192.168.0.10]) by cichlids.com (Postfix) with ESMTP id 89648AC26 for ; Thu, 17 Feb 2000 10:45:17 +0100 (CET) Received: (from alex@localhost) by cichlids.cichlids.com (8.9.3/8.9.3) id KAA04618 for current@freebsd.org; Thu, 17 Feb 2000 10:46:31 +0100 (CET) (envelope-from alex) Date: Thu, 17 Feb 2000 10:46:31 +0100 From: Alexander Langer To: current@freebsd.org Subject: how to write kernel modules with newbus? Message-ID: <20000217104631.B4554@cichlids.cichlids.com> Mail-Followup-To: current@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i X-PGP-Fingerprint: 44 28 CA 4C 46 5B D3 A8 A8 E3 BA F3 4E 60 7D 7F X-Verwirrung: Dieser Header dient der allgemeinen Verwirrung. Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello! I wanted to write a device driver as kernelmodule, using newbus. Since there is almost no documentation, I've read some source. It seems, that I have to do something like: static device_method_t zivads_methods[] = { /* interface */ DEVMETHOD(device_identify, zivads_identify), DEVMETHOD(device_probe, zivads_probe), DEVMETHOD(device_attach, zivads_attach), { 0, 0 } }; and to use zivads_* functions then. But this fails because I don't know the right include files - DEVMETHOD is expanded to unknown funtions What I'm searching for is some info on how to do this. Can anyone point me to a SIMPLE device driver module, that does this? Or any documentation? Or summarize how exactly stuff is done, e.g. which include files are needed for the above? It's very hard to find this things out when starting from scratch :) When I will have got this working, I would even write a small manual/introduction, that can be used as an example/manual for other people, e.g. third party vendors, that want to write drivers for newbus. TIA Alex -- I need a new ~/.sig. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message