From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 14 17:37:32 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0E01F08 for ; Sun, 14 Sep 2014 17:37:32 +0000 (UTC) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 902F2FC2 for ; Sun, 14 Sep 2014 17:37:32 +0000 (UTC) Received: from [192.168.200.200] (unknown [50.136.155.142]) (using SSLv3 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 4C03F1928A7; Sun, 14 Sep 2014 17:37:31 +0000 (UTC) Subject: Re: Resuming old EFI project From: Sean Bruno Reply-To: sbruno@freebsd.org To: Eric McCorkle In-Reply-To: <54159AC5.1010800@metricspace.net> References: <54159AC5.1010800@metricspace.net> Content-Type: text/plain; charset="us-ascii" Date: Sun, 14 Sep 2014 10:37:30 -0700 Message-ID: <1410716250.4174.3.camel@bruno> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: "freebsd-hackers@freebsd.org" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Sep 2014 17:37:32 -0000 On Sun, 2014-09-14 at 09:40 -0400, Eric McCorkle wrote: > Hello everyone, > > About two years ago, I was working on a project to try and finish the > EFI support for AMD64. Unfortunately, I had to abandon the project due > to family illness and a job search. At this point, I'm in a position to > pick that project back up as a side project (I also have better hardware > now ;) > > It seems everything in sys/boot/amd64/efi is pretty much unchanged. One > thing that's changed things quite a bit, though, is the switch to clang. > > When I was working on it before, there was a custom linker script that > got used to produce loader as a PE binary (EFI uses the PE format and > win32 ABI). However, that script seemed to produce bad offsets when > using clang. > > On the other hand, clang can cross-compile to the win32 ABI (by giving > it -target x86_64-unknown-win32). This does have some additional > advantages; win32 has slightly different conventions, and I remember > reading about an issue someone was having because of a stack alignment > issue when they were using a linker script solution. So the thing to do > might be to cross-compile loader and its dependencies (stand, ficl, if I > recall). The issue here is that you'd potentially be producing two sets > of libraries: one with the standard ABI and one with the win32 ABI. > Worth noting: there's supposedly a way to get clang to produce "object" > files that are actually LLVM bitcode; that could potentially avoid > generating two sets of object files. There's been quite a bit of work in this space and people are already booting their laptops and such from the UEFI enabled boot loader. What specifically are you looking to work on? sean https://wiki.freebsd.org/UEFI