From owner-svn-src-head@freebsd.org Thu Jun 22 18:24:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24788D9217B; Thu, 22 Jun 2017 18:24:08 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DD0B233B; Thu, 22 Jun 2017 18:24:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::94ad:a84a:d0ed:3add] (unknown [IPv6:2001:470:7a58:0:94ad:a84a:d0ed:3add]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id D7277289B9; Thu, 22 Jun 2017 20:24:04 +0200 (CEST) From: Dimitry Andric Message-Id: <1F8C5886-71FC-486B-9793-E3554843CC65@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_F9E4D9B3-F150-45C1-9124-3C64DD10075B"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r320234 - head/sys/boot/efi/include Date: Thu, 22 Jun 2017 20:23:56 +0200 In-Reply-To: <201706221430.v5MEU9Zc063375@repo.freebsd.org> Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Ed Maste References: <201706221430.v5MEU9Zc063375@repo.freebsd.org> X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 18:24:08 -0000 --Apple-Mail=_F9E4D9B3-F150-45C1-9124-3C64DD10075B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 22 Jun 2017, at 16:30, Ed Maste wrote: >=20 > Author: emaste > Date: Thu Jun 22 14:30:09 2017 > New Revision: 320234 > URL: https://svnweb.freebsd.org/changeset/base/320234 >=20 > Log: > Make structure padding explicit in EFI_MEMORY_DESCRIPTOR >=20 > The EFI memory descriptor 64-bit aligns PhysicalStart on both 32- and > 64-bit platforms. Make the padding explicit for i386 EFI. >=20 > Submitted by: Siva Mahadevan = > MFC after: 3 weeks > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D11301 >=20 > Modified: > head/sys/boot/efi/include/efidef.h >=20 > Modified: head/sys/boot/efi/include/efidef.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/boot/efi/include/efidef.h Thu Jun 22 13:31:44 2017 = (r320233) > +++ head/sys/boot/efi/include/efidef.h Thu Jun 22 14:30:09 2017 = (r320234) > @@ -178,6 +178,7 @@ typedef enum { > #define EFI_MEMORY_DESCRIPTOR_VERSION 1 > typedef struct { > UINT32 Type; // Field size is = 32 bits followed by 32 bit pad > + UINT32 Pad; > EFI_PHYSICAL_ADDRESS PhysicalStart; // Field size is = 64 bits > EFI_VIRTUAL_ADDRESS VirtualStart; // Field size is = 64 bits > UINT64 NumberOfPages; // Field size is = 64 bits If you explicitly insert padding, it is better to mark the struct as __packed, I think. Or at least also specify the alignment explicitly. -Dimitry --Apple-Mail=_F9E4D9B3-F150-45C1-9124-3C64DD10075B Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.30 iEYEARECAAYFAllMC0cACgkQsF6jCi4glqOS7wCfQXRMqdBBwFKlGTT/gWqOmgZJ YD4AoPIB939JxyVWZv0uEV3EthQaTLbu =nvNU -----END PGP SIGNATURE----- --Apple-Mail=_F9E4D9B3-F150-45C1-9124-3C64DD10075B--