tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: check & reprogram PCI BAR



> On Tue, Jan 19, 2010 at 11:59:24AM +0100, Christoph Egger wrote:
> > 
> > Hi!
> > 
> > I have a bge(4) the BIOS programs its PCI BAR0 to 184TB
> > which leads to the following panic at boot:
> > 
> > 
> > bge0 at pci8 dev 4 function 0: Broadcom BCM5714/5715 Gigabit Ethernet
> > extent_alloc_region: extent `iomem' (0x0 - 0xffffffff)
> > extent_alloc_region: start 0xf3ed988fd8410000, end 0xf3ed988fd841ffff
> > panic: extent_alloc_region: region lies outside extent
> > fatal breakpoint trap in supervisor mode
> > trap type 1 code 0 rip ffffffff801fd13d cs e030 rflags 246 cr2  0 cpl 8
> rsp ffffffff80eb2070
> > Stopped in pid 0.1 (system) at  netbsd:breakpoint+0x5:  leave
> > breakpoint() at netbsd:breakpoint+0x5
> > panic() at netbsd:panic+0x26e
> > extent_alloc_region() at netbsd:extent_alloc_region+0x91
> > bus_space_map() at netbsd:bus_space_map+0x52
> > pci_mapreg_submap() at netbsd:pci_mapreg_submap+0xe6
> > pci_mapreg_map() at netbsd:pci_mapreg_map+0x2e
> > bge_attach() at netbsd:bge_attach+0x181
> > [...]
> > 
> > 
> > Hence I think, we need to check the PCI BARs if they are
> > within the range of DMA-safe memory.
> 
> Why do you think it should be in DMA-safe memory ?
> If it's a 64bit PCI BAR then there's no problems having it
> mapped anywhere in physical memory (AFAIK).
> To me, the problem looks more like in x86 bus_space(9) which
> doesn't handle 64bit BAR very well.

Please describe the 64bit BAR problem with x86 bus_space(9).
 
> > If they are not then reprogram the PCI BARs properly.
> > 
> > I would like to get some ideas how this should be done
> > in NetBSD. Any ideas ?
> 
> Look at the *FIXUP options.

How does the PCI_ADDR_FIXUP exactly work?
Why are the *FIXUP options disabled by default in x86 kernels?

Christoph


Home | Main Index | Thread Index | Old Index