Hi,

I previously reported that GCC46 (namely 4.6) has a bug with this conventions 
and should be used with the follow definition
DEFINE GCC46_X64_CC_FLAGS            = DEF(GCC45_X64_CC_FLAGS) 
-Wno-unused-but-set-variable -mabi=ms

Hope it helps,
Sergey

21.03.2013, в 20:23, Andrew Fish написал(а):

> Tomer,
> 
> It is a bug in your code. You need to use the correct function prototypes, 
> and you especially need to use EFIAPI correctly. 
> 
> This is bad:
> (EFI_AP_PROCEDURE)GetThread,
> 
> You need to make GetThead() have the proper prototype. 
> 
> For GCC 4.6 the generic calling convention is the Unix ABI for X64. This 
> means the 1st 6 args are passed in registers and the register sequence is 
> different than the 4 register used in EFIABI (Microsoft X64 ABI subset). GCC 
> only generates EFIABI if the function has the EFIABI qualifier in its 
> definition. 
> 
> So any indirect function call needs to have EFIABI. Thus any protocol member 
> function, pointer to function,  EFI Event function, and function passed via 
> an API needs to have the EFIABI qualifier. Also any assembly code C function 
> prototype needs to have EFIABI so it gets called correctly. 
> 
> Andrew Fish
> 
> 
> 
> 
> 
> On Mar 21, 2013, at 2:36 AM, "Shalev, Tomer" <tomer.sha...@intel.com> wrote:
> 
>> Hi There,
>>  
>> Calls to StartupThisAP() does not work as expected when I build my UEFI 
>> application from GCC 4.6 under Linux. If I build it under Windows using 
>> Visual Studio 2010, it works…
>>  
>> In GCC built application, The GetThread application receives a different 
>> value in its argument list than expected, according to what was passed to 
>> StartupThisAP(). I actually get 1, 4 and 5 for Ap's 1, 2 and 3, 
>> respectively, which might indicate that I get their APIC ID numbers.
>>  
>> I suspect there are other functionality that doesn't work as expected in 
>> such situation, such as Int86().
>>  
>> I would be thankful if you can help me with this.
>> Attached is a sample application that works when compiled in Windows but 
>> fails when compiled by GCC in Linux. Password is 12345678
>>  
>> Thanks,
>> Tomer
>>  
>>  
>> Tomer Shalev
>> Mobile: 054-2271307
>> Tel: 04-8656713 (Inet 8-465-6713)
>> Office: IDC6 4Y1 P4-2, SSG, Intel Inc.
>> E-mail: tomer.sha...@intel.com
>>  
>> <MpTestPkg.zip>
>> ---------------------------------------------------------------------
>> Intel Israel (74) Limited
>> 
>> This e-mail and any attachments may contain confidential material for
>> the sole use of the intended recipient(s). Any review or distribution
>> by others is strictly prohibited. If you are not the intended
>> recipient, please contact the sender and delete all copies.
>> 
>> ------------------------------------------------------------------------------
>> Everyone hates slow websites. So do we.
>> Make your web apps faster with AppDynamics
>> Download AppDynamics Lite for free today:
>> http://p.sf.net/sfu/appdyn_d2d_mar_______________________________________________
>> edk2-buildtools-devel mailing list
>> edk2-buildtools-de...@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/edk2-buildtools-devel
> 
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_mar_______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to