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=IcgFqzVT; spf=pass (domain: linaro.org, ip: 209.85.221.67, mailfrom: leif.lindholm@linaro.org) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by groups.io with SMTP; Thu, 11 Jul 2019 09:43:20 -0700 Received: by mail-wr1-f67.google.com with SMTP id x4so7026186wrt.6 for ; Thu, 11 Jul 2019 09:43:19 -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=wTrXzdhP2vvbuPQ6j+dQ5GnAnEiDgpIx1Jrqf0+aP3k=; b=IcgFqzVTQqGFc4nQwDMidL4cAiZKVNR+1kMYQSI0x/Qa137Rdz90obqgF4GjbYwb1Z pbU7ms7pUKbMSm5ndTh1WIskhu8oCJ+pYMv3rVqZkKbVofbfTpsVBsEgXW48e88PoGzl UQP2IBk+BsRjXhPNKgXluYo8uKUUeLYSdqFSyNS0UlN8ftvu8opc9cTN3ESvw09ZITwD truFVp/KOlnNUmFGmNEwFOHaATiRr6w+GedL5I3mgVmrbJPFa/85ZJols9GlxQESx77F +N6yiAFEZ0bGeLgHYKt+W2oIzBfOHeXMiSvSdTLq/iRHBM0IQnFSVtukgdTn/7/LAihe +e2A== 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=wTrXzdhP2vvbuPQ6j+dQ5GnAnEiDgpIx1Jrqf0+aP3k=; b=hxGZYrNtDGNzSvo2uxH86bldyizf7M7GpTAGSbZHDetECNJMNq1xynPxqcPVbzI3jE jXFzi+mbGBe0yYGszQ/WeY25slO5jEF7khquSEUC82dskgOpTKXtID3Ol1Rg00GWAyVu ket51ZUHnDKN/guuviZw/geRC8yUBEHqNJCvxo6nlIlYoAl2d1l26nbiQJW4+R4jOZwI PhpnJUARlKiLdGETiyE5SfEhmTTWDxFmw9pXINLorfDJHIB1vKi/ZTKwOwOMatbMxase 8bZ8ehmAGkZtQqwELwrdfkyedHLTter772zJ83kgxOr7hfY8mHLkyMB4acHUuj5IA6nx EC6Q== X-Gm-Message-State: APjAAAWDfhFv6KyzquakNafvb6bvclITJSIry6JkXqdMBwtKiXk6lNCy KOi7ZoWPhWQ3HKMrH+9nBqgwkQ== X-Google-Smtp-Source: APXvYqzgXZIlZfm2q2HbRpHseVjn7fYtSj9s95lCk2lnrEy/6mQTO2mi8FloroJmAZlExMVLL2MR1A== X-Received: by 2002:adf:de10:: with SMTP id b16mr5915187wrm.296.1562863398509; Thu, 11 Jul 2019 09:43:18 -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 u9sm5800321wrr.30.2019.07.11.09.43.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 11 Jul 2019 09:43:17 -0700 (PDT) Date: Thu, 11 Jul 2019 17:43:16 +0100 From: "Leif Lindholm" To: tzy.way.ooi@intel.com Cc: devel@edk2.groups.io, Ard BieSheuvel , Michael D Kinney , Loh Tien Hock Subject: Re: [PATCH v6 edk2-platforms 1/1] Silicon/Synopsys/Designware/Driver: DwEmacSnpDxe: Add DesignWare EMAC driver Message-ID: <20190711164316.o7cioscn55mv6bqi@bivouac.eciton.net> References: <20190708070507.2493-1-tzy.way.ooi@intel.com> MIME-Version: 1.0 In-Reply-To: <20190708070507.2493-1-tzy.way.ooi@intel.com> User-Agent: NeoMutt/20170113 (1.7.2) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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