[U-Boot] [PATCH v4 00/21] sandbox: efi_loader support

Alexander Graf agraf at suse.de
Thu Jun 21 09:47:27 UTC 2018


On 06/21/2018 04:44 AM, Simon Glass wrote:
> Hi Alex,
>
> On 18 June 2018 at 09:53, Alexander Graf <agraf at suse.de> 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



More information about the U-Boot mailing list