From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by mx.groups.io with SMTP id smtpd.web11.1000.1594659441854382297 for ; Mon, 13 Jul 2020 09:57:22 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=Pd3e7qJR; spf=pass (domain: nuviainc.com, ip: 209.85.128.65, mailfrom: leif@nuviainc.com) Received: by mail-wm1-f65.google.com with SMTP id f139so259882wmf.5 for ; Mon, 13 Jul 2020 09:57:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=gQBMovqd2D7lVV6QJRT0vIaT6iwua8VSXO9uwF53zYk=; b=Pd3e7qJR4AXJqKQLo0YAT6bbvhcojns/oEmIiCw9eaMI4niqw7IAv3DKAI6DZfaLt+ dXPlt8Rapk9KGaPoTKFkBx30qQZyOWP3zxOZ7mNPr8dpVGaSDu5nnEIBo4IeZPNigCNP goMhxbx3UoChQsDZfsy6vCIiNhd4zBnVqBGSqrlx8X854VheQDtdtbJwZuO4PwRZqTc3 Hadx3x4UxFWCGmurna+6oA7jJCLwW2VwRqGOLAbjRdbGlORELuaGMVoJtLueq6giqmwH iM8Kw8otVBvE/SNmR+jzaS9KrozlFdhx2MdtQsLZJokehPBxvx4Ex0EeqNYty/1eUSon Zy+Q== 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:content-transfer-encoding :in-reply-to:user-agent; bh=gQBMovqd2D7lVV6QJRT0vIaT6iwua8VSXO9uwF53zYk=; b=P5LRM0AVXvhLuT5ewevxa1DQiRcBKGAS5XE0fRJWTgWUHSEoyYTyJDn81RQHryHHDL PP13AwiT7Tfex9DIAkvysDJGFiSnSAHxWXlfBNj6rDXLMPh6x0+AtW9zeyTT4+vQBuEF xRtytc0CgxezutFjNJHMhHf4cDLFhdTRMdAWbpaIkzaRmaFUTYLFcwlzBGEukBcdi0DR GQX2+9TFtiiQ0FGFhIrq/fY3Iceh1LVxROInppMADVr4nuye1Z5quMuGXGor8X9rFCv9 2Oq4iMUL2lSrA3TQcLvS5Ab16YmOFKJrT/GKhUmdPYq1P0dg9EXc1Xhjh0ZGvgculE38 DY2Q== X-Gm-Message-State: AOAM530gItK8hEcPfg+3X4hSfgB6QnOaows6MAgGaA+wSnN3z8eagOqV q+gfuShB2CQ5KG16BrMRjX5QFQ== X-Google-Smtp-Source: ABdhPJx/68UnqNVikjGyGan5i9D1tnuoy61lhDgqQ58QcYKQw606f8lM8Zyg2HDhRVYfDwyWKgWwkA== X-Received: by 2002:a1c:9e4c:: with SMTP id h73mr297197wme.177.1594659440401; Mon, 13 Jul 2020 09:57:20 -0700 (PDT) Return-Path: Received: from vanye ([2001:470:1f09:12f0:b26e:bfff:fea9:f1b8]) by smtp.gmail.com with ESMTPSA id 1sm276733wmf.0.2020.07.13.09.57.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2020 09:57:19 -0700 (PDT) Date: Mon, 13 Jul 2020 17:57:17 +0100 From: "Leif Lindholm" To: Pranav Madhu Cc: devel@edk2.groups.io, Ard Biesheuvel , Thomas Abraham Subject: Re: [edk2-platforms][PATCH v3 0/4] Platform: Add initial support for N1SDP board Message-ID: <20200713165717.GO12303@vanye> References: <1593775136-17859-1-git-send-email-pranav.madhu@arm.com> MIME-Version: 1.0 In-Reply-To: <1593775136-17859-1-git-send-email-pranav.madhu@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Hi Pranav, Trying to build this port with clang fails for both DEBUG and RELEASE builds (CLANG38 profile, clang 7.0.1-8, debian) with: /work/git/edk2-platforms/Silicon/ARM/NeoverseN1Soc/Library/NeoverseN1SocPciExpressLib/NeoverseN1SocPciExpressLib.c:141:7: error: variable 'TableBase' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] if (GET_PCIE_BASE_ADDRESS (Address) == FixedPcdGet64 (PcdPciExpressBaseAddress)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Meanwhile, trying to build it with gcc fails for RELEASE build (GCC5 profile, gcc 8.3.0 debian) with: /work/git/edk2-platforms/Silicon/ARM/NeoverseN1Soc/Library/PciHostBridgeLib/PciHostBridgeLib.c: In function ‘PciHostBridgeResourceConflict’: /work/git/edk2-platforms/Silicon/ARM/NeoverseN1Soc/Library/PciHostBridgeLib/PciHostBridgeLib.c:152:37: error: unused variable ‘RootBridgeIndex’ [-Werror=unused-variable] UINTN RootBridgeIndex = 0; ^~~~~~~~~~~~~~~ Moreover, trying to compile for NOOPT profile fails completely for both, since this is not specified in the .dsc. Some namespace comments below: On Fri, Jul 03, 2020 at 16:48:52 +0530, Pranav Madhu wrote: > Changes since v2: > - Addressed comments from Thomas. > - Renamed Silicon/ARM/N1SDP to Silicon/ARM/NeoverseN1Soc. > > Changes since v1: > - Addressed comments from Ard. > - Split the code between Silicon and Platform directories. > > Arm's N1SDP is a Arm v8.2-A Neoverse N1 CPU based reference design platform > primariliy intended for development on Arm64 based platform. This patch series > adds initial platform support for this board. > > The first patch in this series adds the platform libary implementation. The > second patch adds a custom implementation of the PciExpressLib due to a PCIe > integration issue which results in all config space accesses to non-existing > BDFs resulting in a Serror (bus abort). To avoid this, the N1SDP specific > PciExpressLib implementation provides a workaround for this issue. The third > patch in this series adds the platform library for the PciHostBridge. The > fourth patch adds the initial platform support for the N1SDP platform. > > Deepak Pandey (4): > Silicon/ARM/N1SoC: Add platform library implementation > Silicon/ARM/N1SoC: Implement Neoverse N1 Soc specific PciExpressLib > Silicon/ARM/N1SoC: Implement the PciHostBridgeLib library > Platform/ARM/N1SDP: Add initial N1SDP platform support > > Silicon/ARM/NeoverseN1Soc/NeoverseN1SocPlatform.dec | 46 + This file should probably be called NeoverseN1Soc.dec, or NeoverseN1SocPkg.dec. Moreover, this adds a new top-level directory to the tree - this should be reflected in Maintainers.txt. > Platform/ARM/N1Sdp/N1SdpPlatform.dsc | 245 ++++ > Platform/ARM/N1Sdp/N1SdpPlatform.fdf | 294 ++++ > Silicon/ARM/NeoverseN1Soc/Library/NeoverseN1SocPciExpressLib/NeoverseN1SocPciExpressLib.inf | 39 + > Silicon/ARM/NeoverseN1Soc/Library/PciHostBridgeLib/PciHostBridgeLib.inf | 49 + > Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLib.inf | 54 + > Silicon/ARM/NeoverseN1Soc/Include/NeoverseN1SocPlatform.h | 68 + > Silicon/ARM/NeoverseN1Soc/Library/NeoverseN1SocPciExpressLib/NeoverseN1SocPciExpressLib.c | 1545 ++++++++++++++++++++ This is based on a file named PciExpressLib.c. Pleas keep calling it that, the directory name already distinguishes it. / Leif > Silicon/ARM/NeoverseN1Soc/Library/PciHostBridgeLib/PciHostBridgeLib.c | 187 +++ > Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLib.c | 67 + > Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLibMem.c | 152 ++ > Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/AArch64/Helper.S | 84 ++ > 12 files changed, 2830 insertions(+) > create mode 100644 Silicon/ARM/NeoverseN1Soc/NeoverseN1SocPlatform.dec > create mode 100644 Platform/ARM/N1Sdp/N1SdpPlatform.dsc > create mode 100644 Platform/ARM/N1Sdp/N1SdpPlatform.fdf > create mode 100644 Silicon/ARM/NeoverseN1Soc/Library/NeoverseN1SocPciExpressLib/NeoverseN1SocPciExpressLib.inf > create mode 100644 Silicon/ARM/NeoverseN1Soc/Library/PciHostBridgeLib/PciHostBridgeLib.inf > create mode 100644 Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLib.inf > create mode 100644 Silicon/ARM/NeoverseN1Soc/Include/NeoverseN1SocPlatform.h > create mode 100644 Silicon/ARM/NeoverseN1Soc/Library/NeoverseN1SocPciExpressLib/NeoverseN1SocPciExpressLib.c > create mode 100644 Silicon/ARM/NeoverseN1Soc/Library/PciHostBridgeLib/PciHostBridgeLib.c > create mode 100644 Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLib.c > create mode 100644 Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLibMem.c > create mode 100644 Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/AArch64/Helper.S > > -- > 2.7.4 >