<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2523" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=843513001-18102007><FONT face=Arial
size=2>Hi,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=843513001-18102007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=843513001-18102007><FONT face=Arial
size=2>This might be a very basic question but I could not find a clear answer
in the</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=843513001-18102007><FONT face=Arial
size=2>OpenFirmware PCI Bus Binding doc.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=843513001-18102007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=843513001-18102007><FONT face=Arial
size=2>Child node names are represented in a device-tree like
so:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=843513001-18102007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=843513001-18102007><FONT face=Arial
size=2><A href="mailto:devname@dev#,fun"><FONT
color=#000000>devname@dev#,fun</FONT></A>#</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=843513001-18102007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=843513001-18102007><FONT face=Arial
size=2>After looking at the pci bus-binding, I figured that the device
naming convention (ie. representation</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=843513001-18102007><FONT face=Arial
size=2>within a device-path in a device-tree) is the same for
</FONT></SPAN><SPAN class=843513001-18102007><FONT face=Arial size=2>PCI-to-PCI
bridges with device_type property = pci.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=843513001-18102007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=843513001-18102007><FONT face=Arial
size=2>Well this does not seem to be the case on the SPARC system I am
using:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=843513001-18102007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=843513001-18102007><FONT face="Courier New"
size=2><A>/pci@1f,700000</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=843513001-18102007><FONT face=Arial
size=2>.properties</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=843513001-18102007><FONT face="Courier New"
size=2>available
81000000 00000000 00000700
00000000
<BR>
0000f900 82000000 00000000
00108000
<BR>
00000000 00078000 82000000
00000000
<BR>
00580000 00000000 bfa80000
82000000
<BR>
00000000 e0000000 00000000
00000000
<BR>reg
00000400 0ff00000 00000000
0000b000
<BR>
00000400 0fc10000 00000000
00007020
<BR>
000007f6 00000000 00000000
00000100
<BR>
00000400 0ff80000 00000000
00010000
<BR>ranges
00000000 00000000 00000000 000007f6 00000000 00000000
<BR>01000000
<BR>
01000000 00000000 00000000 000007f6 01000000 00000000
<BR>01000000
<BR>
02000000 00000000 00000000 000007f7 00000000 00000001
<BR>00000000
<BR>
03000000 00000000 00000000 000007f7 00000000 00000001
<BR>00000000
<BR>virtual-dma
c0 00 00 00 20 00 00 00 <BR>#virtual-dma-size-cells 00000001
<BR>#virtual-dma-addr-cells 00000001
<BR>no-streaming-cache
<BR>clock-frequency
03ef1480
<BR>bus-range
00 00 00 00 00 00 00 00 <BR>bus-parity-generated
<BR>no-probe-list
0<BR>compatible
pci108e,a801<BR>
pci108e,8001<BR>name
pci<BR>device_type
pci<BR>#address-cells
00000003
<BR>#size-cells
00000002
<BR>implementation#
00000023
<BR>version#
00000004
<BR>portid
0000001f
<BR>interrupt-map
00001000 00000000 00000000 00000001 f00684c8 0000001c
<BR>
00001800 00000000 00000000 00000001 f00684c8 00000014
<BR>
00001800 00000000 00000000 00000002 f00684c8 00000015
<BR>
00001800 00000000 00000000 00000003 f00684c8 00000016
<BR>
00001800 00000000 00000000 00000004 f00684c8 00000017
<BR>ino-bitmap
10 f0 00 00 00 1b 00 08
<BR>interrupt-map-mask 00fff800 00000000
00000000 00000007
<BR>#interrupt-cells 00000001
<BR>66mhz-capable
<BR>slot-names
00 00 00 08 50 43 49 34 00
<BR>interrupts
00000033
<BR>
00000030
<BR>
00000031
<BR>
00000034
<BR>
00000023</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=843513001-18102007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=843513001-18102007><FONT face=Arial
size=2>If I use the first phy-hi value from the reg property, and extract the
dev# and fun# as described in the OpenFirmware</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=843513001-18102007><FONT face=Arial
size=2>PCI Bus Binding, I get dev# = 0x00, fun# = 0x04.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=843513001-18102007><FONT face=Arial
size=2>So how does Sun get:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=843513001-18102007><FONT face=Arial
size=2>dev# = 0x1f</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=843513001-18102007><FONT face=Arial
size=2>fun# = 0x700000 [and valid fun#s range from 0 .. 7]</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=843513001-18102007><FONT face=Arial
size=2>Perhaps I am supposed to look at another property.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=843513001-18102007><FONT face=Arial
size=2>Does anyone know which one that would be?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=843513001-18102007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=843513001-18102007><FONT face=Arial
size=2>Thanks for any help on this!</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=843513001-18102007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=843513001-18102007><FONT face=Arial
size=2>-Asif</FONT></SPAN></DIV></BODY></HTML>