Mailing Lists: Apple Mailing Lists

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

Re: ordering calls to driver's ::start() routine?



On Monday, February 4, 2002, at 01:29 PM, Andrew Gallatin wrote:

> However, I'm now having a problem where the start() routine is
> called in a somewhat random order. By this I mean that most times
> <device>@12 makes it into the start() routine first, but sometimes
> <device>@14 wins the race. This is a problem because the first
> device through my start() routine ends up as unit 0, the second as
> unit 1, etc. I'd really like to keep these unit numbers
> consistant across reboots.

Andrew, the <device>@n need some clarification. The "n" comes from Open
Firmware probing the PCI slot and also from Open Firmware having a
priori knowledge of what I/O devices are on the motherboard. Let's not
address Open Firmware's method for assigning "n" to motherboard devices.
Let's look at "n" from a PCI slot point of view.

"n" is really the unit-address (see IEEE 1275 Section 3.2.1.1 Node Names
for details). This is OFs way of assigning a unique address to devices
that are plugged into PCI slots and are identical. This is your case.
Here are the "words" from 1275 for your convenience.

"The unit-address field is the text representation of the physical
address of the device within the address space defined by its parent
node. The form of the text representation is bus-dependent."

So @12 or @14 could be any number. For instance, if you plug your two
devices into my computer and then yours there is no guarantee the 12 and
14 will be the same assigned unit-addresses on both machines. In other
words do not try to ID a PCI device from its unit-address over multiple
computers.

If I had knowledge as to why you want an ID across reboots I might be
able to supply more.

In any event I hope I haven't clouded your issue. Wayne
************************************
Wayne Flansburg, Worldwide Technical Support
Visit our PCI web page at:
http:://developer.apple.com/hardware/pci/
************************************


References: 
 >ordering calls to driver's ::start() routine? (From: Andrew Gallatin <email@hidden>)



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.