From: Laszlo Ersek <lersek@redhat.com>
To: Jordan Justen <jordan.l.justen@intel.com>,
Anthony PERARD <anthony.perard@citrix.com>,
"Gao, Liming" <liming.gao@intel.com>,
"Zhu, Yonghong" <yonghong.zhu@intel.com>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: edk2-devel@ml01.01.org
Subject: Re: [PATCH 0/4] Fix runtime issue in XenBusDxe when compiled with GCC5
Date: Fri, 2 Dec 2016 10:45:38 +0100 [thread overview]
Message-ID: <721cf7cb-4c3e-ac75-4623-44c80690aa6b@redhat.com> (raw)
In-Reply-To: <148064028541.29053.2113052584622757913@jljusten-ivb>
On 12/02/16 01:58, Jordan Justen wrote:
> On 2016-12-01 12:54:34, Laszlo Ersek wrote:
>> On 12/01/16 21:06, Jordan Justen wrote:
>>> On 2016-12-01 10:43:24, Laszlo Ersek wrote:
>>>> Hrpmf, wait a second, I do see something interesting: in this series you
>>>> *are* modifying APIs declared in a library class header (namely
>>>> "OvmfPkg/Include/Library/XenHypercallLib.h"). Such functions (public
>>>> libraries) *are* required to specify EFIAPI.
>>>>
>>>> What happens if you apply patch #1 only?
>>>
>>> I agree that this should be fixed.
>>>
>>> But, if it works, I'm concerned that it would just be hiding a bug. My
>>> understanding was that the EFIAPI on libraries was needed so that a
>>> library implementation could be assembly based if desired. In this
>>> case C is used for the implementation, so the calling conventions
>>> should align.
>>
>> Never tried the following, so I'm unsure if edk2 intends to support it
>> explicitly, but what about binary-only library instances (the 2-clause
>> BSDL allows that)?
>
> Good point. Once again, I agree that it is a bug that needs to be
> fixed. The functions in the library interface should have EFIAPI.
>
> I was just pointing out that I don't think it *ought* be the issue
> here since both side are C, and being built by the same compiler.
Got it now. :)
Thanks!
Laszlo
> Like you mentioned ... maybe it is a compiler bug, or a bug with our
> build flags.
>
> -Jordan
>
>> If the library class header doesn't state EFIAPI on the functions, the
>> library vendor builds the library instance with Visual Studio, and the
>> library user builds the client module with gcc (against the same library
>> class header), calls will fail.
>>
>> (The way I imagine using binary-only library instances is that the
>> library comes as a binary object with a matching INF file, in a separate
>> subdirectory, and the user resolves the library class in his/her
>> platform DSC to that INF file. Not sure about the exact [section names]
>> in the library instance's INF file though.)
>>
>> Thanks!
>> Laszlo
next prev parent reply other threads:[~2016-12-02 9:45 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-01 15:28 [PATCH 0/4] Fix runtime issue in XenBusDxe when compiled with GCC5 Anthony PERARD
2016-12-01 15:28 ` [PATCH 1/4] OvmfPkg/XenHypercallLib: Add EFIAPI Anthony PERARD
2016-12-01 15:28 ` [PATCH 2/4] OvmfPkg/XenBusDxe: Add EFIAPI to XenEventChannelNotify Anthony PERARD
2016-12-01 15:28 ` [PATCH 3/4] OvmfPkg/XenBusDxe: Add EFIAPI to XenStore functions Anthony PERARD
2016-12-01 15:28 ` [PATCH 4/4] OvmfPkg/XenBusDxe: Add EFIAPI to XenGrantTable{Grant, End}Access Anthony PERARD
2016-12-01 18:43 ` [PATCH 0/4] Fix runtime issue in XenBusDxe when compiled with GCC5 Laszlo Ersek
2016-12-01 20:06 ` Jordan Justen
2016-12-01 20:54 ` Laszlo Ersek
2016-12-02 0:58 ` Jordan Justen
2016-12-02 9:45 ` Laszlo Ersek [this message]
2016-12-02 4:36 ` Gao, Liming
2016-12-02 10:00 ` Laszlo Ersek
2016-12-02 16:02 ` Anthony PERARD
2016-12-02 19:26 ` Laszlo Ersek
2016-12-03 17:59 ` Laszlo Ersek
2016-12-05 2:55 ` Gao, Liming
2016-12-05 10:09 ` Laszlo Ersek
2017-02-21 16:39 ` Anthony PERARD
2017-02-21 17:07 ` Laszlo Ersek
2017-02-21 17:53 ` Anthony PERARD
2017-02-21 19:02 ` Laszlo Ersek
2017-02-21 19:08 ` Rebecca Cran
2017-02-21 22:45 ` Jordan Justen
2017-02-21 23:59 ` Laszlo Ersek
2017-02-22 14:16 ` Gao, Liming
2017-02-22 8:54 ` Gao, Liming
2017-02-23 10:19 ` Laszlo Ersek
2017-02-23 12:43 ` Anthony PERARD
2017-02-23 13:00 ` Gao, Liming
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=721cf7cb-4c3e-ac75-4623-44c80690aa6b@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