public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Leif Lindholm" <leif@nuviainc.com>
To: Pranav Madhu <pranav.madhu@arm.com>
Cc: devel@edk2.groups.io, Ard Biesheuvel <ard.biesheuvel@arm.com>,
	Thomas Abraham <thomas.abraham@arm.com>
Subject: Re: [edk2-platforms][PATCH v3 0/4] Platform: Add initial support for N1SDP board
Date: Mon, 13 Jul 2020 17:57:17 +0100	[thread overview]
Message-ID: <20200713165717.GO12303@vanye> (raw)
In-Reply-To: <1593775136-17859-1-git-send-email-pranav.madhu@arm.com>

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
> 

  parent reply	other threads:[~2020-07-13 16:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-03 11:18 [edk2-platforms][PATCH v3 0/4] Platform: Add initial support for N1SDP board Pranav Madhu
2020-07-03 11:18 ` [edk2-platforms][PATCH v3 1/4] Silicon/ARM/N1SoC: Add platform library implementation Pranav Madhu
2020-07-13 17:18   ` Leif Lindholm
2020-07-03 11:18 ` [edk2-platforms][PATCH v3 2/4] Silicon/ARM/N1SoC: Implement Neoverse N1 Soc specific PciExpressLib Pranav Madhu
2020-07-13 19:10   ` Leif Lindholm
2020-07-03 11:18 ` [edk2-platforms][PATCH v3 3/4] Silicon/ARM/N1SoC: Implement the PciHostBridgeLib library Pranav Madhu
2020-07-14 10:46   ` Leif Lindholm
2020-07-03 11:18 ` [edk2-platforms][PATCH v3 4/4] Platform/ARM/N1SDP: Add initial N1SDP platform support Pranav Madhu
2020-07-14 11:19   ` Leif Lindholm
2020-07-06 14:27 ` [edk2-devel] [edk2-platforms][PATCH v3 0/4] Platform: Add initial support for N1SDP board Thomas Abraham
2020-07-13 16:57 ` Leif Lindholm [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-07-03  7:02 Pranav Madhu

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=20200713165717.GO12303@vanye \
    --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