Malloc alignment in libstand / loader(8)

Ian Lepore ian at FreeBSD.org
Wed Feb 5 04:55:40 UTC 2014


On newer ARM chips, the device drivers used by loader(8) require that
I/O buffers be aligned on cache line sized boundaries.  The drivers are
part of u-boot which serves as a sort of load-time bios.

Attached is a patch that sets the malloc alignment in libstand to 64
bytes when compiled on ARM, and leaves it at 16 bytes for all other
platforms.  If there are no objections I'd like to commit this soon.

I've tested this on ARM, but have no way to test it on other platforms.
The changes should be a no-op on other platforms.

-- Ian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: libstand_mallocalign.diff
Type: text/x-patch
Size: 3023 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20140204/7f2520bf/attachment.bin>


More information about the freebsd-arch mailing list