public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "PierreGondois" <pierre.gondois@arm.com>
To: devel@edk2.groups.io, Sean Brogan <sean.brogan@microsoft.com>,
	Sami Mujawar <sami.mujawar@arm.com>,
	Leif Lindholm <leif@nuviainc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Subject: [RFC PATCH edk2-platforms v1 4/5] Platform/ARM: Move FdtPlatformDxe package to ArmCommonPkg
Date: Tue, 19 Oct 2021 11:25:01 +0100	[thread overview]
Message-ID: <20211019102502.3765-5-Pierre.Gondois@arm.com> (raw)
In-Reply-To: <20211019102502.3765-1-Pierre.Gondois@arm.com>

From: Pierre Gondois <Pierre.Gondois@arm.com>

The Platform/ARM/ARM.dec file implies that the Platform/ARM/ folder
is a package. This folder however hosts other packages describing
platforms (JunoPkg, SgiPkg, ...) and packages describing drivers
(BootMonFs, FdtPlatformDxe).

As the Dec specification mention:
 "EDK II Packages cannot be nested within other EDK II Packages."
Also, CI modules are based on packages. Having non-nested packages
allows to have distinct entities each CI module must check.

To remove the nested structure:
1- Create a Platform/ARM/ArmCommonPkg package containing code
   shared among platforms. It will contains the following folders:
     Platform/ARM/[Drivers/ | Include/ | Library/]
2- Remove the BootMonFs and FdtPlatformDxe packages and resolve
   the broken dependencies to these drivers
3- Resolve the broken dependencies to the libraries from
   Platform/ARM/Library

As part of 2, this patch removes the FdtPlatformDxe.dec package to
ArmCommonPkg.dec and updates references to FdtPlatformDxe accordingly.

