From owner-acpi-jp@jp.FreeBSD.org Thu Oct  3 03:15:01 2002
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) id g92IF1N43813;
	Thu, 3 Oct 2002 03:15:01 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from mail-out1.apple.com (mail-out1.apple.com [17.254.0.52])
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) with ESMTP/inet id g92IF0343759
	for <acpi-jp@jp.freebsd.org>; Thu, 3 Oct 2002 03:15:00 +0900 (JST)
	(envelope-from msmith@freebsd.org)
Received: from mailgate1.apple.com (A17-128-100-225.apple.com [17.128.100.225])
	by mail-out1.apple.com (8.11.3/8.11.3) with ESMTP id g92IEwi22894
	for <acpi-jp@jp.freebsd.org>; Wed, 2 Oct 2002 11:14:58 -0700 (PDT)
Received: from scv1.apple.com (scv1.apple.com) by mailgate1.apple.com
 (Content Technologies SMTPRS 4.2.5) with ESMTP id <T5db13971a6118064e13d8@mailgate1.apple.com>;
 Wed, 2 Oct 2002 11:14:50 -0700
Received: from freebsd.org (vpn-scv-x3-66.apple.com [17.219.194.66])
	by scv1.apple.com (8.11.3/8.11.3) with ESMTP id g92IEpb16756;
	Wed, 2 Oct 2002 11:14:51 -0700 (PDT)
Content-Type: text/plain; charset=US-ASCII; format=flowed
Mime-Version: 1.0 (Apple Message framework v546)
Cc: jhb@freebsd.org
To: acpi-jp@jp.FreeBSD.org
From: Michael Smith <msmith@freebsd.org>
In-Reply-To: <20021002.112658.34590391.iwasaki@jp.FreeBSD.org>
Message-Id: <D7A97FD0-D632-11D6-B0AE-0050E4660701@freebsd.org>
Content-Transfer-Encoding: 7bit
X-Mailer: Apple Mail (2.546)
Reply-To: acpi-jp@jp.FreeBSD.org
Precedence: list
Date: Wed, 2 Oct 2002 11:14:50 -0700
X-Sequence: acpi-jp 1866
Subject: [acpi-jp 1866] Re: probing Host PCI bridge
Errors-To: owner-acpi-jp@jp.FreeBSD.org
Sender: owner-acpi-jp@jp.FreeBSD.org
X-Originator: msmith@freebsd.org
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+020902


In this case, you need to look at _ADR.  It's bogus that they supply 
_BBN and it's wrong; it looks like their _ADR results may also be evil 
based on the initial value of \DATA.ADR1 but that's the next place to 
start.

It's also possible that they abuse _ADR to tell you where in config 
space the bridge's registers are, in which case you'd then have to read 
the bus number out of it directly.

  = Mike

On Tuesday, October 1, 2002, at 07:26 PM, Mitsuru IWASAKI wrote:

>>> Well, my questions;
>>> 1. Is it possible to attach Host PCI bridges bus even all _BBN 0 
>>> case?
>>>    Maybe bus number need to be adjusted if it duplicated, but I think
>>>    still problems in AcpiEvPciConfigRegionSetup() of ACPI CA.
>>> 2. In legacy way, is it possible to detect all Host PCI bridges?
>>>    Linux can do this so I believe that FreeBSD also can :)
>>
>> Well, you can look at the sys/i386/pci/pci_bus.c.  That is where we
>> find host-pci bridges by futzing around with bus 0.  It may be that
>> we just don't recognize the device id's of the other host bridges?
>>
>> Hmm.  Can you provide pciconf -l of this machine?  That together with
>> the ASL might be enough to determine if nexus_pcib can be fixed.
>
> Ah, I think I understood now.
> # nexus_pcib_is_host_bridge() right?
> OK, pciconf -vl output attached.
>
> Thanks
>
> hostb0@pci0:0:0:	class=0x060000 card=0x00000000 chip=0x00171166 
> rev=0x01 hdr=0x00
>     vendor   = 'Reliance Computer Corp./ServerWorks'
>     class    = bridge
>     subclass = HOST-PCI
> hostb1@pci0:0:1:	class=0x060000 card=0x00000000 chip=0x00171166 
> rev=0x00 hdr=0x00
>     vendor   = 'Reliance Computer Corp./ServerWorks'
>     class    = bridge
>     subclass = HOST-PCI
> bge0@pci0:6:0:	class=0x020000 card=0x800914e4 chip=0x16a614e4 rev=0x02 
> hdr=0x00
>     vendor   = 'Broadcom Corporation'
>     device   = 'BCM5702X Gigabit Ethernet'
>     class    = network
>     subclass = ethernet
> none0@pci0:12:0:	class=0x030000 card=0x80081002 chip=0x47521002 
> rev=0x27 hdr=0x00
>     vendor   = 'ATI Technologies'
>     device   = 'Rage XL PCI'
>     class    = display
>     subclass = VGA
> isab0@pci0:15:0:	class=0x060100 card=0x02011166 chip=0x02011166 
> rev=0x93 hdr=0x00
>     vendor   = 'Reliance Computer Corp./ServerWorks'
>     device   = 'CSB5 PCI to ISA Bridge'
>     class    = bridge
>     subclass = PCI-ISA
> atapci0@pci0:15:1:	class=0x01018a card=0x02201166 chip=0x02121166 
> rev=0x93 hdr=0x00
>     vendor   = 'Reliance Computer Corp./ServerWorks'
>     device   = 'CSB5 PCI EIDE Controller'
>     class    = mass storage
>     subclass = ATA
> ohci0@pci0:15:2:	class=0x0c0310 card=0x02201166 chip=0x02201166 
> rev=0x05 hdr=0x00
>     vendor   = 'Reliance Computer Corp./ServerWorks'
>     device   = 'OSB4 OpenHCI Compliant USB Controller'
>     class    = serial bus
>     subclass = USB
> hostb2@pci0:15:3:	class=0x060000 card=0x02301166 chip=0x02251166 
> rev=0x00 hdr=0x00
>     vendor   = 'Reliance Computer Corp./ServerWorks'
>     device   = 'CSB5 PCI Bridge'
>     class    = bridge
>     subclass = HOST-PCI
> hostb3@pci0:16:0:	class=0x060000 card=0x00000000 chip=0x01011166 
> rev=0x03 hdr=0x00
>     vendor   = 'Reliance Computer Corp./ServerWorks'
>     class    = bridge
>     subclass = HOST-PCI
> hostb4@pci0:16:2:	class=0x060000 card=0x00000000 chip=0x01011166 
> rev=0x03 hdr=0x00
>     vendor   = 'Reliance Computer Corp./ServerWorks'
>     class    = bridge
>     subclass = HOST-PCI
> atapci1@pci2:4:0:	class=0x010485 card=0x1275105a chip=0x7275105a 
> rev=0x01 hdr=0x00
>     vendor   = 'Promise Technology'
>     device   = 'PDC20277 FastTrak TX/SBFastTrak133 Lite EIDE 
> Controller'
>     class    = mass storage
>     subclass = RAID
> bge1@pci2:5:0:	class=0x020000 card=0x800914e4 chip=0x16a614e4 rev=0x02 
> hdr=0x00
>     vendor   = 'Broadcom Corporation'
>     device   = 'BCM5702X Gigabit Ethernet'
>     class    = network
>     subclass = ethernet
>

