From: "Leif Lindholm" <leif.lindholm@linaro.org>
To: tzy.way.ooi@intel.com
Cc: devel@edk2.groups.io, Ard BieSheuvel <ard.biesheuvel@linaro.org>,
Michael D Kinney <michael.d.kinney@intel.com>,
Loh Tien Hock <tien.hock.loh@intel.com>
Subject: Re: [PATCH v6 edk2-platforms 1/1] Silicon/Synopsys/Designware/Driver: DwEmacSnpDxe: Add DesignWare EMAC driver
Date: Thu, 11 Jul 2019 17:43:16 +0100 [thread overview]
Message-ID: <20190711164316.o7cioscn55mv6bqi@bivouac.eciton.net> (raw)
In-Reply-To: <20190708070507.2493-1-tzy.way.ooi@intel.com>
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 <E2><80><98>EmacSetupTxdesc<E2><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 <E2><80><98>EmacSetupRxdesc<E2><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 <E2><80><98>SnpTransmit<E2><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 <E2><80><98>SnpReceive<E2><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 <tzy.way.ooi@intel.com>
>
> 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 <ard.biesheuvel@linaro.org>
> Cc: Leif Lindholm <leif.lindholm@linaro.org>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Loh Tien Hock <tien.hock.loh@intel.com>
>
> Contributed-under: Tianocore Contribution Agreement 1.1
> Signed-off-by: Ooi Tzy Way <tzy.way.ooi@intel.com>
>
> ---
> 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
next prev parent reply other threads:[~2019-07-11 16:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-08 7:05 [PATCH v6 edk2-platforms 1/1] Silicon/Synopsys/Designware/Driver: DwEmacSnpDxe: Add DesignWare EMAC driver Ooi, Tzy Way
2019-07-11 16:43 ` Leif Lindholm [this message]
2019-07-16 9:37 ` [edk2-devel] " Ooi, Tzy Way
2019-07-16 17:22 ` Leif Lindholm
2019-07-17 9:25 ` Ooi, Tzy Way
2019-07-17 11:44 ` Leif Lindholm
2019-07-19 6:41 ` Ooi, Tzy Way
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190711164316.o7cioscn55mv6bqi@bivouac.eciton.net \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox