From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Graf Date: Thu, 21 Jun 2018 11:47:27 +0200 Subject: [U-Boot] [PATCH v4 00/21] sandbox: efi_loader support In-Reply-To: References: <20180618152315.34233-1-agraf@suse.de> Message-ID: <27ba48be-c135-a022-9cb0-e4f2a9c1c590@suse.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 06/21/2018 04:44 AM, Simon Glass wrote: > Hi Alex, > > On 18 June 2018 at 09:53, Alexander Graf wrote: >> On 06/18/2018 05:22 PM, Alexander Graf wrote: >>> This patch set augments Simon's patch set for efi_loader support >>> in sandbox[1], but cuts off the memory allocation scheme at a different >>> point. >>> >>> According to the UEFI spec, efi_allocate_pages() takes a uint64_t * >>> argument. Via this argument, we get a physical address as input, but >>> emit a pointer as output. >>> >>> With this patch set in place, I can successfully run the selftest suite >>> as well as an aarch64 grub.efi binary. X86_64 grub.efi doesn't work >>> because that one requires inl instructions to work. >> >> I've assembled a quick grub.efi that does work in sandbox as it no longer >> accesses I/O ports directly. Patch for it is below. >> >> http://csgraf.de/tmp2/grub.efi >> >> When building your own, make sure to exclude coreboot (cb*) modules - they >> seem to do something dirty and segfault for me. The other modules seem to >> work fine for me so far. > OK thanks for that. The binary says this for me: > > efi_load_pe: Invalid DOS signature > > I'm running on x86_64. Are you using my patch set or yours? In mine this should be fixed. > I tried the patch below but it still crashes, presumably because of > the coreboot modules. How do I actually exclude them? I cannot see > anything in ./configure --help When you call grub-mkimage you explicitly pass a list of modules to include. In that list, just omit any module that starts with cb :) Alex