Re: [edk2] SmbiosDxe question?

Subject: Re: [edk2] SmbiosDxe question?

From: Andrew Fish <afish@apple.com>

To: "edk2-devel@lists.sourceforge.net" <edk2-devel@lists.sourceforge.net>

Date: 2011-08-12 05:46:23

Hot,

Thanks I did not know about the var arg issue, I understand the ABI differences and I would have guessed that as long as both sides use the same ABI it would work. I will say that when we ported clang to EFIABI var arg was the hardest part, so it could be just an implementation issue with mixing the two forms, since they are very different.

Sent from my iPad

On Aug 11, 2011, at 8:45 PM, "Tian, Hot"  wrote:

> Another rule specific for GCC is: we will need to specify EFIAPI for all functions that use Variable Argument lists
> Not sure whether GCC will fix this limitation in the future. Seems for SMBIOS case, it's not functions that use variable argument lists.
> 
> Thanks,
> Hot
> 
> -----Original Message-----
> From: Andrew Fish [mailto:afish@apple.com] 
> Sent: Friday, August 12, 2011 11:05 AM
> To: edk2-devel@lists.sourceforge.net
> Subject: Re: [edk2] SmbiosDxe question?
> 
> Yes it looks like EFIAPI is over specified. This will not cause any issue, but it is good to have examples of what is required. 
> 
> The basic rules for EFIAPI are:
> Driver/Application EntryPoint
> Protocol/PPI member functions
> Event Handlers. 
> Any function passed through an API
> and for the edk2 we also added EFIAPI to lots of library definitions to make it clear if they were implemented in assembly what calling convention they would follow. 
> 
> Thanks,
> 
> Andrew 
> 
> 
> On Aug 11, 2011, at 7:31 PM, Li, Elvin wrote:
> 
>> Hi Hot:
>>    Below is an example. It is only used in SmbiosDxe.c file.
>> 
>> EFI_STATUS
>> EFIAPI
>> GetSmbiosStructureSize (
>> IN   CONST EFI_SMBIOS_PROTOCOL        *This,
>> IN   EFI_SMBIOS_TABLE_HEADER          *Head,
>> OUT  UINTN                            *Size,
>> OUT  UINTN                            *NumberOfStrings
>> )
>> 
>> Thanks
>> Elvin
>> -----Original Message-----
>> From: Tian, Hot [mailto:hot.tian@intel.com] 
>> Sent: Friday, August 12, 2011 8:42 AM
>> To: edk2-devel@lists.sourceforge.net
>> Subject: Re: [edk2] SmbiosDxe question?
>> 
>> Do you have the sample of incorrect EFIAPI? I'm not sure whether it's for GCC44 support.
>> 
>> Thanks,
>> Hot
>> 
>> -----Original Message-----
>> From: Li, Elvin [mailto:elvin.li@intel.com] 
>> Sent: Friday, August 12, 2011 8:36 AM
>> To: edk2-devel@lists.sourceforge.net
>> Subject: Re: [edk2] SmbiosDxe question?
>> 
>> Hi Andrew:
>>    Thanks for finding this, I think we can clean these incorrect EFIAPI in SmbiosDxe driver. Could you help to fix it?
>> 
>> Regards
>> Elvin
>> 
>> -----Original Message-----
>> From: Andrew Fish [mailto:afish@apple.com] 
>> Sent: Thursday, August 11, 2011 12:16 PM
>> To: edk2-devel@lists.sourceforge.net
>> Subject: [edk2] SmbiosDxe question?
>> 
>> I noticed that the SmbiosDxe driver seems to over specify EFIAPI on internal functions? Is there a reason for this?
>> 
>> Thanks,
>> 
>> Andrew Fish
>> 
>> 
>> 
>> 
>> 
>> 
>> ------------------------------------------------------------------------------
>> Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
>> user administration capabilities and model configuration. Take 
>> the hassle out of deploying and managing Subversion and the 
>> tools developers use with it. 
>> http://p.sf.net/sfu/wandisco-dev2dev
>> _______________________________________________
>> edk2-devel mailing list
>> edk2-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>> 
>> ------------------------------------------------------------------------------
>> Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
>> user administration capabilities and model configuration. Take 
>> the hassle out of deploying and managing Subversion and the 
>> tools developers use with it. 
>> http://p.sf.net/sfu/wandisco-dev2dev
>> _______________________________________________
>> edk2-devel mailing list
>> edk2-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>> 
>> ------------------------------------------------------------------------------
>> Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
>> user administration capabilities and model configuration. Take 
>> the hassle out of deploying and managing Subversion and the 
>> tools developers use with it. 
>> http://p.sf.net/sfu/wandisco-dev2dev
>> _______________________________________________
>> edk2-devel mailing list
>> edk2-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>> 
>> ------------------------------------------------------------------------------
>> Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
>> user administration capabilities and model configuration. Take 
>> the hassle out of deploying and managing Subversion and the 
>> tools developers use with it. 
>> http://p.sf.net/sfu/wandisco-dev2dev
>> _______________________________________________
>> edk2-devel mailing list
>> edk2-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/edk2-devel
> 
> 
> ------------------------------------------------------------------------------
> Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
> user administration capabilities and model configuration. Take 
> the hassle out of deploying and managing Subversion and the 
> tools developers use with it. 
> http://p.sf.net/sfu/wandisco-dev2dev
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
> 
> ------------------------------------------------------------------------------
> Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
> user administration capabilities and model configuration. Take 
> the hassle out of deploying and managing Subversion and the 
> tools developers use with it. 
> http://p.sf.net/sfu/wandisco-dev2dev
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. 
http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel