[edk2] [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Add Source Level Debug

zwei4 posted 1 patch 6 years, 8 months ago
Failed in applying to current master (apply log)
Platform/BroxtonPlatformPkg/BuildBios.sh           |  1 -
.../FspmWrapperPeim/FspmWrapperPeim.inf            |  3 ---
.../PlatformDsc/Components.IA32.dsc                |  2 ++
.../BroxtonPlatformPkg/PlatformDsc/Defines.dsc     |  6 +-----
.../PlatformDsc/LibraryClasses.DxeDriver.dsc       | 25 ++++++++++++++++++++++
Platform/BroxtonPlatformPkg/PlatformPkg.fdf        |  4 ++--
Platform/BroxtonPlatformPkg/PlatformPkgIA32.dsc    | 19 +---------------
Platform/BroxtonPlatformPkg/PlatformPkgX64.dsc     | 19 +---------------
Platform/BroxtonPlatformPkg/PlatformPkgX64Gcc.dsc  | 19 +---------------
9 files changed, 33 insertions(+), 65 deletions(-)
create mode 100644 Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.DxeDriver.dsc
[edk2] [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Add Source Level Debug
Posted by zwei4 6 years, 8 months ago
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: zwei4 <david.wei@intel.com>
---
 Platform/BroxtonPlatformPkg/BuildBios.sh           |  1 -
 .../FspmWrapperPeim/FspmWrapperPeim.inf            |  3 ---
 .../PlatformDsc/Components.IA32.dsc                |  2 ++
 .../BroxtonPlatformPkg/PlatformDsc/Defines.dsc     |  6 +-----
 .../PlatformDsc/LibraryClasses.DxeDriver.dsc       | 25 ++++++++++++++++++++++
 Platform/BroxtonPlatformPkg/PlatformPkg.fdf        |  4 ++--
 Platform/BroxtonPlatformPkg/PlatformPkgIA32.dsc    | 19 +---------------
 Platform/BroxtonPlatformPkg/PlatformPkgX64.dsc     | 19 +---------------
 Platform/BroxtonPlatformPkg/PlatformPkgX64Gcc.dsc  | 19 +---------------
 9 files changed, 33 insertions(+), 65 deletions(-)
 create mode 100644 Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.DxeDriver.dsc

diff --git a/Platform/BroxtonPlatformPkg/BuildBios.sh b/Platform/BroxtonPlatformPkg/BuildBios.sh
index 40d873e7a..3fa450b60 100644
--- a/Platform/BroxtonPlatformPkg/BuildBios.sh
+++ b/Platform/BroxtonPlatformPkg/BuildBios.sh
@@ -147,7 +147,6 @@ echo DEFINE SV_BIOS_ENABLE      = $SV_BIOS_ENABLE   >> $Build_Macros
 echo DEFINE PPV_BIOS_ENABLE     = $PPV_BIOS_ENABLE  >> $Build_Macros
 echo DEFINE RVVP_BIOS_ENABLE    = $RVVP_BIOS_ENABLE >> $Build_Macros
 echo DEFINE RVV_BIOS_ENABLE     = $RVV_BIOS_ENABLE  >> $Build_Macros
-echo DEFINE SOURCE_DEBUG_ENABLE = $SrcDebug         >> $Build_Macros
 
 if [ $Arch == "IA32" ]; then
   echo DEFINE X64_CONFIG = FALSE      >> $Build_Macros
diff --git a/Platform/BroxtonPlatformPkg/Common/SampleCode/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf b/Platform/BroxtonPlatformPkg/Common/SampleCode/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf
index 334c8b02e..eeca8ac45 100644
--- a/Platform/BroxtonPlatformPkg/Common/SampleCode/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf
+++ b/Platform/BroxtonPlatformPkg/Common/SampleCode/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf
@@ -79,9 +79,6 @@
 
 [Sources]
   FspmWrapperPeim.c
-  ./../FspInitPei/SecMain.c
-  ./../FspInitPei/SecMain.h
-  ./../FspInitPei/FindPeiCore.c
 
 [Ppis]
   gTopOfTemporaryRamPpiGuid             ## PRODUCES
diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/Components.IA32.dsc b/Platform/BroxtonPlatformPkg/PlatformDsc/Components.IA32.dsc
index 1341e082b..f8900ea4b 100644
--- a/Platform/BroxtonPlatformPkg/PlatformDsc/Components.IA32.dsc
+++ b/Platform/BroxtonPlatformPkg/PlatformDsc/Components.IA32.dsc
@@ -17,6 +17,8 @@
     <LibraryClasses>
       DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
       PlatformSecLib|$(PLATFORM_PACKAGE_COMMON)/Library/PlatformSecLib/Vtf0PlatformSecLib.inf
+      PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
+      DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
     <PcdsFixedAtBuild>
       gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x00
       gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x0
diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/Defines.dsc b/Platform/BroxtonPlatformPkg/PlatformDsc/Defines.dsc
index 69641ced3..a2da30bf7 100644
--- a/Platform/BroxtonPlatformPkg/PlatformDsc/Defines.dsc
+++ b/Platform/BroxtonPlatformPkg/PlatformDsc/Defines.dsc
@@ -163,8 +163,4 @@
     DEFINE FSP_RAM_CODE_SIZE               = $(FSP_IBBM_SIZE)
     DEFINE CAR_REGION_SIZE                 = 0x100000
 
-!if $(TARGET) == DEBUG
-  DEFINE SOURCE_DEBUG_ENABLE     = TRUE
-!else 
-  DEFINE SOURCE_DEBUG_ENABLE     = FALSE
-!endif
\ No newline at end of file
+    DEFINE SOURCE_DEBUG_ENABLE     = FALSE
diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.DxeDriver.dsc b/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.DxeDriver.dsc
new file mode 100644
index 000000000..d9c91e668
--- /dev/null
+++ b/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.DxeDriver.dsc
@@ -0,0 +1,25 @@
+## @file
+#  Dxe Driver Library Classes Description.
+#
+#  Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+#
+#  This program and the accompanying materials
+#  are licensed and made available under the terms and conditions of the BSD License
+#  which accompanies this distribution. The full text of the license may be found at
+#  http://opensource.org/licenses/bsd-license.php.
+#
+#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+##
+
+  !if $(PERFORMANCE_ENABLE) == TRUE
+    PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
+    TimerLib|$(PLATFORM_PACKAGE_COMMON)/Library/PlatformTscTimerLib/DxeTscTimerLib.inf
+  !endif
+  
+  !if $(SOURCE_DEBUG_ENABLE) == TRUE
+    DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
+  !else
+    DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
+  !endif
\ No newline at end of file
diff --git a/Platform/BroxtonPlatformPkg/PlatformPkg.fdf b/Platform/BroxtonPlatformPkg/PlatformPkg.fdf
index e3d767d72..c975a4c2a 100644
--- a/Platform/BroxtonPlatformPkg/PlatformPkg.fdf
+++ b/Platform/BroxtonPlatformPkg/PlatformPkg.fdf
@@ -236,7 +236,7 @@
   FvNameGuid         = B73FE497-B92E-416e-8326-45AD0D270092
 
 !if $(SOURCE_DEBUG_ENABLE) == TRUE
-  INF  SourceLevelDebugPkg/DebugAgentPei/DebugAgentPei.inf
+#  INF  SourceLevelDebugPkg/DebugAgentPei/DebugAgentPei.inf
 !endif
 
   INF $(PLATFORM_PACKAGE_COMMON)/SampleCode/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf
@@ -392,7 +392,7 @@ APRIORI DXE {
 !endif
 
 !if $(SOURCE_DEBUG_ENABLE) == TRUE
-#  INF  SourceLevelDebugPkg/DebugAgentDxe/DebugAgentDxe.inf
+  INF  SourceLevelDebugPkg/DebugAgentDxe/DebugAgentDxe.inf
 !endif
 
   INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
diff --git a/Platform/BroxtonPlatformPkg/PlatformPkgIA32.dsc b/Platform/BroxtonPlatformPkg/PlatformPkgIA32.dsc
index 3513e1bd5..8e7820f07 100644
--- a/Platform/BroxtonPlatformPkg/PlatformPkgIA32.dsc
+++ b/Platform/BroxtonPlatformPkg/PlatformPkgIA32.dsc
@@ -69,14 +69,6 @@
     PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
   !endif
 
-!if $(SOURCE_DEBUG_ENABLE) == TRUE
-[LibraryClasses.common.SEC]
-  DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
-
-[LibraryClasses.common.DXE_CORE]
-  DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
-!endif
-
 [LibraryClasses.IA32.PEIM, LibraryClasses.IA32.PEI_CORE, LibraryClasses.IA32.SEC]
 !if $(PERFORMANCE_ENABLE) == TRUE
   !if $(INTEL_FPDT_ENABLE) == TRUE
@@ -115,16 +107,7 @@
   !include $(PLATFORM_SI_PACKAGE)/SiPkgDxeLib.dsc
 
 [LibraryClasses.Common.DXE_DRIVER]
-  !if $(PERFORMANCE_ENABLE) == TRUE
-    PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
-    TimerLib|$(PLATFORM_PACKAGE_COMMON)/Library/PlatformTscTimerLib/DxeTscTimerLib.inf
-  !endif
-  
-  !if $(SOURCE_DEBUG_ENABLE) == TRUE
-    DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
-  !else
-    DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
-  !endif
+  !include PlatformDsc/LibraryClasses.DxeDriver.dsc
 
 [LibraryClasses.Common.DXE_CORE]
   !include $(PLATFORM_NAME)/PlatformDsc/LibraryClasses.DxeCore.dsc
diff --git a/Platform/BroxtonPlatformPkg/PlatformPkgX64.dsc b/Platform/BroxtonPlatformPkg/PlatformPkgX64.dsc
index 103bce9a4..3797b4a64 100644
--- a/Platform/BroxtonPlatformPkg/PlatformPkgX64.dsc
+++ b/Platform/BroxtonPlatformPkg/PlatformPkgX64.dsc
@@ -69,14 +69,6 @@
     PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
   !endif
 
-!if $(SOURCE_DEBUG_ENABLE) == TRUE
-[LibraryClasses.common.SEC]
-  DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
-
-[LibraryClasses.common.DXE_CORE]
-  DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
-!endif
-
 [LibraryClasses.IA32.PEIM, LibraryClasses.IA32.PEI_CORE, LibraryClasses.IA32.SEC]
 !if $(PERFORMANCE_ENABLE) == TRUE
   !if $(INTEL_FPDT_ENABLE) == TRUE
@@ -115,16 +107,7 @@
   !include $(PLATFORM_SI_PACKAGE)/SiPkgDxeLib.dsc
 
 [LibraryClasses.Common.DXE_DRIVER]
-  !if $(PERFORMANCE_ENABLE) == TRUE
-    PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
-    TimerLib|$(PLATFORM_PACKAGE_COMMON)/Library/PlatformTscTimerLib/DxeTscTimerLib.inf
-  !endif
-  
-  !if $(SOURCE_DEBUG_ENABLE) == TRUE
-    DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
-  !else
-    DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
-  !endif
+  !include PlatformDsc/LibraryClasses.DxeDriver.dsc
 
 [LibraryClasses.Common.DXE_CORE]
   !include $(PLATFORM_NAME)/PlatformDsc/LibraryClasses.DxeCore.dsc
diff --git a/Platform/BroxtonPlatformPkg/PlatformPkgX64Gcc.dsc b/Platform/BroxtonPlatformPkg/PlatformPkgX64Gcc.dsc
index bab962bbf..c24abf47d 100644
--- a/Platform/BroxtonPlatformPkg/PlatformPkgX64Gcc.dsc
+++ b/Platform/BroxtonPlatformPkg/PlatformPkgX64Gcc.dsc
@@ -69,14 +69,6 @@
     PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
   !endif
 
-!if $(SOURCE_DEBUG_ENABLE) == TRUE
-[LibraryClasses.common.SEC]
-  DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
-
-[LibraryClasses.common.DXE_CORE]
-  DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
-!endif
-
 [LibraryClasses.IA32.PEIM, LibraryClasses.IA32.PEI_CORE, LibraryClasses.IA32.SEC]
 !if $(PERFORMANCE_ENABLE) == TRUE
   !if $(INTEL_FPDT_ENABLE) == TRUE
@@ -115,16 +107,7 @@
   !include $(WORKSPACE)/Silicon/$(PLATFORM_SI_PACKAGE)/SiPkgDxeLib.dsc
 
 [LibraryClasses.Common.DXE_DRIVER]
-  !if $(PERFORMANCE_ENABLE) == TRUE
-    PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
-    TimerLib|$(PLATFORM_PACKAGE_COMMON)/Library/PlatformTscTimerLib/DxeTscTimerLib.inf
-  !endif
-  
-  !if $(SOURCE_DEBUG_ENABLE) == TRUE
-    DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
-  !else
-    DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
-  !endif
+  !include PlatformDsc/LibraryClasses.DxeDriver.dsc
 
 [LibraryClasses.Common.DXE_CORE]
   !include PlatformDsc/LibraryClasses.DxeCore.dsc
-- 
2.11.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel