Subject: Re: port-sparc64/15200: sparc64 savecore makes kernel panic at pciide_dma_init()
To: None <,>
From: Manuel Bouyer <>
List: netbsd-bugs
Date: 01/10/2002 17:55:05
On Thu, Jan 10, 2002 at 06:06:10PM +0200, Antti Kantee wrote:
> After having crashed once, the sparc64 fails to get back up because
> it cannot complete savecore:
> savecore: reboot after panic: panic: lockmgr: locking against myself
> savecore: system went down at Thu Jan 10 17:58:09 2002
> savecore: writing compressed core to /var/crash/netbsd.0.core.gz
> pciide_dma: segment 0 physical addr 0xc006d2b0 len 0xd2b0 not properly aligned

Hum, 0xc006d2b0+0xd2b0=0xC007A560, it crosses a 64k boundary, which is
not allowed by pciide hardware.

The DMA map was created with:
bus_dmamap_create(sc->sc_dmat, 0x00010000, 9, 0x00010000, 0x00010000,
    BUS_DMA_NOWAIT | BUS_DMA_ALLOCNOW,  &dma_maps->dmamap_xfer)

If I understood it properly, this should specify a 64k boundary, and
a data area crossing it should be split in 2 segments. If this is rigth,
then there is a problem with the sparc64 bus_dma implementation.

Here 0xc006d2b0 is not a physical address, but a DVMA address, so
bus_dma should not have allocated this address, but something like
0xc0070000. As I understand it extent_alloc() should have take care of it.

Manuel Bouyer, LIP6, Universite Paris VI.