tech-kern archive

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

check & reprogram PCI BAR


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 
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.
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 ?


Home | Main Index | Thread Index | Old Index