Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Matching and wildcard entries in the IODeviceTree plane.



Greetings, driver folks.

I'm working on block storage driver, which I'd like to be bootable. I have the driver, and I have working FCode to the point where I can open-dev a specific instance of a wildcarded device.

When it comes to matching the root device, however, it appears that I need to have the specific IOMedia that my driver publishes hook up to an entry in the IODeviceTree.

For example, here's an excerpt from 'ioreg -p IODeviceTree' showing the disk the system booted from:

+-o pci@f4000000 <class IOPlatformDevice, registered, matched, active, busy 0, retain count 10>
| +-o ata-6@D <class IOPCIDevice, registered, matched, active, busy 0, retain count 13>
| | +-o @1:0 <class IOMedia, registered, matched, active, busy 0, retain count 10>
| | +-o @1:1 <class IOMedia, registered, matched, active, busy 0, retain count 8>
| | +-o @1:3 <class IOMedia, registered, matched, active, busy 0, retain count 9>

Conversely, here's my driver:

| +-o Vendor,Device@14 <class IOPCIDevice, registered, matched, active, busy 0, retain count 12>
| | +-o disk <class IOService, !registered, !matched, active, busy 0, retain count 4>

'disk' is my wildcard node, there are two 'real' disks on the controller (@6 & @7) each with filesystems on them. The driver was loaded at boot time (though the same result shows if I load it after booting).

I've studied the ATA driver source available on OpenDarwin.org pretty thoroughly, but I see no mention of the IODeviceTree plane, nor do I see anything in the IOService plane that would suggest some sort of automagic going on behind the scenes.

Is there something I'm missing here? On another system with two ATA disks, I see that this matching out to the partition level isn't something that's exclusive to the boot device, so if everything was working "just right", I'd have expected to see it done for my driver as well.

Thanks for any suggestions.

= Mike
_______________________________________________
darwin-drivers mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-drivers
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.