Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Sep 2013 18:09:54 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Matthew Fleming <mdf@FreeBSD.org>
Cc:        "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>
Subject:   Re: svn commit: r255439 - head/sys/dev/cpuctl
Message-ID:  <20130910150954.GW41229@kib.kiev.ua>
In-Reply-To: <CAMBSHm89omtP=G6eHCHbx%2BXOxHKSgEB4qFBpYvE7=7CAriQfvg@mail.gmail.com>
References:  <201309100517.r8A5HrHY020358@svn.freebsd.org> <CAMBSHm89omtP=G6eHCHbx%2BXOxHKSgEB4qFBpYvE7=7CAriQfvg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--ben6AifVmj+t9BPa
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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).
>=20
> 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 Loa=
der:
"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.

--ben6AifVmj+t9BPa
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.21 (FreeBSD)

iQIcBAEBAgAGBQJSLzZCAAoJEJDCuSvBvK1ByxcP/RZscqNhXWdzAITJdE9T/6k2
T4nsl05pp29JLRFxOadu/q6aLLLM6ICKvmL4NdFGREw/tuZM63+Fnon2TAQkzZqw
JZBF8vRaF2ohtUIL+lXCj6rxCyHMrmwopvTT6NrBTiMeacHd1t6OotERyuDMDjNS
mND1QxoDfK/WpHPaf+KMjFz6a7MvXQvz0UF3d3eSqtXBOtDN+35mKdStB2814lJt
oOkIgLf9Vy2UYtJ/wUVGyoXs8sVVHtEwjPwGioJ/xruAwzY5w6dkdN3wWSN3WcVe
r+DcnHjPpAf7ee7AGcfjSubiU9+rk7Jj1Ft8MXVFlFEVLU0BsQgylHdyxKQrXPe1
S1S4/hEdnJUP23X8Sf+R0KpcKcFRVxRMBUFdTrK3Fkz+s/afSyCYL7OJ+X403S+d
2wFCa5YxzY4hfjffgcE3YCDHvHlYa/LNeTpoV3+oZ6Re55sdMOMW3l6x9URf0qwX
5XtC7+2WtcnSA7t/V+VkbYmEYK6r+zBc61DwzuL31I2GvVyt6/+5jL75nS25zgzR
n9jY3ztHMIZEBItwbNn6zqskg9lb8qxAwC8wlPDPYnuPmzSXrc5WqE6Q+AGZEQ6d
2TE+GDNwJHw0SxpFfBq6cbYAakLPKDD1hIOjtvqreLWabr8p9bClvoc7OKO7Gp06
c7TO0taxvkmRr7R6uHkV
=8wqz
-----END PGP SIGNATURE-----

--ben6AifVmj+t9BPa--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130910150954.GW41229>