Re: not registry member at registerService()
Re: not registry member at registerService()
- Subject: Re: not registry member at registerService()
- From: Pavan Chebbi <email@hidden>
- Date: Fri, 23 Jun 2006 22:49:01 -0700 (PDT)
Hi Terry,
Indeed what Mr. Cummings suggests works. And that is how I am able to see tty nodes in /dev after my driver is loaded. And thanks to attachToParent() which now eliminates the error I was getting.( Not tried attach() since attachToParent is working fine as of now. )
I see two nodes,( cu. and tty. ) in /dev once my driver is loaded. I guess the suffixes for these nodes are missing. I need to figure out where and how these have to be configured/assigned.
Thanks,
Pavan
Terry Lambert <email@hidden> wrote:
This might not be appropriate.
In fact, it might not be appropriate to use an IOKit approach at all.
Pavan appears to be trying to create a pseudo-device that looks like a
serial
port in /dev.
We do this already with the xnu/bsd/kern/tty_pty.c driver, which is
the pty device driver (and not an IOKit device driver).
For an IOKit device driver, his problem isn't going to be writing the
code, so much as it is getting the "Driver Matching and Loading" of
the document that Dan references to actually trigger. There are a
couple of ways to do this without real hardware, but Active matching
isn't going to work, since there's no physically real unclaimed
hardware that the driver is trying to talk to in order to trigger it.
No trigger = no device node created.
There don't seem to be any good references on writing IOKit pseudo-
devices, other than the source code for several that we've published
through OpenDarwin.
-- Terry
On Jun 23, 2006, at 7:03 AM, Dan Markarian wrote:
> Hi John,
>
>> 2. attachToParent
>
> 2. attach is more
appropriate.
>
> http://developer.apple.com/documentation/DeviceDrivers/Conceptual/IOKitFundamentals/BaseClasses/chapter_6_section_3.html
>
> Dan
>
> Le 23 Jun 2006 à 5:27 AM, John Dalgliesh a écrit :
>
>> On Fri, 23 Jun 2006, Pavan Chebbi wrote:
>>>
>>> Hi All,
>>>
>>> I am writing a driver which creates virtual serial ports in /dev.
>>>
>>> When I call registerService() on my object of class which is
>>> inherited from IOSerialStreamSync(), this is what the error is
>>> given as.
>>
>> How do you create those objects? Have you put them through all the
>> usual states of an IOService/IORegistryEntry object? In brief this
>> is:
>> 1. init
>> 2. attachToParent
>> 3. start
>> (4. usu from start: registerService)
>>
>> The docs in the
IORegisterEntry.h and IOService.h files may be
>> helpful (and there are probably even better docs about this
>> lifecycle but I'm sure you can go and search for those yourself :)
>>
>>> Requesting you to provide some pointers/reasons as to why this
>>> error is coming up because of which I am not able see the nodes
>>> created by my driver in /dev.
>>
>> Extract from doc for IORegistyEntry::attachToParent:
>> "This is the usual method of entering an entry into the registry. "
>>
>>> Thaks in advance,
>>> Pavan.
>>
>> {P^/
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Darwin-kernel mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
Want to be your own boss? Learn how on Yahoo! Small Business.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden