[U-Boot] 2018.09-rc1 breakage on orangepi pc2

Mark Kettenis mark.kettenis at xs4all.nl
Thu Aug 2 22:07:51 UTC 2018


> Date: Thu, 2 Aug 2018 22:55:23 +0200 (CEST)
> From: Mark Kettenis <mark.kettenis at xs4all.nl>
> 
> I can no longer boot OpenBSD on the orangepi pc2.  The kernel faults
> somewhere in the EFI detection code, almost certainly where it looks
> through the configuration table entries looking for the ACPI table.
> I've bisected this resulting in:
> 
> 
> 4182a129ef735bfd6c54788affe1b649ab85b851 is the first bad commit
> commit 4182a129ef735bfd6c54788affe1b649ab85b851
> Author: Heinrich Schuchardt <xypron.glpk at gmx.de>
> Date:   Thu Jun 28 12:45:32 2018 +0200
> 
>     efi_loader: allocate configuration table array
>     
>     The system table contains a link to the list of configurations tables.
>     These include the device tree, SMBIOS table, and the ACPI table.
>     
>     This array is currently statically linked. With the patch it is allocated
>     as EFI_RUNTIME_SERVICES_DATA. Due to the structure of the system table we
>     cannot work with a linked list here.
>     
>     Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
>     Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
>     Signed-off-by: Alexander Graf <agraf at suse.de>

So after this commit, the ConfigurationTable field of the system table
is no longer translated from a physical address into a virtual address
when the SerVirtualAddressMap() runtime service gets called.

The way SetVirtualAddressMap() is implemented is actually quite nify.
It "relocates" the relevant bits by processing the ELF relocations for
everything that is marked as __efi_runtime_data.  This magically
modifies all the pointers in the system table that reference other
symbols, such as firmware_vendor, efi_runtime_services and
efi_conf_table.  But since the diff replaces the reference to
efi_conf_table with a dynamically updated pointer, there no longer is
a relocation for the tables member.

>From the commit message it isn't abvious what is being fixed.  I think
the commit should be reverted.


More information about the U-Boot mailing list