> This is not a bug. It indicates that some function declaration or prototype > is not using EFIAPI properly. Why should I build using non-ms ABI at all, if UEFI's ABI standart is MS-ABI?
I did not want to decorate all my functions with EFIAPI, thus I opted for forcing MS ABI globally. -Tomer -----Original Message----- From: Jordan Justen [mailto:jljus...@gmail.com] Sent: Sunday, April 21, 2013 10:23 PM To: edk2-devel@lists.sourceforge.net Subject: Re: [edk2] [edk2-buildtools] UEFI function is broken when compiled by GCC On Sun, Apr 21, 2013 at 4:04 AM, Shalev, Tomer <tomer.sha...@intel.com> wrote: > Ø 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 This is not a bug. It indicates that some function declaration or prototype is not using EFIAPI properly. So, basically it points out that there is a bug somewhere else in the source tree. Your CC_FLAGS change would just hide that other source code bug. -Jordan > I reported this too: http://sourceforge.net/apps/trac/edk2/ticket/590 > > > > From: Sergey Isakov [mailto:isakov...@bk.ru] > Sent: Friday, March 22, 2013 8:06 AM > To: edk2-devel@lists.sourceforge.net > Subject: Re: [edk2] [edk2-buildtools] UEFI function is broken when > compiled by GCC > > > > 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 > > > > > > > > <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 > > > > > --------------------------------------------------------------------- > 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. > > > ---------------------------------------------------------------------- > -------- Precog is a next-generation analytics platform capable of > advanced analytics on semi-structured data. The platform includes APIs > for building apps and a phenomenal toolset for data science. > Developers can use our toolset for easy data analysis & visualization. > Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/edk2-devel > ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel
smime.p7s
Description: S/MIME cryptographic signature
--------------------------------------------------------------------- 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.
------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel