Page MenuHomeFreeBSD

mips busdma: bzero map on alloc
ClosedPublic

Authored by rlibby on Tue, Dec 3, 6:55 AM.

Details

Summary

Maps from the mips busdma dmamap_zone were not completely initialized.
In particular, pagesneeded and pagesreserved were not initialized. This
could cause a crash.

Remove some dead fields from mips struct bus_dmamap while here.

Reported by: brooks

Test Plan

make CROSS_TOOLCHAIN=mips64-gcc TARGET_ARCH=mips64 buildkernel KERNCONF=MALTA64
qemu-system-mips64 -M malta -kernel .../mips.mips64/sys/MALTA64/kernel -m 2048 -nographic

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

rlibby created this revision.Tue, Dec 3, 6:55 AM
ian accepted this revision.Tue, Dec 3, 4:13 PM

Heh, looks like when this code was copied to mips, someone ignored my comment

It'll need platform-specific changes if this code is copied.
This revision is now accepted and ready to land.Tue, Dec 3, 4:13 PM
This revision was automatically updated to reflect the committed changes.