mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 13:11:31 +00:00
x86: Change __kernel_size_t conditionals to use compiler provided defines
Since commitbb0bb91cf0
("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:bb0bb91cf0
("efi_stub: Use efi_uintn_t") Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
0186644646
commit
5460fd0762
1 changed files with 2 additions and 1 deletions
|
@ -16,7 +16,8 @@ typedef int __kernel_pid_t;
|
|||
typedef unsigned short __kernel_ipc_pid_t;
|
||||
typedef unsigned short __kernel_uid_t;
|
||||
typedef unsigned short __kernel_gid_t;
|
||||
#if CONFIG_IS_ENABLED(X86_64)
|
||||
/* checking against __x86_64__ covers both 64-bit EFI stub and 64-bit U-Boot */
|
||||
#if defined(__x86_64__)
|
||||
typedef unsigned long __kernel_size_t;
|
||||
typedef long __kernel_ssize_t;
|
||||
#else
|
||||
|
|
Loading…
Add table
Reference in a new issue