Bugzilla: 3259 (https://bugzilla.tianocore.org/show_bug.cgi?id=3259)
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
---
 Platform/ARM/ArmCommonPkg/ArmCommonPkg.dec    | 10 ++++++++
 .../Drivers/FdtPlatformDxe/FdtPlatformDxe.dec | 25 -------------------
 .../Drivers/FdtPlatformDxe/FdtPlatformDxe.inf |  1 -
 Platform/ARM/JunoPkg/ArmJuno.dsc              |  2 +-
 Platform/ARM/JunoPkg/ArmJuno.fdf              |  2 +-
 .../JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.inf |  1 -
 .../ARM/VExpressPkg/ArmVExpress-CTA15-A7.dsc  |  2 +-
 .../ARM/VExpressPkg/ArmVExpress-CTA15-A7.fdf  |  2 +-
 8 files changed, 14 insertions(+), 31 deletions(-)
 delete mode 100644 Platform/ARM/ArmCommonPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.dec

diff --git a/Platform/ARM/ArmCommonPkg/ArmCommonPkg.dec b/Platform/ARM/ArmCommonPkg/ArmCommonPkg.dec
index dac54b9f9ed8..12bf49d769e5 100644
--- a/Platform/ARM/ArmCommonPkg/ArmCommonPkg.dec
+++ b/Platform/ARM/ArmCommonPkg/ArmCommonPkg.dec
@@ -20,6 +20,7 @@ [LibraryClasses]
 
 [Guids]
   gArmBootMonFsFileInfoGuid   = { 0x41e26b9c, 0xada6, 0x45b3, { 0x80, 0x8e, 0x23, 0x57, 0xa3, 0x5b, 0x60, 0xd6 } }
+  gFdtPlatformDxeTokenSpaceGuid = { 0xbfcaa0af, 0xedd4, 0x4ce7, { 0xbd, 0xb3, 0x39, 0x15, 0x07, 0x28, 0x65, 0x77 } }
 
 [Guids.common]
   gArmBootMonFsTokenSpaceGuid = { 0xeb76a201, 0x69b4, 0x491f, { 0x9b, 0xde, 0xbf, 0x30, 0xbd, 0x03, 0x82, 0xb4 } }
@@ -27,3 +28,12 @@ [Guids.common]
 [PcdsFixedAtBuild.common]
   # Boot Monitor FileSystem
   gArmBootMonFsTokenSpaceGuid.PcdBootMonFsSupportedDevicePaths|L""|VOID*|0x0000003A
+
+[PcdsFeatureFlag.common]
+  # Enable the development specific features
+  gFdtPlatformDxeTokenSpaceGuid.PcdOverridePlatformFdt|TRUE|BOOLEAN|0x00000001
+  # Add 'dumpfdt' EFI Shell command
+  gFdtPlatformDxeTokenSpaceGuid.PcdDumpFdtShellCommand|TRUE|BOOLEAN|0x00000002
+
+[PcdsFixedAtBuild.common, PcdsDynamic.common]
+  gFdtPlatformDxeTokenSpaceGuid.PcdFdtDevicePaths|L""|VOID*|0x00000055
diff --git a/Platform/ARM/ArmCommonPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.dec b/Platform/ARM/ArmCommonPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.dec
deleted file mode 100644
index 550156938f0c..000000000000
--- a/Platform/ARM/ArmCommonPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.dec
+++ /dev/null
@@ -1,25 +0,0 @@
-#/** @file
-#
-#  Copyright (c) 2011-2017, ARM Limited. All rights reserved.
-#
-#  SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-#**/
-
-[Defines]
-  DEC_SPECIFICATION              = 0x0001001A
-  PACKAGE_NAME                   = FdtPlatformDxe
-  PACKAGE_GUID                   = ed22c1e5-71cb-48d6-a9d8-c20f8d6b909f
-  PACKAGE_VERSION                = 0.1
-
-[Guids]
-  gFdtPlatformDxeTokenSpaceGuid = { 0xbfcaa0af, 0xedd4, 0x4ce7, { 0xbd, 0xb3, 0x39, 0x15, 0x07, 0x28, 0x65, 0x77 } }
-
-[PcdsFeatureFlag.common]
-  # Enable the development specific features
-  gFdtPlatformDxeTokenSpaceGuid.PcdOverridePlatformFdt|TRUE|BOOLEAN|0x00000001
-  # Add 'dumpfdt' EFI Shell command
-  gFdtPlatformDxeTokenSpaceGuid.PcdDumpFdtShellCommand|TRUE|BOOLEAN|0x00000002
-
-[PcdsFixedAtBuild.common, PcdsDynamic.common]
-  gFdtPlatformDxeTokenSpaceGuid.PcdFdtDevicePaths|L""|VOID*|0x00000055
diff --git a/Platform/ARM/ArmCommonPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.inf b/Platform/ARM/ArmCommonPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.inf
index b844c0dc5233..471efb51afd0 100644
--- a/Platform/ARM/ArmCommonPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.inf
+++ b/Platform/ARM/ArmCommonPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.inf
@@ -26,7 +26,6 @@ [Packages]
   MdeModulePkg/MdeModulePkg.dec
   MdePkg/MdePkg.dec
   Platform/ARM/ArmCommonPkg/ArmCommonPkg.dec
-  Platform/ARM/Drivers/FdtPlatformDxe/FdtPlatformDxe.dec
   ShellPkg/ShellPkg.dec
 
 [LibraryClasses]
diff --git a/Platform/ARM/JunoPkg/ArmJuno.dsc b/Platform/ARM/JunoPkg/ArmJuno.dsc
index 3b7a63b6437a..9548931f6cd7 100644
--- a/Platform/ARM/JunoPkg/ArmJuno.dsc
+++ b/Platform/ARM/JunoPkg/ArmJuno.dsc
@@ -376,7 +376,7 @@ [Components.common]
   #
   # FDT installation
   #
-  Platform/ARM/Drivers/FdtPlatformDxe/FdtPlatformDxe.inf {
+  Platform/ARM/ArmCommonPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.inf {
     <LibraryClasses>
       BdsLib|Platform/ARM/Library/BdsLib/BdsLib.inf
   }
diff --git a/Platform/ARM/JunoPkg/ArmJuno.fdf b/Platform/ARM/JunoPkg/ArmJuno.fdf
index 910de7c00988..992a0296650a 100644
--- a/Platform/ARM/JunoPkg/ArmJuno.fdf
+++ b/Platform/ARM/JunoPkg/ArmJuno.fdf
@@ -232,7 +232,7 @@ [FV.FvMain]
   #
   # The UEFI driver is at the end of the list of the driver to be dispatched
   # after the device drivers (eg: Ethernet) to ensure we have support for them.
-  INF Platform/ARM/Drivers/FdtPlatformDxe/FdtPlatformDxe.inf
+  INF Platform/ARM/ArmCommonPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.inf
 
   # SCMI Driver
   INF ArmPkg/Drivers/ArmScmiDxe/ArmScmiDxe.inf
diff --git a/Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.inf b/Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.inf
index d2e136baec48..5092ba2e5d05 100644
--- a/Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.inf
+++ b/Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.inf
@@ -23,7 +23,6 @@ [Packages]
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
   Platform/ARM/ArmCommonPkg/ArmCommonPkg.dec
-  Platform/ARM/Drivers/FdtPlatformDxe/FdtPlatformDxe.dec
   Platform/ARM/JunoPkg/ArmJuno.dec
 
 [LibraryClasses]
diff --git a/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.dsc b/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.dsc
index e06a2a47f091..2790e9c41bd4 100644
--- a/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.dsc
+++ b/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.dsc
@@ -281,7 +281,7 @@ [Components.common]
   #
   # FDT installation
   #
-  Platform/ARM/Drivers/FdtPlatformDxe/FdtPlatformDxe.inf {
+  Platform/ARM/ArmCommonPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.inf {
     <LibraryClasses>
       BdsLib|Platform/ARM/Library/BdsLib/BdsLib.inf
   }
diff --git a/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.fdf b/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.fdf
index bf60fb69bb15..97984e59f950 100644
--- a/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.fdf
+++ b/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.fdf
@@ -167,7 +167,7 @@ [FV.FvMain]
   #
   # The UEFI driver is at the end of the list of the driver to be dispatched
   # after the device drivers (eg: Ethernet) to ensure we have support for them.
-  INF Platform/ARM/Drivers/FdtPlatformDxe/FdtPlatformDxe.inf
+  INF Platform/ARM/ArmCommonPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.inf
 
   # Example to add a Device Tree to the Firmware Volume
   #FILE FREEFORM = PCD(gArmVExpressTokenSpaceGuid.PcdFdtVExpressHwA15x2A7x3) {
-- 
2.17.1


  parent reply	other threads:[~2021-10-19 10:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-19 10:24 [RFC PATCH edk2-platforms v1 0/5] Remove ARM nested packages PierreGondois
2021-10-19 10:24 ` [RFC PATCH edk2-platforms v1 1/5] Platform/ARM: Create ArmCommonPkg PierreGondois
2021-10-19 10:24 ` [RFC PATCH edk2-platforms v1 2/5] Platform/ARM: Create ArmCommonPkg.dec from ARM.dec PierreGondois
2021-10-19 10:25 ` [RFC PATCH edk2-platforms v1 3/5] Platform/ARM: Move BootMonFs package to ArmCommonPkg PierreGondois
2021-10-19 10:25 ` PierreGondois [this message]
2021-10-19 10:25 ` [RFC PATCH edk2-platforms v1 5/5] Platform/ARM: Resolve ArmCommonPkg library references PierreGondois
2021-10-19 11:17 ` [RFC PATCH edk2-platforms v1 0/5] Remove ARM nested packages Ard Biesheuvel
2021-10-19 11:22   ` PierreGondois
     [not found]   ` <16AF6AC06BB23F23.2978@groups.io>
2021-10-26 14:06     ` [edk2-devel] " PierreGondois
2021-10-26 21:37       ` Leif Lindholm

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=20211019102502.3765-5-Pierre.Gondois@arm.com \
    --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