patm / NATM system freeze with CPUTYPE?=opteron
hartmut.brandt at dlr.de
Tue May 22 09:38:41 UTC 2007
Clemens Zauner wrote:
> (For details, please see the posting in comp.unix.bsd.freebsd.misc
> Message-ID: <f29tq0$2g09$1 at geiz-ist-geil.priv.at> )
> Im facing complete system freezes when compiling the kernel with
> CPUTYPE?=opteron immediately *after* issuing an ifconfig on
> the patm0 - interface (trying to set an IP address).
> System is 6.2-p4; i386; kernconf nearly untampered (stuff like scsi,
> raid an the like => out, and the atm-stuff (NATM) <= in).
> Card is an ProSUM ProATM 155; idt77252 Rev. F; Suni/Lite (PMC-5346) PHY
> I guess the most of the gory details in my posting ar not of any
> interest - but one thing shows up in dmesg:
> patm0: <NICStAR (77222/77252) ATM adapter> port 0xe800-0xe8ff mem 0xfcfff000-
> 0xfcffffff,0xfac00000-0xfaffffff irq 16 at device 8.0 on pci2
> patm0: carrier detected
> patm0: ProATM 155 interface; idt77252 Rev. F; Suni/Lite (PMC-5346) PHY
> patm0: 512K x 32 SRAM; 16384 connections
> bus_dmamem_alloc failed to align memory properly.
> patm0: [GIANT-LOCKED]
> The "bus_dmamem_alloc" is somehow irritating me ...
It's already a couple of years ago that I wrote that driver, but the
problem, if I correctly remember, is that bus_dmamem_alloc does not
correctly align memory even if requrested by, I think, the busdma tag.
The patm hardware has certain alignment requirements for the memory
blocks. I found out, that I can enforce alignment to, for example, 2k by
allocating a multiple of 2k. So the code rounds up allocations that have
alignment requirements that are larger than the allocation itself.
Perhaps changes in the busdma code have made this mechanism to fail.
Unfortunately I have no time at the moment to look into this issue ...
More information about the freebsd-atm