[edk2-devel] [edk2-platforms: PATCH] Revert "MinPlatformPkg/PlatformInitPei: ReportCpuHobLib."

Chiu, Chasel posted 1 patch 4 years ago
Failed in applying to current master (apply log)
Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c   | 32 --------------------------------
Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c        | 25 +++++++++++++++++++++++--
Platform/Intel/MinPlatformPkg/Include/Library/ReportCpuHobLib.h                        | 23 -----------------------
Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec                                       |  6 ++----
Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc                                       |  3 +--
Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf | 27 ---------------------------
6 files changed, 26 insertions(+), 90 deletions(-)
[edk2-devel] [edk2-platforms: PATCH] Revert "MinPlatformPkg/PlatformInitPei: ReportCpuHobLib."
Posted by Chiu, Chasel 4 years ago
The patch broke all OpenBoardPkg build so reverted:
944af47a8c83115dcd5dae581e5c3770a12a2ed2.

Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
---
 Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c   | 32 --------------------------------
 Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c        | 25 +++++++++++++++++++++++--
 Platform/Intel/MinPlatformPkg/Include/Library/ReportCpuHobLib.h                        | 23 -----------------------
 Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec                                       |  6 ++----
 Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc                                       |  3 +--
 Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf | 27 ---------------------------
 6 files changed, 26 insertions(+), 90 deletions(-)

diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
deleted file mode 100644
index aa2565343c..0000000000
--- a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/** @file
-  Source code file for Report CPU HOB library.
-
-Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#include <Base.h>
-#include <Library/HobLib.h>
-
-VOID
-ReportCpuHob (
-  VOID
-  )
-{
-  UINT8                         PhysicalAddressBits;
-  UINT32                        RegEax;
-
-  AsmCpuid (0x80000000, &RegEax, NULL, NULL, NULL);
-  if (RegEax >= 0x80000008) {
-    AsmCpuid (0x80000008, &RegEax, NULL, NULL, NULL);
-    PhysicalAddressBits = (UINT8) RegEax;
-  } else {
-    PhysicalAddressBits = 36;
-  }
-
-  ///
-  /// Create a CPU hand-off information
-  ///
-  BuildCpuHob (PhysicalAddressBits, 16);
-}
diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
index 48cbe0dfbe..efdeb6a91c 100644
--- a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
+++ b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
@@ -1,7 +1,7 @@
 /** @file
   Source code file for Platform Init Pre-Memory PEI module
 
-Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -26,7 +26,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include <Library/BoardInitLib.h>
 #include <Library/TestPointCheckLib.h>
 #include <Library/SetCacheMtrrLib.h>
-#include <Library/ReportCpuHobLib.h>
 #include <Guid/MemoryTypeInformation.h>
 #include <Ppi/PlatformMemorySize.h>
 #include <Ppi/BaseMemoryTest.h>
@@ -356,6 +355,28 @@ Done:
   return EFI_SUCCESS;
 }
 
+VOID
+ReportCpuHob (
+  VOID
+  )
+{
+  UINT8                         PhysicalAddressBits;
+  UINT32                        RegEax;
+
+  AsmCpuid (0x80000000, &RegEax, NULL, NULL, NULL);
+  if (RegEax >= 0x80000008) {
+    AsmCpuid (0x80000008, &RegEax, NULL, NULL, NULL);
+    PhysicalAddressBits = (UINT8) RegEax;
+  } else {
+    PhysicalAddressBits = 36;
+  }
+
+  ///
+  /// Create a CPU hand-off information
+  ///
+  BuildCpuHob (PhysicalAddressBits, 16);
+}
+
 /**
   Install Firmware Volume Hob's once there is main memory
 
diff --git a/Platform/Intel/MinPlatformPkg/Include/Library/ReportCpuHobLib.h b/Platform/Intel/MinPlatformPkg/Include/Library/ReportCpuHobLib.h
deleted file mode 100644
index 79e5d4efb2..0000000000
--- a/Platform/Intel/MinPlatformPkg/Include/Library/ReportCpuHobLib.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/** @file
-
-  Report CPU HOB library
-
-  This library report the CPU HOB with Physical Address bits.
-
-Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef _REPORT_CPU_HOB_LIB_H_
-#define _REPORT_CPU_HOB_LIB_H_
-
-#include <PiPei.h>
-#include <Uefi.h>
-
-VOID
-ReportCpuHob (
-  VOID
-  )
-
-#endif
diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
index 9e141d7b8e..7f74ac9380 100644
--- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
+++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
@@ -6,7 +6,7 @@
 # INF files to generate AutoGen.c and AutoGen.h files
 # for the build infrastructure.
 #
-# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -68,9 +68,7 @@
   TestPointLib|Include/Library/TestPointLib.h
   TestPointCheckLib|Include/Library/TestPointCheckLib.h
 
-  SetCacheMtrrLib|Include/Library/SetCacheMtrrLib.h
-
-  ReportCpuHobLib|Include/Library/ReportCpuHobLib.h
+SetCacheMtrrLib|Include/Library/SetCacheMtrrLib.h
 
 [PcdsFixedAtBuild, PcdsPatchableInModule]
 
diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
index b62351dac6..13a0fda272 100644
--- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
+++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  Platform description.
 #
-# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -92,7 +92,6 @@
   #
   FspWrapperPlatformLib|MinPlatformPkg/FspWrapper/Library/PeiFspWrapperPlatformLib/PeiFspWrapperPlatformLib.inf
   ReportFvLib|MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
-  ReportCpuHobLib|MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   TestPointCheckLib|MinPlatformPkg/Test/Library/TestPointCheckLib/PeiTestPointCheckLib.inf
   TestPointLib|MinPlatformPkg/Test/Library/TestPointLib/PeiTestPointLib.inf
   SetCacheMtrrLib|MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLibNull.inf
diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
deleted file mode 100644
index ae6ec901a1..0000000000
--- a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
+++ /dev/null
@@ -1,27 +0,0 @@
-### @file
-# Component information file for the Report CPU HOB library.
-#
-# Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
-#
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-###
-
-[Defines]
-  INF_VERSION                    = 0x00010005
-  BASE_NAME                      = ReportCpuHobLib
-  FILE_GUID                      = F19AA754-CE24-448D-B755-1F939B00C25D
-  VERSION_STRING                 = 1.0
-  MODULE_TYPE                    = BASE
-  LIBRARY_CLASS                  = ReportCpuHobLib
-
-[LibraryClasses]
-  BaseLib
-  HobLib
-
-[Packages]
-  MdePkg/MdePkg.dec
-  MinPlatformPkg/MinPlatformPkg.dec
-
-[Sources]
-  PeiReportFvLib.c
-- 
2.13.3.windows.1


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

View/Reply Online (#57669): https://edk2.groups.io/g/devel/message/57669
Mute This Topic: https://groups.io/mt/73163615/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] Revert "MinPlatformPkg/PlatformInitPei: ReportCpuHobLib."
Posted by Liming Gao 4 years ago
Reviewed-by: Liming Gao <liming.gao@intel.com>

-----Original Message-----
From: Chiu, Chasel <chasel.chiu@intel.com> 
Sent: 2020年4月21日 8:53
To: devel@edk2.groups.io
Cc: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Gao, Liming <liming.gao@intel.com>
Subject: [edk2-platforms: PATCH] Revert "MinPlatformPkg/PlatformInitPei: ReportCpuHobLib."

The patch broke all OpenBoardPkg build so reverted:
944af47a8c83115dcd5dae581e5c3770a12a2ed2.

Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
---
 Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c   | 32 --------------------------------
 Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c        | 25 +++++++++++++++++++++++--
 Platform/Intel/MinPlatformPkg/Include/Library/ReportCpuHobLib.h                        | 23 -----------------------
 Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec                                       |  6 ++----
 Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc                                       |  3 +--
 Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf | 27 ---------------------------
 6 files changed, 26 insertions(+), 90 deletions(-)

diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
deleted file mode 100644
index aa2565343c..0000000000
--- a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/** @file
-  Source code file for Report CPU HOB library.
-
-Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#include <Base.h>
-#include <Library/HobLib.h>
-
-VOID
-ReportCpuHob (
-  VOID
-  )
-{
-  UINT8                         PhysicalAddressBits;
-  UINT32                        RegEax;
-
-  AsmCpuid (0x80000000, &RegEax, NULL, NULL, NULL);
-  if (RegEax >= 0x80000008) {
-    AsmCpuid (0x80000008, &RegEax, NULL, NULL, NULL);
-    PhysicalAddressBits = (UINT8) RegEax;
-  } else {
-    PhysicalAddressBits = 36;
-  }
-
-  ///
-  /// Create a CPU hand-off information
-  ///
-  BuildCpuHob (PhysicalAddressBits, 16); -} diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
index 48cbe0dfbe..efdeb6a91c 100644
--- a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
+++ b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/Platfor
+++ mInitPreMem.c
@@ -1,7 +1,7 @@
 /** @file
   Source code file for Platform Init Pre-Memory PEI module
 
-Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -26,7 +26,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent  #include <Library/BoardInitLib.h>  #include <Library/TestPointCheckLib.h>  #include <Library/SetCacheMtrrLib.h> -#include <Library/ReportCpuHobLib.h>  #include <Guid/MemoryTypeInformation.h>  #include <Ppi/PlatformMemorySize.h>  #include <Ppi/BaseMemoryTest.h> @@ -356,6 +355,28 @@ Done:
   return EFI_SUCCESS;
 }
 
+VOID
+ReportCpuHob (
+  VOID
+  )
+{
+  UINT8                         PhysicalAddressBits;
+  UINT32                        RegEax;
+
+  AsmCpuid (0x80000000, &RegEax, NULL, NULL, NULL);  if (RegEax >= 
+ 0x80000008) {
+    AsmCpuid (0x80000008, &RegEax, NULL, NULL, NULL);
+    PhysicalAddressBits = (UINT8) RegEax;  } else {
+    PhysicalAddressBits = 36;
+  }
+
+  ///
+  /// Create a CPU hand-off information
+  ///
+  BuildCpuHob (PhysicalAddressBits, 16); }
+
 /**
   Install Firmware Volume Hob's once there is main memory
 
diff --git a/Platform/Intel/MinPlatformPkg/Include/Library/ReportCpuHobLib.h b/Platform/Intel/MinPlatformPkg/Include/Library/ReportCpuHobLib.h
deleted file mode 100644
index 79e5d4efb2..0000000000
--- a/Platform/Intel/MinPlatformPkg/Include/Library/ReportCpuHobLib.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/** @file
-
-  Report CPU HOB library
-
-  This library report the CPU HOB with Physical Address bits.
-
-Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef _REPORT_CPU_HOB_LIB_H_
-#define _REPORT_CPU_HOB_LIB_H_
-
-#include <PiPei.h>
-#include <Uefi.h>
-
-VOID
-ReportCpuHob (
-  VOID
-  )
-
-#endif
diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
index 9e141d7b8e..7f74ac9380 100644
--- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
+++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
@@ -6,7 +6,7 @@
 # INF files to generate AutoGen.c and AutoGen.h files  # for the build infrastructure.
 #
-# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2017 - 2019, Intel Corporation. All rights 
+reserved.<BR>
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -68,9 +68,7 @@
   TestPointLib|Include/Library/TestPointLib.h
   TestPointCheckLib|Include/Library/TestPointCheckLib.h
 
-  SetCacheMtrrLib|Include/Library/SetCacheMtrrLib.h
-
-  ReportCpuHobLib|Include/Library/ReportCpuHobLib.h
+SetCacheMtrrLib|Include/Library/SetCacheMtrrLib.h
 
 [PcdsFixedAtBuild, PcdsPatchableInModule]
 
diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
index b62351dac6..13a0fda272 100644
--- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
+++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  Platform description.
 #
-# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2017 - 2019, Intel Corporation. All rights 
+reserved.<BR>
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -92,7 +92,6 @@
   #
   FspWrapperPlatformLib|MinPlatformPkg/FspWrapper/Library/PeiFspWrapperPlatformLib/PeiFspWrapperPlatformLib.inf
   ReportFvLib|MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
-  ReportCpuHobLib|MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   TestPointCheckLib|MinPlatformPkg/Test/Library/TestPointCheckLib/PeiTestPointCheckLib.inf
   TestPointLib|MinPlatformPkg/Test/Library/TestPointLib/PeiTestPointLib.inf
   SetCacheMtrrLib|MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLibNull.inf
diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
deleted file mode 100644
index ae6ec901a1..0000000000
--- a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
+++ /dev/null
@@ -1,27 +0,0 @@
-### @file
-# Component information file for the Report CPU HOB library.
-#
-# Copyright (c) 2020, Intel Corporation. All rights reserved.<BR> -# -# SPDX-License-Identifier: BSD-2-Clause-Patent -# -###
-
-[Defines]
-  INF_VERSION                    = 0x00010005
-  BASE_NAME                      = ReportCpuHobLib
-  FILE_GUID                      = F19AA754-CE24-448D-B755-1F939B00C25D
-  VERSION_STRING                 = 1.0
-  MODULE_TYPE                    = BASE
-  LIBRARY_CLASS                  = ReportCpuHobLib
-
-[LibraryClasses]
-  BaseLib
-  HobLib
-
-[Packages]
-  MdePkg/MdePkg.dec
-  MinPlatformPkg/MinPlatformPkg.dec
-
-[Sources]
-  PeiReportFvLib.c
--
2.13.3.windows.1


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

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