From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) by mx.groups.io with SMTP id smtpd.web12.6758.1627039018205733368 for ; Fri, 23 Jul 2021 04:16:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@google.com header.s=20161025 header.b=PS8h6A3u; spf=pass (domain: google.com, ip: 209.85.167.51, mailfrom: chengchieh@google.com) Received: by mail-lf1-f51.google.com with SMTP id f18so1439486lfu.10 for ; Fri, 23 Jul 2021 04:16:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EbnlqHzR2fEfojXaLCwH3H17JMpi1e5BhEnkDB1r+W0=; b=PS8h6A3uhVfMJdvuHX+J61PlB1ZxnDAGm2zQ4iZP6/Om8CoV0pNGDla9Hm8zzOF61O spWYCRaVArDJjffW+E/KR8tD/n2VVS3dPf/FXOKFwatiQTJEY0W38g+MEkyrHjc4WTyP rE1UV45SDIhtnKSxztSSMxytTau04NEXQB5y1iwtaYMqZXqgQHPZ5wI1NyAzlWYWPcfA wONp7HTuyG/emBeAP8dxKtncfSyVWtWl+/0IYui+zazjaPLDUP8uuSFP/d6rieU7wQwn TTnNKN9iFfOT7Qxluiu2iGM3ANmmraB6SVtA0dzNCRbUbhzspyc88Pj7UUJBV+Fk/KJI hfsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EbnlqHzR2fEfojXaLCwH3H17JMpi1e5BhEnkDB1r+W0=; b=e/SZ3Zc5EM+YFuXKMu6s15U2+/Z0swDNOqbqLhdMbZjWEbKu/ZbRimP2omtB/dyn4Z 41beGiiH213n8qrEHoI/cX8ZEXZTrSHDOklRqyYLlsPG3RLpQMC5ZIwG0Mv/tkQGOcaR acMlokXmKY5Y0yrSiBXfgPETdzb5f87vlBro3BaCZWH/fra6GA7vdT4AdinMnx5zz5aL +ECB6yK/44kQrAvwM1qqgD7e1fWoYim9Bcbt05a7UDCbYgrcUq9sH0xpsh6FgxfawQ4n 4n5d/t+9ijnZHskICQEOaApipaMPaFIgPb5DM6KyCbRmET9U8dEb+vk152tuZtisXGtj wiig== X-Gm-Message-State: AOAM530vWPQsE6tNrgp3FHmQZVrx4Htt7EyJpSf/exvC0fnswPkUU860 L8XJdQZoomPNCOudSZFPLpFiP0Oi5p4i62iSwei1hA== X-Google-Smtp-Source: ABdhPJy/TRp+vOZCCxVJAxAU+xldJWvXGvz9wkReUaj195MYHqD/Mq44K8qCi0lDX9pb6UkMVrcfzxcO8Kguka35mPo= X-Received: by 2002:a05:6512:3116:: with SMTP id n22mr2702006lfb.170.1627039015955; Fri, 23 Jul 2021 04:16:55 -0700 (PDT) MIME-Version: 1.0 References: <20210721132328.1415485-1-chengchieh@google.com> <20210721132328.1415485-6-chengchieh@google.com> <000301d77e98$e1c0d9c0$a5428d40$@byosoft.com.cn> <013201d77fad$8b3d7750$a1b865f0$@byosoft.com.cn> In-Reply-To: <013201d77fad$8b3d7750$a1b865f0$@byosoft.com.cn> From: Cheng-Chieh Huang Date: Fri, 23 Jul 2021 19:16:43 +0800 Message-ID: Subject: Re: [edk2-devel] [PATCH v1 5/6] UefiPayloadPkg: Add DISABLE_MMX_SSE to avoid generating floating points operation To: gaoliming Cc: devel@edk2.groups.io, "Kinney, Michael D" Content-Type: multipart/alternative; boundary="00000000000095cfe805c7c88a70" --00000000000095cfe805c7c88a70 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I got what you mean by "Tools_def.txt doesn=E2=80=99t support build flag" n= ow. 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 wrote= : > How do you add this support in tools_def? Can you give the proposal for = it? > > > > Thanks > > Liming > > *=E5=8F=91=E4=BB=B6=E4=BA=BA:* Cheng-Chieh Huang > *=E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4:* 2021=E5=B9=B47=E6=9C=8822=E6=97= =A5 10:35 > *=E6=94=B6=E4=BB=B6=E4=BA=BA:* gaoliming > *=E6=8A=84=E9=80=81:* devel@edk2.groups.io; Kinney, Michael D > *=E4=B8=BB=E9=A2=98:* Re: [edk2-devel] [PATCH v1 5/6] UefiPayloadPkg: Ad= d DISABLE_MMX_SSE > to avoid generating floating points operation > > > > I mean, I will submit a patch to support DISABLE_GCC_MMX_SSE in tools_de= f. > What do you think? > > > > -- > > Cheng-Chieh > > > > On Thu, Jul 22, 2021 at 9:28 AM gaoliming > wrote: > > Tools_def.txt doesn=E2=80=99t 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 ap= ply > them. > > > > Thanks > > Liming > > *=E5=8F=91=E4=BB=B6=E4=BA=BA:* devel@edk2.groups.io *=E4=BB=A3=E8=A1=A8 *Cheng-Chieh Huang > via groups.io > *=E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4:* 2021=E5=B9=B47=E6=9C=8822=E6=97= =A5 1:43 > *=E6=94=B6=E4=BB=B6=E4=BA=BA:* Kinney, Michael D > *=E6=8A=84=E9=80=81:* devel@edk2.groups.io > *=E4=B8=BB=E9=A2=98:* Re: [edk2-devel] [PATCH v1 5/6] UefiPayloadPkg: Ad= d 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@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@edk2.groups.io On Behalf Of > Cheng-Chieh Huang via groups.io > > Sent: Wednesday, July 21, 2021 6:23 AM > > To: devel@edk2.groups.io > > Cc: Cheng-Chieh Huang > > Subject: [edk2-devel] [PATCH v1 5/6] UefiPayloadPkg: Add DISABLE_MMX_S= SE > to avoid generating floating points operation > > > > This will allow we compile payload using gcc8 > > > > Signed-off-by: Cheng-Chieh Huang > > --- > > 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 =3D FALSE > > DEFINE UNIVERSAL_PAYLOAD =3D FALSE > > > > + DEFINE DISABLE_MMX_SSE =3D FALSE > > + > > # > > # SBL: UEFI payload for Slim Bootloader > > # COREBOOT: UEFI payload for coreboot > > @@ -96,6 +98,9 @@ [BuildOptions] > > *_*_*_CC_FLAGS =3D -D DISABLE_NEW_DEPRECATED_INTERF= ACES > > !if $(BOOTLOADER) =3D=3D "LINUXBOOT" > > *_*_*_CC_FLAGS =3D -D LINUXBOOT_PAYLOAD > > +!endif > > +!if $(DISABLE_MMX_SSE) > > + *_*_*_CC_FLAGS =3D -mno-mmx -mno-sse > > !endif > > GCC:*_UNIXGCC_*_CC_FLAGS =3D -DMDEPKG_NDEBUG > > GCC:RELEASE_*_*_CC_FLAGS =3D -DMDEPKG_NDEBUG > > -- > > 2.32.0.402.g57bb445576-goog > > > > > > > > > > > >=20 > > --00000000000095cfe805c7c88a70 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I got what you mean by "Tools_def.txt doesn=E2=80=99t= 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 ca= n do this during the copy (from template to tools_def.txt), but everytime w= e 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 UefiPayl= oadPkg.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@byosoft.com.cn> wrot= e:

