From owner-freebsd-small Sun Dec 2 12:37: 5 2001 Delivered-To: freebsd-small@freebsd.org Received: from chmls16.mediaone.net (chmls16.mediaone.net [24.147.1.151]) by hub.freebsd.org (Postfix) with ESMTP id 3C5B037B405 for ; Sun, 2 Dec 2001 12:37:02 -0800 (PST) Received: from gandalf (h0050dac2456d.ne.mediaone.net [65.96.125.3]) by chmls16.mediaone.net (8.11.1/8.11.1) with SMTP id fB2Kb1T11494 for ; Sun, 2 Dec 2001 15:37:01 -0500 (EST) Message-ID: <001201c17b6f$839b64b0$037d6041@gandalf> From: "Dragon Fire" To: Subject: Fw: device object, driver object, cdevsw Date: Sun, 2 Dec 2001 15:25:42 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-freebsd-small@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > I'm writing a PCI character device driver and need some clairification. > > As I see the FreeBSD driver structure there are really two components to a > device driver, there is the KLD component which contains the device methods > for probe, attach, detach, etc and handles the dynamic componet of the > driver. Then there is the traditional Unix cdevsw structure which handles > the read, write, ioctl etc. > > The few places the KLD is documented really doesn't cover the link between > the two elements KLD and cdevsw. I understand that if successsfully probed > the attach creates the dev_t using the cdevw table. But I'm having > difficulty seeing the relationship. > > Would it be fair to say the KLD components represent the dynamics kernel > facilities and the cdevsw implments what we consider the "traditional" Unix > device driver. Could somebody shed light on this subject. > > Thanks in advance! > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-small" in the body of the message