Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Dec 2001 14:56:48 -0500
From:      "Dragon Fire" <dragonfire820@mediaone.net>
To:        <freebsd-hackers@freebsd.org>
Subject:   device object, driver object, cdevsw
Message-ID:  <000601c17b6b$7a89c190$037d6041@gandalf>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000601c17b6b$7a89c190$037d6041>