On 5/7/07, James Carlson <[EMAIL PROTECTED]> wrote:

Thomas De Schampheleire writes:
> > However, if you have any hope that your module will not just fall over
> > the next time something in the kernel changes, you should limit
> > yourself to the functions and symbols documented in section (9s, 9e,
> > 9f) of the man pages.  See also the "writing device drivers" book.
>
>
> One of the functions I would need to use is cpu_offline(), implemented
in
> uts/common/os/cpu.c

That's Consolidation Private.  It should not be used outside of ON.

> This one doesn't seem to be in the 9f man pages, so I will not be DDI
> compatible.

True.  That means that you should attempt to integrate your module
into ON, or obtain a either a new stable interface or a contract on
that one.

> > name="mydriver" parent="pseudo" instance=0;
> > ddi-forceattach=1;
>
>
> What exactly should this do? Because according to
> http://forum.java.sun.com/thread.jspa?threadID=5100700&messageID=9350944
> "For driver.conf files, which have specified "parent=pseudo" in the
> driver.conf, Setting
> the property "ddi-forceattach=1" will *not* attach the driver. The
driver

Right.  So, you have your service method just touch the driver to have
it loaded.


Does this mean that the _init functions *will* be called?
Since I do not really have a real device, I don't really need the attach
function...

In what way does a driver differ from a module?

A driver typically offers one or more entries in /dev.  (Without more
context, that question can't really be answered.  There are different
sorts of drivers and modules possible on Solaris.)

> I don't actually don't think I need a real driver to accomplish what I
want,
> rather would I need a simple loadable module. Can they also have a
certain
> autoload mechanism? I don't really find a lot of documentation on that.

In order to autoload it, the system needs to know _when_ to load it.
That's the problem.

You can set up a service that invokes the modload utility to force the
module to load, but I think you're actually looking for the
(undocumented) /platform/*/kernel/cpu/ directory.


Could you give some more information about what this directory is for and
how it could be of use to me?

Thanks for your patience,
Thomas

--
James Carlson, Solaris Networking              <[EMAIL PROTECTED]>
Sun Microsystems / 1 Network Drive         71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677

_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to