]> git.baikalelectronics.ru Git - uboot.git/commit
x86: Change __kernel_size_t conditionals to use compiler provided defines
authorBin Meng <bmeng.cn@gmail.com>
Fri, 22 Jun 2018 08:38:27 +0000 (01:38 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Sun, 24 Jun 2018 00:56:04 +0000 (08:56 +0800)
commit3c89f4ffdbc0ddc804b7fae251a57c52ced0934a
treef425583f067ddc31756da03742ae08b9ae63a692
parent1f1f6feeaeb11be36036ad365606df813a4e3dd3
x86: Change __kernel_size_t conditionals to use compiler provided defines

Since commit 36a5e526a5f2 ("efi_stub: Use efi_uintn_t"), EFI x86
64-bit payload does not work anymore. The call to GetMemoryMap()
in efi_stub.c fails with return code EFI_INVALID_PARAMETER. Since
the payload itself is still 32-bit U-Boot, efi_uintn_t gets wrongly
interpreted as int, but it should actually be long in a 64-bit EFI
environment.

This changes the x86 __kernel_size_t conditionals to use compiler
provided defines instead. That way we always adhere to the build
environment we're in and the definitions adjust automatically.

Fixes: 36a5e526a5f2 ("efi_stub: Use efi_uintn_t")
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/x86/include/asm/posix_types.h