svn commit: r255439 - head/sys/dev/cpuctl
Konstantin Belousov
kostikbel at gmail.com
Tue Sep 10 15:10:04 UTC 2013
On Tue, Sep 10, 2013 at 07:29:51AM -0700, Matthew Fleming wrote:
> I don't know exactly what the stock malloc(9) will return, but memguard(9),
> under its default mode with vm.memguard.options having MG_GUARD_AROUND set
> will align the returned pointer to only 16 bytes. When I added that
> feature I almost made it 8 bytes, but I think I saw that uma(9) had a
> 16-byte alignment so I preserved that. I.e., this code does still work
> with malloc(9) and memguard(9).
>
> But why does this need 16 byte alignment? Especially when one of the
> comments says 4-byte alignment?
The comment about 4-byte alignment is for VIA.
For Intel, citing the IA-32 SDM rev. 47, Vol.3, 9.11.6 Microcode Update Loader:
"The microcode update data requires a 16-byte boundary alignment".
I.e. CPU takes the linear address of the buffer, which must be aligned
on 16 bytes.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20130910/748b6760/attachment.sig>
More information about the svn-src-head
mailing list