public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch][edk2-platforms/devel-MinnowBoard3] Enable fastboot
@ 2017-03-02  7:54 Guo, Mang
  2017-03-02  7:55 ` Wei, David
  0 siblings, 1 reply; 3+ messages in thread
From: Guo, Mang @ 2017-03-02  7:54 UTC (permalink / raw)
  To: edk2-devel@lists.01.org; +Cc: Wei, David, Lu, ShifeiX A

Please ignore previous patch. Fixed format issue.


1. Unload UNDI if fastboot enable. 2. Optimized the FV decompressing process

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Guo Mang <mang.guo@intel.com>
---
 .../PlatformPostMemPei/PlatformInit.c              | 10 +--------
 .../PlatformPreMemPei/FvCallback.c                 | 24 ++++++++++++++--------
 .../BroxtonPlatformPkg/PlatformDsc/Components.dsc  | 10 +++++++++
 Platform/BroxtonPlatformPkg/PlatformPkg.fdf        |  2 +-
 Platform/BroxtonPlatformPkg/PlatformPkgIA32.dsc    |  2 +-
 Platform/BroxtonPlatformPkg/PlatformPkgX64.dsc     |  2 +-
 6 files changed, 30 insertions(+), 20 deletions(-)

diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformInit.c b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformInit.c
index 6e8d4ab..0853f8f 100644
--- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformInit.c
+++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformInit.c
@@ -48,15 +48,7 @@ static EFI_PEI_PPI_DESCRIPTOR       mBoardPostMemInitStartPpi[] = {
 };
 
 static EFI_PEI_PPI_DESCRIPTOR       mPpiList[] = {
-  {
-    //
-    // This PPI is hard coded to be installed as SPI boot (vs. eMMC boot)
-    // to trigger  GetFvNotifyCallback()
-    //
-    EFI_PEI_PPI_DESCRIPTOR_PPI,
-    &gCseSpiSelectPpiGuid,
-    NULL
-  },
+
   {
     EFI_PEI_PPI_DESCRIPTOR_PPI,
     &gEfiPeiMasterBootModePpiGuid,
diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/FvCallback.c b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/FvCallback.c
index 6dcdc75..91ac6f5 100644
--- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/FvCallback.c
+++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/FvCallback.c
@@ -1,7 +1,7 @@
 /** @file
   Locate and install Firmware Volume Hob's Once there is main memory.
 
-  Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2015 - 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
@@ -277,6 +277,7 @@ ParseObbPayload (
   EFI_GUID                         *FvName;
   FSP_INFO_HEADER                  *FspHeader;
   UINT32                           FspSImageBase;
+  VOID                             *Memory;
 
   DEBUG ((EFI_D_INFO, "Parsing and checking OBB Payload\n"));
 
@@ -370,13 +371,20 @@ ParseObbPayload (
       PlatformInfo->FvMain3Base = (UINTN) FvHeader;
       PlatformInfo->FvMain3Length = (UINT32) (FvHeader->FvLength);
     } else if (!CompareGuid(FvName, &gFspSFirmwareFileSystemFvGuid)) {
-      PeiServicesInstallFvInfoPpi (
-        NULL,
-        FvHeader,
-        (UINT32) (FvHeader->FvLength),
-        NULL,
-        NULL
-        );
+      Memory = AllocatePages (EFI_SIZE_TO_PAGES ((UINT32) (FvHeader->FvLength)));
+      if(Memory !=NULL) {
+        CopyMem (Memory, FvHeader, (UINT32) (FvHeader->FvLength));
+        PeiServicesInstallFvInfoPpi (
+          NULL,
+          (VOID *) Memory,
+          (UINT32) (FvHeader->FvLength),
+          NULL,
+          NULL
+          );
+      } else  {
+        ASSERT (FALSE);
+      }
+
     }//if/else S3
 
     FvHeader = (EFI_FIRMWARE_VOLUME_HEADER *) ((UINTN) FvHeader + (UINTN) FvHeader->FvLength);
diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/Components.dsc b/Platform/BroxtonPlatformPkg/PlatformDsc/Components.dsc
index d3be2da..d39ec6d 100644
--- a/Platform/BroxtonPlatformPkg/PlatformDsc/Components.dsc
+++ b/Platform/BroxtonPlatformPkg/PlatformDsc/Components.dsc
@@ -213,6 +213,16 @@
   $(PLATFORM_PACKAGE_COMMON)/SampleCode/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf
 !endif
 
+
+  PerformancePkg/Dp_App/Dp.inf {
+  <LibraryClasses>
+  !if $(PERFORMANCE_ENABLE) == TRUE
+    PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
+    TimerLib|$(PLATFORM_PACKAGE_COMMON)/Library/PlatformTscTimerLib/DxeTscTimerLib.inf
+  !endif
+  }
+
+
 !if $(TPM12_ENABLE) == TRUE
   SecurityPkg/Tcg/TcgDxe/TcgDxe.inf
   SecurityPkg/Tcg/TcgSmm/TcgSmm.inf
diff --git a/Platform/BroxtonPlatformPkg/PlatformPkg.fdf b/Platform/BroxtonPlatformPkg/PlatformPkg.fdf
index 2476407..c117245 100644
--- a/Platform/BroxtonPlatformPkg/PlatformPkg.fdf
+++ b/Platform/BroxtonPlatformPkg/PlatformPkg.fdf
@@ -670,7 +670,7 @@ APRIORI DXE {
   # LAN/Network
   #
 !if $(NETWORK_ENABLE) == TRUE
-  FILE DRIVER = 22DE1691-D65D-456a-993E-A253DD1F308C {
+  FILE DRIVER = 2E561D56-4863-44F7-960D-EF2D7F2D35BB {
     SECTION PE32 = BroxtonPlatformPkg/Common/Binaries/UNDI/I210PcieUndiDxe/E7320X3.EFI
     SECTION UI = "UNDI"
   }
diff --git a/Platform/BroxtonPlatformPkg/PlatformPkgIA32.dsc b/Platform/BroxtonPlatformPkg/PlatformPkgIA32.dsc
index 083e32b..6109a76 100644
--- a/Platform/BroxtonPlatformPkg/PlatformPkgIA32.dsc
+++ b/Platform/BroxtonPlatformPkg/PlatformPkgIA32.dsc
@@ -99,7 +99,7 @@
   !else
     PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
   !endif
-  TimerLib|$(PLATFORM_PACKAGE_COMMON)/Library/PlatformTscTimerLib/DxeTscTimerLib.inf
+  TimerLib|$(PLATFORM_PACKAGE_COMMON)/Library/PlatformTscTimerLib/PeiTscTimerLib.inf
 !endif
 
 [LibraryClasses.IA32.DXE_DRIVER]
diff --git a/Platform/BroxtonPlatformPkg/PlatformPkgX64.dsc b/Platform/BroxtonPlatformPkg/PlatformPkgX64.dsc
index 19b8f34..cdd91b3 100644
--- a/Platform/BroxtonPlatformPkg/PlatformPkgX64.dsc
+++ b/Platform/BroxtonPlatformPkg/PlatformPkgX64.dsc
@@ -99,7 +99,7 @@
   !else
     PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
   !endif
-  TimerLib|$(PLATFORM_PACKAGE_COMMON)/Library/PlatformTscTimerLib/DxeTscTimerLib.inf
+  TimerLib|$(PLATFORM_PACKAGE_COMMON)/Library/PlatformTscTimerLib/PeiTscTimerLib.inf
 !endif
 
 [LibraryClasses.IA32.DXE_DRIVER]
-- 
2.10.1.windows.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [Patch][edk2-platforms/devel-MinnowBoard3] Enable fastboot
@ 2017-03-02  7:39 Guo, Mang
  0 siblings, 0 replies; 3+ messages in thread
From: Guo, Mang @ 2017-03-02  7:39 UTC (permalink / raw)
  To: edk2-devel@lists.01.org; +Cc: Wei, David, Lu, ShifeiX A

1. Unload UNDI if fastboot enable. 2. Optimized the FV decompressing process
---
 .../PlatformPostMemPei/PlatformInit.c              | 10 +--------
 .../PlatformPreMemPei/FvCallback.c                 | 24 ++++++++++++++--------
 .../BroxtonPlatformPkg/PlatformDsc/Components.dsc  | 10 +++++++++
 Platform/BroxtonPlatformPkg/PlatformPkg.fdf        |  2 +-
 Platform/BroxtonPlatformPkg/PlatformPkgIA32.dsc    |  2 +-
 Platform/BroxtonPlatformPkg/PlatformPkgX64.dsc     |  2 +-
 6 files changed, 30 insertions(+), 20 deletions(-)

diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformInit.c b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformInit.c
index 6e8d4ab..0853f8f 100644
--- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformInit.c
+++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformInit.c
@@ -48,15 +48,7 @@ static EFI_PEI_PPI_DESCRIPTOR       mBoardPostMemInitStartPpi[] = {
 };
 
 static EFI_PEI_PPI_DESCRIPTOR       mPpiList[] = {
-  {
-    //
-    // This PPI is hard coded to be installed as SPI boot (vs. eMMC boot)
-    // to trigger  GetFvNotifyCallback()
-    //
-    EFI_PEI_PPI_DESCRIPTOR_PPI,
-    &gCseSpiSelectPpiGuid,
-    NULL
-  },
+
   {
     EFI_PEI_PPI_DESCRIPTOR_PPI,
     &gEfiPeiMasterBootModePpiGuid,
diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/FvCallback.c b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/FvCallback.c
index 6dcdc75..91ac6f5 100644
--- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/FvCallback.c
+++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/FvCallback.c
@@ -1,7 +1,7 @@
 /** @file
   Locate and install Firmware Volume Hob's Once there is main memory.
 
-  Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2015 - 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
@@ -277,6 +277,7 @@ ParseObbPayload (
   EFI_GUID                         *FvName;
   FSP_INFO_HEADER                  *FspHeader;
   UINT32                           FspSImageBase;
+  VOID                             *Memory;
 
   DEBUG ((EFI_D_INFO, "Parsing and checking OBB Payload\n"));
 
@@ -370,13 +371,20 @@ ParseObbPayload (
       PlatformInfo->FvMain3Base = (UINTN) FvHeader;
       PlatformInfo->FvMain3Length = (UINT32) (FvHeader->FvLength);
     } else if (!CompareGuid(FvName, &gFspSFirmwareFileSystemFvGuid)) {
-      PeiServicesInstallFvInfoPpi (
-        NULL,
-        FvHeader,
-        (UINT32) (FvHeader->FvLength),
-        NULL,
-        NULL
-        );
+      Memory = AllocatePages (EFI_SIZE_TO_PAGES ((UINT32) (FvHeader->FvLength)));
+      if(Memory !=NULL) {
+        CopyMem (Memory, FvHeader, (UINT32) (FvHeader->FvLength));
+        PeiServicesInstallFvInfoPpi (
+          NULL,
+          (VOID *) Memory,
+          (UINT32) (FvHeader->FvLength),
+          NULL,
+          NULL
+          );
+      } else  {
+        ASSERT (FALSE);
+      }
+
     }//if/else S3
 
     FvHeader = (EFI_FIRMWARE_VOLUME_HEADER *) ((UINTN) FvHeader + (UINTN) FvHeader->FvLength);
diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/Components.dsc b/Platform/BroxtonPlatformPkg/PlatformDsc/Components.dsc
index d3be2da..d39ec6d 100644
--- a/Platform/BroxtonPlatformPkg/PlatformDsc/Components.dsc
+++ b/Platform/BroxtonPlatformPkg/PlatformDsc/Components.dsc
@@ -213,6 +213,16 @@
   $(PLATFORM_PACKAGE_COMMON)/SampleCode/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf
 !endif
 
+
+  PerformancePkg/Dp_App/Dp.inf {
+  <LibraryClasses>
+  !if $(PERFORMANCE_ENABLE) == TRUE
+    PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
+    TimerLib|$(PLATFORM_PACKAGE_COMMON)/Library/PlatformTscTimerLib/DxeTscTimerLib.inf
+  !endif
+  }
+
+
 !if $(TPM12_ENABLE) == TRUE
   SecurityPkg/Tcg/TcgDxe/TcgDxe.inf
   SecurityPkg/Tcg/TcgSmm/TcgSmm.inf
diff --git a/Platform/BroxtonPlatformPkg/PlatformPkg.fdf b/Platform/BroxtonPlatformPkg/PlatformPkg.fdf
index 2476407..c117245 100644
--- a/Platform/BroxtonPlatformPkg/PlatformPkg.fdf
+++ b/Platform/BroxtonPlatformPkg/PlatformPkg.fdf
@@ -670,7 +670,7 @@ APRIORI DXE {
   # LAN/Network
   #
 !if $(NETWORK_ENABLE) == TRUE
-  FILE DRIVER = 22DE1691-D65D-456a-993E-A253DD1F308C {
+  FILE DRIVER = 2E561D56-4863-44F7-960D-EF2D7F2D35BB {
     SECTION PE32 = BroxtonPlatformPkg/Common/Binaries/UNDI/I210PcieUndiDxe/E7320X3.EFI
     SECTION UI = "UNDI"
   }
diff --git a/Platform/BroxtonPlatformPkg/PlatformPkgIA32.dsc b/Platform/BroxtonPlatformPkg/PlatformPkgIA32.dsc
index 083e32b..6109a76 100644
--- a/Platform/BroxtonPlatformPkg/PlatformPkgIA32.dsc
+++ b/Platform/BroxtonPlatformPkg/PlatformPkgIA32.dsc
@@ -99,7 +99,7 @@
   !else
     PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
   !endif
-  TimerLib|$(PLATFORM_PACKAGE_COMMON)/Library/PlatformTscTimerLib/DxeTscTimerLib.inf
+  TimerLib|$(PLATFORM_PACKAGE_COMMON)/Library/PlatformTscTimerLib/PeiTscTimerLib.inf
 !endif
 
 [LibraryClasses.IA32.DXE_DRIVER]
diff --git a/Platform/BroxtonPlatformPkg/PlatformPkgX64.dsc b/Platform/BroxtonPlatformPkg/PlatformPkgX64.dsc
index 19b8f34..cdd91b3 100644
--- a/Platform/BroxtonPlatformPkg/PlatformPkgX64.dsc
+++ b/Platform/BroxtonPlatformPkg/PlatformPkgX64.dsc
@@ -99,7 +99,7 @@
   !else
     PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
   !endif
-  TimerLib|$(PLATFORM_PACKAGE_COMMON)/Library/PlatformTscTimerLib/DxeTscTimerLib.inf
+  TimerLib|$(PLATFORM_PACKAGE_COMMON)/Library/PlatformTscTimerLib/PeiTscTimerLib.inf
 !endif
 
 [LibraryClasses.IA32.DXE_DRIVER]
-- 
2.10.1.windows.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-03-02  7:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-02  7:54 [Patch][edk2-platforms/devel-MinnowBoard3] Enable fastboot Guo, Mang
2017-03-02  7:55 ` Wei, David
  -- strict thread matches above, loose matches on Subject: below --
2017-03-02  7:39 Guo, Mang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox