From: Laszlo Ersek <lersek@redhat.com>
To: "Knop, Ryszard" <ryszard.knop@intel.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
Bill Paul <wpaul@windriver.com>,
Peter Wiehe <peter.wiehe2@gmail.com>
Subject: Re: edk2 and gnu-efi calling schemes
Date: Fri, 7 Dec 2018 15:09:43 +0100 [thread overview]
Message-ID: <8e3a189b-3452-cc00-8213-d73669129afc@redhat.com> (raw)
In-Reply-To: <01F0790E56F0534D8DCAD4AC5838792F618B22C4@irsmsx111.ger.corp.intel.com>
On 12/07/18 14:26, Knop, Ryszard wrote:
> Hi Laszlo,
> Regarding "functions that take variable arguments must be EFIAPI, even if they are STATIC (long story)" - what's the story? :)
If I remember correctly, the issue was that the VA_*() macros could not
be implemented on gcc -- or, on *all* supported gcc toolchains at the
same time, anyway -- such that they'd work in both non-EFIAPI and EFIAPI
functions. This held for both manual stack manipulation *and* gcc
builtins, in the macros -- the gcc builtins would not auto-adapt (at
compile time) to the actual calling convention of the containing function.
Therefore, the VA_*() macros had to make a one-time choice (between
being usable in EFIAPI vs. non-EFIAPI functions). Given that variable
arguments are taken by both some edk2 lib class APIs, and (more
importantly) some UEFI services (ex.
gBS->InstallMultipleProtocolInterfaces()), VA_*() were made to assume
EFIAPI in the containing function.
So, I guess, to be more precise, I should say "functions that take
variable arguments must be EFIAPI, as long as you want to use VA_*()
macros in them".
This is my recollection anyway.
Thanks
Laszlo
prev parent reply other threads:[~2018-12-07 14:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-06 22:34 edk2 and gnu-efi calling schemes Peter Wiehe
2018-12-06 22:46 ` Bill Paul
2018-12-07 13:06 ` Laszlo Ersek
2018-12-07 13:26 ` Knop, Ryszard
2018-12-07 14:09 ` Laszlo Ersek [this message]
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-list 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=8e3a189b-3452-cc00-8213-d73669129afc@redhat.com \
--to=devel@edk2.groups.io \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox