[edk2-devel] [PATCH v1 5/6] UefiPayloadPkg: Add DISABLE_MMX_SSE to avoid generating floating points operation

Cheng-Chieh Huang via groups.io chengchieh=google.com at groups.io
Fri Jul 23 11:16:43 UTC 2021


I got what you mean by "Tools_def.txt doesn’t support build flag" now. I
thought the parser does support some sort of if/else condition, but it
seems to be not the case. Alternatively, we can do this during the copy
(from template to tools_def.txt), but everytime we need to recreate
tools_def.txt which is not ideal).

In that case, I think we should just roll back to only doing this in
UefiPayloadPkg.dsc. If other packs want to add these flags, they will need
to do it on their own.

On Fri, Jul 23, 2021 at 6:29 PM gaoliming <gaoliming at byosoft.com.cn> wrote:

> How do you add this support in tools_def? Can you give the proposal for it?
>
>
>
> Thanks
>
> Liming
>
> *发件人:* Cheng-Chieh Huang <chengchieh at google.com>
> *发送时间:* 2021年7月22日 10:35
> *收件人:* gaoliming <gaoliming at byosoft.com.cn>
> *抄送:* devel at edk2.groups.io; Kinney, Michael D <michael.d.kinney at intel.com>
> *主题:* Re: [edk2-devel] [PATCH v1 5/6] UefiPayloadPkg: Add DISABLE_MMX_SSE
> to avoid generating floating points operation
>
>
>
> I mean, I will submit a patch to support DISABLE_GCC_MMX_SSE in tools_def.
> What do you think?
>
>
>
> --
>
> Cheng-Chieh
>
>
>
> On Thu, Jul 22, 2021 at 9:28 AM gaoliming <gaoliming at byosoft.com.cn>
> wrote:
>
> Tools_def.txt doesn’t support build flag DISABLE_GCC_MMX_SSE. If this
> flag is moved into BaseTools\Conf\tools_def.template, -mno-mmx -mno-sse
> option will be the default GCC options. That means all platforms will apply
> them.
>
>
>
> Thanks
>
> Liming
>
> *发件人:* devel at edk2.groups.io <devel at edk2.groups.io> *代表 *Cheng-Chieh Huang
> via groups.io
> *发送时间:* 2021年7月22日 1:43
> *收件人:* Kinney, Michael D <michael.d.kinney at intel.com>
> *抄送:* devel at edk2.groups.io
> *主题:* Re: [edk2-devel] [PATCH v1 5/6] UefiPayloadPkg: Add DISABLE_MMX_SSE
> to avoid generating floating points operation
>
>
>
> Yes, we can. I will drop this patch for this  uefipayload batch and send
> another one for support DISABLE_GCC_MMX_SSE in tools_de.txt.
>
>
>
> --
>
> Cheng-Chieh
>
> On Thu, Jul 22, 2021, 12:35 AM Kinney, Michael D <
> michael.d.kinney at intel.com> wrote:
>
> Are those flags needed for all packages that build with GCC?
>
> Should this be moved into tools_def.txt?
>
> Mike
>
> > -----Original Message-----
> > From: devel at edk2.groups.io <devel at edk2.groups.io> On Behalf Of
> Cheng-Chieh Huang via groups.io
> > Sent: Wednesday, July 21, 2021 6:23 AM
> > To: devel at edk2.groups.io
> > Cc: Cheng-Chieh Huang <chengchieh at google.com>
> > Subject: [edk2-devel] [PATCH v1 5/6] UefiPayloadPkg: Add DISABLE_MMX_SSE
> to avoid generating floating points operation
> >
> > This will allow we compile payload using gcc8
> >
> > Signed-off-by: Cheng-Chieh Huang <chengchieh at google.com>
> > ---
> >  UefiPayloadPkg/UefiPayloadPkg.dsc | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc
> b/UefiPayloadPkg/UefiPayloadPkg.dsc
> > index 8aa5f18cd35c..fa41c5a24af5 100644
> > --- a/UefiPayloadPkg/UefiPayloadPkg.dsc
> > +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
> > @@ -30,6 +30,8 @@ [Defines]
> >    DEFINE PS2_KEYBOARD_ENABLE          = FALSE
> >    DEFINE UNIVERSAL_PAYLOAD            = FALSE
> >
> > +  DEFINE DISABLE_MMX_SSE              = FALSE
> > +
> >    #
> >    # SBL:      UEFI payload for Slim Bootloader
> >    # COREBOOT: UEFI payload for coreboot
> > @@ -96,6 +98,9 @@ [BuildOptions]
> >    *_*_*_CC_FLAGS                 = -D DISABLE_NEW_DEPRECATED_INTERFACES
> >  !if $(BOOTLOADER) == "LINUXBOOT"
> >    *_*_*_CC_FLAGS                 = -D LINUXBOOT_PAYLOAD
> > +!endif
> > +!if $(DISABLE_MMX_SSE)
> > +  *_*_*_CC_FLAGS                 = -mno-mmx -mno-sse
> >  !endif
> >    GCC:*_UNIXGCC_*_CC_FLAGS       = -DMDEPKG_NDEBUG
> >    GCC:RELEASE_*_*_CC_FLAGS       = -DMDEPKG_NDEBUG
> > --
> > 2.32.0.402.g57bb445576-goog
> >
> >
> >
> >
> >
>
> 
>
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#78135): https://edk2.groups.io/g/devel/message/78135
Mute This Topic: https://groups.io/mt/84401664/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/edk2-devel-archive/attachments/20210723/f45c3278/attachment.htm>


More information about the edk2-devel-archive mailing list