How do you add this s= upport in tools_def? Can you give the proposal for it?=

=C2=A0

Thanks

Li= ming

=

=E5= =8F=91=E4=BB=B6=E4=BA=BA: Cheng-= Chieh Huang <= chengchieh@google.com>
=E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2021=E5=B9=B47=E6= =9C=8822=E6=97=A5 10:35=E6=94=B6=E4=BB=B6=E4=BA=BA: gaoliming <gaoliming@byosoft.com.cn>
=E6=8A=84= = =E9=80=81: devel@edk2.groups.io; K= inney, Michael D <michael.d.kinney@intel.com>
=E4=B8=BB=E9= =A2=98: Re: [edk2-dev= el] [PATCH v1 5/6] UefiPayloadPkg: Add DISABLE_MMX_SSE to avoid generating = floating points operation

=C2=A0

<= p class=3D"MsoNormal">I mean, I will submit a patch to= support DISABLE_GCC_MMX_SSE in tools_def. What do you think?=

=C2=A0

--

Cheng-Chieh

<= span lang=3D"EN-US">=C2=A0

On Thu, Jul 22, 2021 at 9:28 AM gaoliming <= ;gaoliming@by= osoft.com.cn> wrote:

Tools_def.txt doesn=E2=80=99t support build flag DISAB= LE_GCC_MMX_SSE. If this flag is moved into BaseTools\Conf\tools_def.templat= e, -mno-mmx -mno-sse option will be the default GCC options. That means all= platforms will apply them.

