On Fri, Jun 15, 2018 at 6:13 PM, Bin Meng <bmeng...@gmail.com> wrote: > On Thu, Jun 14, 2018 at 8:27 AM, Ivan Gorinov <ivan.gori...@intel.com> wrote: >> UEFI specifies the calling convention used in Microsoft compilers; >> first arguments of a function are passed in (%rcx, %rdx, %r8, %r9). >> >> All other compilers use System V ABI by default, passing first integer >> arguments of a function in (%rdi, %rsi, %rdx, %rcx, %r8, %r9). >> >> These ABI also specify different sets of registers that must be preserved >> across function calls (callee-saved). >> >> GCC allows using the Microsoft calling convention by adding the ms_abi >> attribute to a function declaration. >> >> Current EFI implementation in U-Boot specifies EFIAPI for efi_main() >> in the test apps but uses default calling convention in lib/efi. >> >> Save efi_main() arguments in the startup code on x86_64; >> use EFI calling convention for _relocate() on x86_64; >> consistently use EFI calling convention for efi_main() everywhere. >> >> Signed-off-by: Ivan Gorinov <ivan.gori...@intel.com> >> --- >> arch/x86/lib/crt0_x86_64_efi.S | 24 +++++++++++++----------- >> lib/efi/efi_app.c | 3 ++- >> lib/efi/efi_stub.c | 3 ++- >> 3 files changed, 17 insertions(+), 13 deletions(-) >> > > Reviewed-by: Bin Meng <bmeng...@gmail.com> > Tested-by: Bin Meng <bmeng...@gmail.com>
applied to u-boot-x86, thanks! _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot