From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=CPz1fnGk; spf=pass (domain: linaro.org, ip: 209.85.221.68, mailfrom: leif.lindholm@linaro.org) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by groups.io with SMTP; Tue, 16 Jul 2019 10:22:31 -0700 Received: by mail-wr1-f68.google.com with SMTP id 31so21866218wrm.1 for ; Tue, 16 Jul 2019 10:22:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=DFNpPy1BYQmYlevvf+WavKrbt2Og35ihWNJg0lo5BYQ=; b=CPz1fnGkbRU3Erb7C8AWMMCUIsD9pSsb1XhxAWqNKD2Q2fnyh+3yR0WPeXte+EPeM6 cMol1bQC07620JIbD0k9u31gpS0U/hZpK/mTR36aLdebGSr0bxa+vkWPKlNWQ7hteAiV Mrn6M3OA/i+fPHtNua9SqSIdOzncu9Qtj6ECGJ5RwBDJnoqo9yV4lLPQgMqGEl4NYAP3 c/q+ZIdsn50L1YXF13aCG5B4aiIrz1qnkIbMjWieLqRGXFb3+ez6/op4oghqQnc4i5Il D/V3ES3kgm3egLXFcTTk77ZTJHH4M6chXp62ocXBmOEFqeemrZyCFqJmstuNT/s0pH8y fozw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=DFNpPy1BYQmYlevvf+WavKrbt2Og35ihWNJg0lo5BYQ=; b=VMQtTwR924jfHPwreTGWzY/ntZvsBTSrZWE5bU1pJ5PmPRAqKcEbxifPSPfsFgOQHg d5hk1S0mzS44pzNk6UuNg0NOPjfCgIC0PeET5fACSpsy1r3HeZfZsQ+AzNnbK1IliQ6y cFGsF9hEfiHbPtsDWv48IlMP8ovJ3GHg6Rz1UQF3JtKWe4KkOUuJvdMLSBiHkCfXJim6 rJibrVCWrbNjZU8kbt7R7E/poiQpIiqp9ooz75vB+Ye+mBtWznVZOTjolN48LBeitV/V 9tKBfMZWGl3w271Bumx5bYQ2Sej0kQ+W7OhyzCSTkhz7xEaKGgjGsq+/rPjo6nfbfOzG q8Pw== X-Gm-Message-State: APjAAAWZ8TPaTHKCMJM7czbDHsKFHY0XcUSOaDJCLAsfSXcHOrHWS1lN VO03QCT3lRQquYUS9W/JcuFt3A== X-Google-Smtp-Source: APXvYqwlDNhZfBKDZtYl9J8MCpZ3V1wvAwN5GhEE+DQ2wBUnUjp+ciD/FPl83NN/ljRPqw/K7k6TgA== X-Received: by 2002:adf:e883:: with SMTP id d3mr38648873wrm.330.1563297749916; Tue, 16 Jul 2019 10:22:29 -0700 (PDT) Return-Path: Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id i66sm36055621wmi.11.2019.07.16.10.22.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Jul 2019 10:22:29 -0700 (PDT) Date: Tue, 16 Jul 2019 18:22:27 +0100 From: "Leif Lindholm" To: "Ooi, Tzy Way" Cc: "devel@edk2.groups.io" , 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 Message-ID: <20190716172227.wuczvla67izm7ccr@bivouac.eciton.net> References: <20190708070507.2493-1-tzy.way.ooi@intel.com> <20190711164316.o7cioscn55mv6bqi@bivouac.eciton.net> <5F1105621EDF844291AF8B109E27C06D34D2E67E@PGSMSX109.gar.corp.intel.com> MIME-Version: 1.0 In-Reply-To: <5F1105621EDF844291AF8B109E27C06D34D2E67E@PGSMSX109.gar.corp.intel.com> User-Agent: NeoMutt/20170113 (1.7.2) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Tzy Way, On Tue, Jul 16, 2019 at 09:37:38AM +0000, Ooi, Tzy Way wrote: > I am new to the compilation tools. May I know if you can share to me > how to run the compilation with Debian's gcc 8.3 so that I can see > the same warning described below? Currently, I am using linaro > toolchain 7.2.1 and follow 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? Yeah, the tools are getting stricter all the time - but we don't want to merge code we can't build with the toolchains included in current long-term supported Linux distributions. What does your setup look like today - are you on Windows or Linux? If Linux, can you use WSL? Cross compilation tools for both ARM and AARCH64 (and the very latest ones Ia32/X64) are available in several current Linux distributions (and hence in WSL). Best Regards, Leif > > Thank you in advance. > > Best regards, > Tzy Way > > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Leif Lindholm > Sent: Friday, July 12, 2019 12:43 AM > To: Ooi, Tzy Way > Cc: devel@edk2.groups.io; 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 > > Hi Tzy Way, > > Nearly there, but please make sure BaseTools/Scripts/PatchCheck.py runs without warnings or errors (there are quite a few still in this version). > > Building the .dsc using current edk2 fails with 'MdeModulePkg/Library/DxeNetLib/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 [-Werror=aggressive-loop-optimizations] > TxDescriptor->AddrNext = (UINT32)(UINTN)EmacDriver->TxdescRingMap[Index + 1].AddrMap; > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ > /work/git/edk2-platforms/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/EmacDxeUtil.c:233:3: note: within this loop > for (Index = 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 [-Werror=aggressive-loop-optimizations] > RxDescriptor->AddrNext = (UINT32)(UINTN)EmacDriver->RxdescRingMap[Index + 1].AddrMap; > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ > /work/git/edk2-platforms/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/EmacDxeUtil.c:267:3: note: within this loop > for (Index = 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 size [-Werror=int-to-pointer-cast] > TxDescriptorMap = (VOID *)Snp->MacDriver.TxdescRingMap[DescNum].AddrMap; > ^ > /work/git/edk2-platforms/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/DwEmacSnpDxe.c:1026:51: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] > Snp->RecycledTxBuf[Snp->RecycledTxBufCount] = (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 size [-Werror=int-to-pointer-cast] > RxDescriptorMap = (VOID *)Snp->MacDriver.RxdescRingMap[DescNum].AddrMap; > ^ > 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 > > > > Add driver support for the Ethernet MAC based on Synopsys DesignWare > > 3504-0 Universal 10/100/1000 Ethernet MAC and KSZ9031 PHY > > > > Cc: Ard BieSheuvel > > Cc: Leif Lindholm > > Cc: Michael D Kinney > > Cc: Loh Tien Hock > > > > Contributed-under: Tianocore Contribution Agreement 1.1 > > Signed-off-by: Ooi Tzy Way > > > > --- > > 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 > > >