[edk2-devel] [edk2-platforms][PATCH v3 0/4] Platform: Add initial support for N1SDP board

Pranav Madhu posted 4 patches 3 years, 9 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/edk2 tags/patchew/1593775136-17859-1-git-send-email-pranav.madhu@arm.com
There is a newer version of this series
Silicon/ARM/NeoverseN1Soc/NeoverseN1SocPlatform.dec                                         |   46 +
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 ++++++++++++++++++++
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
[edk2-devel] [edk2-platforms][PATCH v3 0/4] Platform: Add initial support for N1SDP board
Posted by Pranav Madhu 3 years, 9 months ago
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 +
 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 ++++++++++++++++++++
 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


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62019): https://edk2.groups.io/g/devel/message/62019
Mute This Topic: https://groups.io/mt/75274945/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [edk2-platforms][PATCH v3 0/4] Platform: Add initial support for N1SDP board
Posted by Thomas Abraham 3 years, 9 months ago
On Fri, Jul 3, 2020 at 4:49 PM Pranav Madhu <pranav.madhu@arm.com> 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

For this series:
Reviewed-by: Thomas Abraham <thomas.abraham@arm.com>

>
>  Silicon/ARM/NeoverseN1Soc/NeoverseN1SocPlatform.dec                                         |   46 +
>  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 ++++++++++++++++++++
>  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
>
>
> ------------
> Groups.io Links: You receive all messages sent to this group.
>
> View/Reply Online (#62019): https://edk2.groups.io/g/devel/message/62019
> Mute This Topic: https://groups.io/mt/75274945/1785013
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub  [ta.omasab@gmail.com]
> ------------
>

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62098): https://edk2.groups.io/g/devel/message/62098
Mute This Topic: https://groups.io/mt/75274945/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [edk2-platforms][PATCH v3 0/4] Platform: Add initial support for N1SDP board
Posted by Leif Lindholm 3 years, 9 months ago
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
> 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62448): https://edk2.groups.io/g/devel/message/62448
Mute This Topic: https://groups.io/mt/75274945/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-