From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: tzy.way.ooi@intel.com) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by groups.io with SMTP; Tue, 16 Jul 2019 02:37:41 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Jul 2019 02:37:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,497,1557212400"; d="scan'208";a="178496888" Received: from kmsmsx154.gar.corp.intel.com ([172.21.73.14]) by orsmga002.jf.intel.com with ESMTP; 16 Jul 2019 02:37:39 -0700 Received: from pgsmsx109.gar.corp.intel.com ([169.254.14.91]) by KMSMSX154.gar.corp.intel.com ([169.254.12.76]) with mapi id 14.03.0439.000; Tue, 16 Jul 2019 17:37:38 +0800 From: "Ooi, Tzy Way" To: "devel@edk2.groups.io" , "leif.lindholm@linaro.org" CC: Ard BieSheuvel , "Kinney, Michael D" , "Loh, Tien Hock" Subject: Re: [edk2-devel] [PATCH v6 edk2-platforms 1/1] Silicon/Synopsys/Designware/Driver: DwEmacSnpDxe: Add DesignWare EMAC driver Thread-Topic: [edk2-devel] [PATCH v6 edk2-platforms 1/1] Silicon/Synopsys/Designware/Driver: DwEmacSnpDxe: Add DesignWare EMAC driver Thread-Index: AQHVNVuKD5Rtk2wLCkeu0fDmFzVf56bFHqYAgAfmojA= Date: Tue, 16 Jul 2019 09:37:38 +0000 Message-ID: <5F1105621EDF844291AF8B109E27C06D34D2E67E@PGSMSX109.gar.corp.intel.com> References: <20190708070507.2493-1-tzy.way.ooi@intel.com> <20190711164316.o7cioscn55mv6bqi@bivouac.eciton.net> In-Reply-To: <20190711164316.o7cioscn55mv6bqi@bivouac.eciton.net> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTFiNmI1ZmYtNTYxMi00YmRlLTkyMTktZTMzMDMwOWEwNTcxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiQ2pTZkY0TXk4TCthaG1jYjY3d3loSVhGY1wvdTNmeHE1emgxek1JMThFSW5paTl3ZmtldWdyNjRHQTdRR3VrUXcifQ== x-originating-ip: [172.30.20.205] MIME-Version: 1.0 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Leif, I am new to the compilation tools. May I know if you can share to me how t= o run the compilation with Debian's gcc 8.3 so that I can see the same warn= ing described below? Currently, I am using linaro toolchain 7.2.1 and follo= w the guide in the link below to compile the source code. https://github.com/tianocore/edk2-platforms I am not able to see any warning in the compilation messages. Wonder if I = need to enable something, for example some CFLAGS during compilation? Thank you in advance. Best regards, Tzy Way -----Original Message----- From: devel@edk2.groups.io On Behalf Of Leif Lindho= lm Sent: Friday, July 12, 2019 12:43 AM To: Ooi, Tzy Way Cc: devel@edk2.groups.io; Ard BieSheuvel ; Kinn= ey, Michael D ; Loh, Tien Hock Subject: Re: [edk2-devel] [PATCH v6 edk2-platforms 1/1] Silicon/Synopsys/D= esignware/Driver: DwEmacSnpDxe: Add DesignWare EMAC driver Hi Tzy Way, Nearly there, but please make sure BaseTools/Scripts/PatchCheck.py runs wi= thout warnings or errors (there are quite a few still in this version). Building the .dsc using current edk2 fails with 'MdeModulePkg/Library/DxeN= etLib/DxeNetLib.inf is not found in packages path' The path needs to be updated to NetworkPkg/Library/DxeNetLib/DxeNetLib.inf= . Secondly, could you add NOOPT as a BUILD_TARGET, in addition to DEBUG and = RELEASE? Also, Debian's gcc 8.3 throws a set of compilation errors (both DEBUG and = RELEASE) when building for AARCH64: /work/git/edk2-platforms/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/= EmacDxeUtil.c: In function <80><98>EmacSetupTxdesc<80><99>: /work/git/edk2-platforms/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/= EmacDxeUtil.c:236:81: error: iteration 9 invokes undefined behavior [-Werro= r=3Daggressive-loop-optimizations] TxDescriptor->AddrNext =3D (UINT32)(UINTN)EmacDriver->TxdescRingMap[I= ndex + 1].AddrMap; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~~~^~~~~~~~ /work/git/edk2-platforms/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/= EmacDxeUtil.c:233:3: note: within this loop for (Index =3D 0; Index < CONFIG_TX_DESCR_NUM; Index++) { ^~~ /work/git/edk2-platforms/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/= EmacDxeUtil.c: In function <80><98>EmacSetupRxdesc<80><99>: /work/git/edk2-platforms/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/= EmacDxeUtil.c:270:81: error: iteration 9 invokes undefined behavior [-Werro= r=3Daggressive-loop-optimizations] RxDescriptor->AddrNext =3D (UINT32)(UINTN)EmacDriver->RxdescRingMap[I= ndex + 1].AddrMap; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~~~^~~~~~~~ /work/git/edk2-platforms/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/= EmacDxeUtil.c:267:3: note: within this loop for (Index =3D 0; Index < CONFIG_RX_DESCR_NUM; Index++) { ^~~ cc1: all warnings being treated as errors It also throws the following errors when building for ARM: /work/git/edk2-platforms/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/= DwEmacSnpDxe.c: In function <80><98>SnpTransmit<80><99>: /work/git/edk2-platforms/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/= DwEmacSnpDxe.c:962:21: error: cast to pointer from integer of different siz= e [-Werror=3Dint-to-pointer-cast] TxDescriptorMap =3D (VOID *)Snp->MacDriver.TxdescRingMap[DescNum].AddrM= ap; ^ /work/git/edk2-platforms/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/= DwEmacSnpDxe.c:1026:51: error: cast from pointer to integer of different si= ze [-Werror=3Dpointer-to-int-cast] Snp->RecycledTxBuf[Snp->RecycledTxBufCount] =3D (UINT64) Data; ^ /work/git/edk2-platforms/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/= DwEmacSnpDxe.c: In function <80><98>SnpReceive<80><99>: /work/git/edk2-platforms/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/= DwEmacSnpDxe.c:1143:21: error: cast to pointer from integer of different si= ze [-Werror=3Dint-to-pointer-cast] RxDescriptorMap =3D (VOID *)Snp->MacDriver.RxdescRingMap[DescNum].AddrM= ap; ^ cc1: all warnings being treated as errors Could you please look into and address these issues for the next version? Best Regards, Leif On Mon, Jul 08, 2019 at 03:05:07PM +0800, tzy.way.ooi@intel.com wrote: > From: Ooi Tzy Way >=20 > Add driver support for the Ethernet MAC based on Synopsys DesignWare > 3504-0 Universal 10/100/1000 Ethernet MAC and KSZ9031 PHY >=20 > Cc: Ard BieSheuvel > Cc: Leif Lindholm > Cc: Michael D Kinney > Cc: Loh Tien Hock >=20 > Contributed-under: Tianocore Contribution Agreement 1.1 > Signed-off-by: Ooi Tzy Way >=20 > --- > v6: > - Update to recent version for EDK2 specific file formats > - Update the directory layout to Silicon/Synopsys/DesignWare > - Add a DesignWare.dsc for building this driver > - Update the license > - Update the .c file to declare its own include file > - Remove __ in defining the header file > - Fix indentation > - Delete commented-out code