[U-Boot] Uboot as x86_64 EFI payload
Bin Meng
bmeng.cn at gmail.com
Fri Jun 8 12:25:51 UTC 2018
Hi,
On Mon, Jan 29, 2018 at 11:18 PM, Juan Alfonso Reyes Ajenjo
<jareyes at gmv.com> wrote:
> Hi,
> I am Juan Alfonso Reyes, a firmware engineer in GMV. Currently we are developing new boards based in Apollo Lake CPU. We are trying to load uboot from UEFI. Using the default qemu-x86_efi_payload64_defconfig we are getting "U-Boot EFI Payload 2002 No memory map" error code.
> As I can see in the code 2002 means (efi_stub.c):
>
> ret = boot->get_memory_map(&size, NULL, &key, &desc_size, &version);
> if (ret != EFI_BUFFER_TOO_SMALL) {
> printhex2(BITS_PER_LONG);
> printhex2(ret);
> puts(" No memory map\n");
> while(1);
> return ret;
> }
>
> 0x20 -> BITS_PER_LONG 32bits
> 0x02 -> EFI_INVALID_PARAMETER
>
> 32bits sounds weird for me, so I changed config to use CONFIG_X86_RUN_64BIT instead of CONFIG_X86_RUN_32BIT. I have changed it and I got a compilation error:
>
> In file included from include/common.h:53:0,
> from cmd/efi.c:8:
> cmd/efi.c: In function 'do_efi_mem':
> ./arch/x86/include/asm/global_data.h:117:12: error: 'global_data_ptr' undeclared (first use in this function)
> #define gd global_data_ptr
>
>
> I have surfed in the code and I have found this in ./arch/x86/include/asm/global_data.h
>
> # if defined(CONFIG_EFI_APP) || CONFIG_IS_ENABLED(X86_64)
> /* TODO(sjg at chromium.org<mailto:sjg at chromium.org>): Consider using a fixed register for gd on x86_64 */
> #define gd global_data_ptr
>
> What do you mean with "Consider using a fixed register for gd" ?Can you help us to make this work? Are we in the correct direction?
>
The EFI 64-bit payload support is broken now. I will send a patch to
fix this soon.
Regards,
Bin
More information about the U-Boot
mailing list