From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 18 00:52:12 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D427A106566C for ; Mon, 18 Jun 2012 00:52:12 +0000 (UTC) (envelope-from eric@shadowsun.net) Received: from mail.atlantawebhost.com (dns1.atlantawebhost.com [66.223.40.39]) by mx1.freebsd.org (Postfix) with ESMTP id 6C2FC8FC08 for ; Mon, 18 Jun 2012 00:52:12 +0000 (UTC) Received: (qmail 21231 invoked from network); 17 Jun 2012 20:52:12 -0400 Received: from c-71-192-38-198.hsd1.ma.comcast.net (HELO Macintosh-21.local) (71.192.38.198) by mail.atlantawebhost.com with SMTP; 17 Jun 2012 20:52:11 -0400 Message-ID: <4FDE7BBB.7040704@shadowsun.net> Date: Sun, 17 Jun 2012 20:52:11 -0400 From: Eric McCorkle User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <4FDBBACF.9040809@shadowsun.net> <4FDE5E19.5050705@shadowsun.net> <2d9e0a80-658b-438f-90f0-1f510fb1cdd8@email.android.com> In-Reply-To: <2d9e0a80-658b-438f-90f0-1f510fb1cdd8@email.android.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: EFI development tools X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jun 2012 00:52:12 -0000 On 6/17/12 8:43 PM, Mike Meyer wrote: > Eric McCorkle wrote: > >> The -m32 flag seems to be the culprit; removing it fixes the problem. >> >> This is why I was having problems, as the offsets in EFI_SYSTEM_TABLE >> were wrong. >> >> In any case, this is a pretty serious error, and someone should try to >> reproduce it and take a look at it. > > This is a known issue, and had been around for a long time. You can't reliably build 32 bit binaries (what the -m32 flag specifies) on a 64 bit system. The header files (and possibly other things) are wrong. > > Doesn't look like anyone has opened a PR for it. > I just did. I'll keep that in mind, as I'm working on the 32-bit EFI implementation on a 64-bit machine. In the short term, I'll edit efibind.h (or wherever UINT64 is defined in the efi hierarchy) in my checkout and add a workaround. That should, in theory, hold.