All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bin Meng <bmeng.cn@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 1/4] x86: use EFI calling convention for efi_main on x86_64
Date: Fri, 22 Jun 2018 09:44:38 +0800	[thread overview]
Message-ID: <CAEUhbmVFPMVQ8awRhKwVuSxHY9hJARchLH1XN0LiY53jX+qvEw@mail.gmail.com> (raw)
In-Reply-To: <CAEUhbmUFtegCv2F+yGTy5xqf=7T7Bd+vjNxdVPJdscPiYzfrtA@mail.gmail.com>

Hi Ivan,

On Wed, Jun 13, 2018 at 9:36 AM, Bin Meng <bmeng.cn@gmail.com> wrote:
> Hi Ivan,
>
> On Wed, Jun 13, 2018 at 1:52 AM, Ivan Gorinov <ivan.gorinov@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.
>> The arguments of efi_main() are also passed as unused arguments to the
>> _relocate() function.
>>
>> Save efi_main() arguments in the startup code on x86_64;
>> use EFI calling convention for _relocate() on x86_64;
>> remove unused _relocate() arguments;
>
> Thanks for working on this. But as I mentioned previously, the removal
> of _relocate() arguments should be in a separate patch. This patch
> should only deal with the calling convention changes.
>
> So we should have 4 patches:
> [1/4]: efi: calling convention changes for x86_64
> [2/4]: x86: remove unused _relocate() arguments
> [3/4]: arm: remove unused _relocate() arguments
> [4/4]: riscv: remove unused _relocate() arguments
>

So far I did not see you posted a newer version of patch series to
remove unused _relocate() arguments for x86/arm/riscv. Will you do
that?

>> consistently use EFI calling convention for efi_main() everywhere.
>>
>> Signed-off-by: Ivan Gorinov <ivan.gorinov@intel.com>
>> ---
>>  arch/x86/lib/crt0_x86_64_efi.S  | 21 ++++++++++-----------
>>  arch/x86/lib/reloc_x86_64_efi.c |  3 +--
>>  lib/efi/efi_app.c               |  3 ++-
>>  lib/efi/efi_stub.c              |  3 ++-
>>  4 files changed, 15 insertions(+), 15 deletions(-)
>>

Regards,
Bin

  reply	other threads:[~2018-06-22  1:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-12 17:51 [U-Boot] [PATCH v4 0/4] x86: use EFI calling convention for efi_main on x86_64 Ivan Gorinov
2018-06-12 17:52 ` [U-Boot] [PATCH v4 1/4] " Ivan Gorinov
2018-06-13  1:36   ` Bin Meng
2018-06-22  1:44     ` Bin Meng [this message]
2018-06-12 17:52 ` [U-Boot] [PATCH v4 2/4] arm: Remove unused _relocate arguments Ivan Gorinov
2018-06-13  1:38   ` Bin Meng
2018-06-12 17:52 ` [U-Boot] [PATCH v4 3/4] x86: " Ivan Gorinov
2018-06-12 17:52 ` [U-Boot] [PATCH v4 4/4] riscv: " Ivan Gorinov
2018-06-13  1:38   ` Bin Meng
2018-06-12 18:56 ` [U-Boot] [PATCH v4 0/4] x86: use EFI calling convention for efi_main on x86_64 Alexander Graf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEUhbmVFPMVQ8awRhKwVuSxHY9hJARchLH1XN0LiY53jX+qvEw@mail.gmail.com \
    --to=bmeng.cn@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.