Q: Why do some Open Firmware device tree nodes have a node name with an "@n" form while others do not? The "n" in "@n" is an integer.
A: The "@n" without the quotes is required by IEEE 1275 Section 3.2.1.1 Node Names. In particular, the format for a node name is name@unit-address:device-arguments where device-arguments may or may not be needed. If, for instance, the node was a disk node used in booting, then there would be devices-arguments to specify the disk partition and file name or type. This leads to the question, "What happens if the file is in a folder?" IEEE 1275 Section 3.2.1.2 Path Names defines that case by requiring paths to be separated by "/". For example: /node-name0/node-name1/.../node-namen . The unit address is needed for devices of the same type. The "@n" is used to uniquely identify multiple devices. For instance:
/pci@80000000/neatdevice@1200
/pci@80000000/neatdevice@1300
/pci@80000000/neatdevice@1400
|
|
In this case, there are three devices all with the same name. A real-world case might be a multimedia developer with three identical display devices.
The /packages node is an example of a node name without the unit-address. This is due to the /packages being a support node, not a device node. For more details, see IEEE 1275 Section 3.5 Standard System Nodes.
|