From owner-freebsd-hackers Sun Dec 2 12: 8: 6 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from chmls16.mediaone.net (chmls16.mediaone.net [24.147.1.151]) by hub.freebsd.org (Postfix) with ESMTP id 8791C37B405 for ; Sun, 2 Dec 2001 12:08:03 -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 fB2K7vT11456 for ; Sun, 2 Dec 2001 15:07:57 -0500 (EST) Message-ID: <000601c17b6b$7a89c190$037d6041@gandalf> From: "Dragon Fire" To: Subject: device object, driver object, cdevsw Date: Sun, 2 Dec 2001 14:56:48 -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-hackers@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