Page MenuHomeFreeBSD

[PowerPC] Fix emulators/qemu40 cacheline detection on powerpc
ClosedPublic

Authored by bdragon on Jan 18 2020, 3:25 AM.

Details

Summary

This is qemu patch https://github.com/qemu/qemu/commit/5ca156cfde0f3821f15988619e51cf3cda99aaa6.patch

machdep.cacheline_size is an integer, not a long. Since PowerPC is
big-endian this causes sysctlbyname() to fill in the upper bits of the
argument, rather than the correct 'lower bits' of the word. Specify the
correct type to fix this.

Fixes
Assertion failed: ((isize & (isize - 1)) == 0), function init_cache_info, file util/cacheinfo.c, line 179.
Abort trap

when running qemu on FreeBSD powerpc.

Diff Detail

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

Event Timeline

bdragon created this revision.Jan 18 2020, 3:25 AM
linimon retitled this revision from [PowerPC] Fix qemu cacheline detection on powerpc to [PowerPC] Fix emulators/qemu40 cacheline detection on powerpc.Jan 19 2020, 9:09 AM
linimon added a reviewer: bofh.
bofh accepted this revision.Apr 27 2020, 8:19 PM
This revision is now accepted and ready to land.Apr 27 2020, 8:19 PM
pkubaj accepted this revision.Jun 4 2020, 4:07 PM