From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4H5W-0007oH-IT for qemu-devel@nongnu.org; Sun, 04 Mar 2012 14:27:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S4H5U-0003Qa-Om for qemu-devel@nongnu.org; Sun, 04 Mar 2012 14:27:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42877) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4H5U-0003QO-Fy for qemu-devel@nongnu.org; Sun, 04 Mar 2012 14:27:20 -0500 Date: Sun, 4 Mar 2012 21:27:17 +0200 From: "Michael S. Tsirkin" Message-ID: <20120304192717.GD16058@redhat.com> References: <4F535FD4.2000905@redhat.com> <4F5362FD.5060305@redhat.com> <20120304132225.GB12047@redhat.com> <20120304140853.GA12776@redhat.com> <20120304164044.GA15384@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] pci: fix bridge IO/BASE List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Mark Cave-Ayland , Avi Kivity , Anthony Liguori , qemu-devel@nongnu.org On Sun, Mar 04, 2012 at 05:49:04PM +0000, Blue Swirl wrote: > On Sun, Mar 4, 2012 at 16:42, Michael S. Tsirkin wrote= : > > On Sun, Mar 04, 2012 at 02:26:13PM +0000, Blue Swirl wrote: > >> > It seems to have to do with the host bridge. > >> > It's unusual to have host bridge present itself > >> > as a pci to pci bridge but there it is. > >> > >> It looks like the I/O base calculations in OpenBIOS are confused > > > > Where's the source for that, BTW? Have build instructions? >=20 > Under roms/openbios or www.openbios.org. You need xsltproc. > ../config/scripts/switch-arch sparc64 > make build-verbose > qemu-system-sparc64 -bios obj-sparc64/openbios-builtin.elf.nostrip I don't see anything obviously wrong in there, but the behaviour does seem to indicate some firmware bug ... I don't have the right toolchain - care debugging? > >> by > >> host bridge, after that all BARs are wrong. OpenBIOS also thinks tha= t > >> the host bridge is a device and attempts to configure six BARs inste= ad > >> of two. > > > > According to the spec it is a device, so should be ok? > > If I just make BAR4 writeable we get past the > > bios screen at least. > > Maybe openbios gets confused if a device has no BARs? > > Do things work for you with the patch below? > > All it does is make BAR4 writeable, accesses go nowhere. >=20 > Looking at serial console, there is no crash, but VGA still does not wo= rk. What do info pci/ifo mtree show now? > > > > > > diff --git a/hw/apb_pci.c b/hw/apb_pci.c > > index 1d25da8..fae841f 100644 > > --- a/hw/apb_pci.c > > +++ b/hw/apb_pci.c > > @@ -433,6 +433,7 @@ static int pbm_pci_host_init(PCIDevice *d) > > =A0 =A0 pci_set_word(d->config + PCI_STATUS, > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0PCI_STATUS_FAST_BACK | PCI_STATUS_= 66MHZ | > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0PCI_STATUS_DEVSEL_MEDIUM); > > + =A0 =A0pci_set_long(d->wmask + 0x20, 0xfffffff0); > > =A0 =A0 return 0; > > =A0} > > > > @@ -444,7 +445,6 @@ static void pbm_pci_host_class_init(ObjectClass *= klass, void *data) > > =A0 =A0 k->vendor_id =3D PCI_VENDOR_ID_SUN; > > =A0 =A0 k->device_id =3D PCI_DEVICE_ID_SUN_SABRE; > > =A0 =A0 k->class_id =3D PCI_CLASS_BRIDGE_HOST; > > - =A0 =A0k->is_bridge =3D 1; > > =A0} > > > > =A0static TypeInfo pbm_pci_host_info =3D { > > -- > > MST