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?



Wayne Flansburg writes:
>
> 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.

Yes, "n" is the pci slot number.

> "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.

Don't worry, I have no interest in doing that.. ;)

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

For exactly the same reason one would want en0 and en1 refer to the
same hardware same across reboots if a machine had two identical nics.

Eg, I'm simply interested in not violating the Principal Of Least
Astonishment. (POLA). If I have a device plugged into bus 0, slot 12
and another in bus 0, slot 14, I would expect the OS to probe & attach
those devices in the same order every time, as long as the hardware
configuration remained unchanged. I can't think of another unix which
doesn't..

I've learned that since OS X apparently leaves device naming up to
external user agents, or the drivers themselves, it doesn't try to
probe the buses in a deterministic fashion. I personally think its
bizzare, but now that I know the rules, I can work with it..


> 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/

This doesn't appear to be a valid URL -- you should remove one of the
colons.

Thanks for your helps,

Drew


References: 
 >ordering calls to driver's ::start() routine? (From: Andrew Gallatin <email@hidden>)
 >Re: ordering calls to driver's ::start() routine? (From: Wayne Flansburg <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.