=C2=A0

Thanks

Liming

=E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io <devel@edk2.groups.io> =E4=BB=A3=E8=A1=A8 Che= ng-Chieh Huang via groups.io=
=E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2021=E5=B9=B47=E6=9C=8822=E6=97=A5 1:43
=E6=94=B6=E4= = =BB=B6=E4=BA=BA: Kinn= ey, Michael D <michael.d.kinney@intel.com>
=E6=8A=84=E9=80=81:
devel@edk2.groups.io
= =E4=B8=BB=E9=A2=98: R= e: [edk2-devel] [PATCH v1 5/6] UefiPayloadPkg: Add DISABLE_MMX_SSE to avoid= generating floating points operation=

=C2=A0

Yes, we can. I will drop this patch for this=C2=A0 uefipayload= batch and send another one for support DISABLE_GCC_MMX_SSE in tools_de.txt= .

=C2=A0

--

Cheng-Chieh=C2=A0

O= n Thu, Jul 22, 2021, 12:35 AM Kinney, Michael D <michael.d.kinney@intel.com>= wrote:

Are those flags needed for= all packages that build with GCC?

Should this be moved into tools_d= ef.txt?

Mike

> -----Original Message-----
> From: devel@edk2.groups.i= o <devel@e= dk2.groups.io> On Behalf Of Cheng-Chieh Huang via groups.io
> Sent: Wednesday, July 21= , 2021 6:23 AM
> To: devel@edk2.groups.io
> Cc: Cheng-Chieh Huang <chengchieh@google.c= om>
> 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@google.com>
> ---
>=C2=A0 UefiP= ayloadPkg/UefiPayloadPkg.dsc | 5 +++++
>=C2=A0 1 file changed, 5 inse= rtions(+)
>
> diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b= /UefiPayloadPkg/UefiPayloadPkg.dsc
> index 8aa5f18cd35c..fa41c5a24af5= 100644
> --- a/UefiPayloadPkg/UefiPayloadPkg.dsc
> +++ b/UefiP= ayloadPkg/UefiPayloadPkg.dsc
> @@ -30,6 +30,8 @@ [Defines]
>=C2= = =A0 =C2=A0 DEFINE PS2_KEYBOARD_ENABLE=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =3D FALSE
>=C2=A0 =C2=A0 DEFINE UNIVERSAL_PAYLOAD=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =3D FALSE
>
> +=C2=A0 DEFINE DISABLE= _MMX_SSE=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =3D FALSE
> = +
>=C2=A0 =C2=A0 #
>=C2=A0 =C2=A0 # SBL:=C2=A0 =C2=A0 =C2=A0 UE= FI payload for Slim Bootloader
>=C2=A0 =C2=A0 # COREBOOT: UEFI payloa= d for coreboot
> @@ -96,6 +98,9 @@ [BuildOptions]
>=C2=A0 =C2= =A0 *_*_*_CC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = = =C2=A0=3D -D DISABLE_NEW_DEPRECATED_INTERFACES
>=C2=A0 !if $(BOOTLOA= DER) =3D=3D "LINUXBOOT"
>=C2=A0 =C2=A0 *_*_*_CC_FLAGS=C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=3D -D LINUXBOOT_PA= YLOAD
> +!endif
> +!if $(DISABLE_MMX_SSE)
> +=C2=A0 *_*_*= _CC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=3D = -mno-mmx -mno-sse
>=C2=A0 !endif
>=C2=A0 =C2=A0 GCC:*_UNIXGCC_*= _CC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0=3D -DMDEPKG_NDEBUG
>=C2=A0 =C2= =A0 GCC:RELEASE_*_*_CC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0=3D -DMDEPKG_NDEBUG=
> --
> 2.32.0.402.g57bb445576-goog
>
>
> <= br>>
>

--00000000000095cfe805c7c88a70--