Date: Sun, 27 Jun 2004 17:43:38 +0200 (CEST) From: Michael Kukat <michael@unixiron.org> To: ticso@cicely.de Cc: freebsd-alpha@freebsd.org Subject: Re: SRM not initialising cards behind a bridge Message-ID: <20040627171815.S42201@calchas.unixiron.org> In-Reply-To: <20040623101309.GD21460@cicely12.cicely.de> References: <20040622200019.M3751@calchas.unixiron.org> <20040622211832.A50035@ns><20040622204000.GC21460@cicely12.cicely.de> <20040623101309.GD21460@cicely12.cicely.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi ! On Wed, 23 Jun 2004, Bernd Walter wrote: > It's a bridge thing. > FreeBSD has special support to just handle non bridged card. > I don't know the current state with NetBSD, but AFAIK the code was > taken from NetBSD. Yep, i think, NetBSD would have the same trouble with PCI-PCI-bridges on Alpha. Just had a look into some sources :) Okay, i am currently playing around with another quadport NIC (ANA-6944), and i am encountering the problems as you said. And i'm currently trying to solve them. But with not too much success, as there is missing a lot of clue concerning PCI architecture. > Such tests require someone to swap cards, but if you could do a few tests > with bridged cards on this box that would be fine. First of all... it doesn't work in 4.9. Slots 4, 5, 7 behind the bridge are declared bogus, slot 6 is mapped to slot 6 on bus 0. This is because the intr_map in dec_2100_a50.c doesn't care about bridges. With a little dirty hack, i got it work a bit more. At least the first of the 4 NICs behind the bridge seems to work :) For the current state, here are the "strange" things i saw on this AlphaStation 200: >>>init *** keyboard not plugged in ... ff.fe.fd.fc.fb.fa.f9.f8.f7.f6.f5. ef.df.ee.Shared PIRQ0 in slot 3 Shared PIRQ2 in slot 3 ed.ec.f4.eb.ea.e9.e8.e7.e6.....e5. V7.0-9, built on Mar 18 1999 at 13:41:11 Slot 3 is the NIC, IRQs are shared here. Might be okay. show conf sees the NICs, but with bogus MAC addresses, as this is not really standard DECchip ethernet stuff: Bus 00 Slot 13: DECchip 21152 PCI to PCI Bridge Bus 01 Slot 04: Vendor: 1011 Device: 9 Bus 01 Slot 05: DECchip 21140 Network Controller ewb0.0.0.1005.0 80-20-13-00-00-00 Bus 01 Slot 06: DECchip 21140 Network Controller ewc0.0.0.1006.0 60-B6-13-00-00-00 Bus 01 Slot 07: DECchip 21140 Network Controller ewd0.0.0.1007.0 80-5C-14-00-00-00 For the hardware: IRQ 14 and 15 are the only interrupts which can be used for th 6944 in this configuration. My current modifications in the kernel source: @@ -164,12 +164,26 @@ u_int8_t pirqline; u_int32_t pirqreg; int pirq; - pcicfgregs *cfg; + pcicfgregs *cfg, *dcfg; pirq = 0; /* gcc -Wuninitialized XXX */ cfg = (pcicfgregs *)arg; /* + * If we don't live on bus 0, we are behind a bridge. Handle this. + */ + + dcfg = cfg; + if(dcfg->bus > 0) { + printf("secondary bus. getting parent\n"); + cfg = pci_devlist_get_parent(cfg); + if(cfg == NULL) { + cfg = dcfg; + printf("failed to get parent bus!\n"); + } + } + + /* * Slot->interrupt translation. Taken from NetBSD. */ @@ -253,5 +267,5 @@ if ((pirqline & 0x80) != 0) panic("bad pirqline %d",pirqline); pirqline &= 0xf; - cfg->intline = pirqline; + dcfg->intline = pirqline; } It's a hack. It just works for the first chip :) Is there anyone with more clue of all this PCI stuff to give me a hint how the routing is done ? There is some routing function for bridges in pci/pci.c, is this a way to map the pci pins somehow? I'll try this out in my setup i think. If dmesg helps, tell me. But with bootverbose it's quite long, so i stop here after quite a lot of text so far :) ...Michael -- http://www.unixiron.org/ Home Powered by: (Net|Open|Free)BSD IRIX NonStop-UX Solaris AIX HP-UX Tru64 MUNIX Ultrix VMS SINIX Dolphin_Unix OpenStep MacOS A/UX
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040627171815.S42201>