public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Guo, Mang" <mang.guo@intel.com>
To: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Wei, David" <david.wei@intel.com>,
	"Lu, ShifeiX A" <shifeix.a.lu@intel.com>
Subject: [Patch][edk2-platforms/devel-MinnowBoard3] Enable fastboot
Date: Thu, 2 Mar 2017 07:54:52 +0000	[thread overview]
Message-ID: <22D2C85ED001C54AA20BFE3B0E4751D1524DCDD6@SHSMSX103.ccr.corp.intel.com> (raw)

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



             reply	other threads:[~2017-03-02  7:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-02  7:54 Guo, Mang [this message]
2017-03-02  7:55 ` [Patch][edk2-platforms/devel-MinnowBoard3] Enable fastboot Wei, David
  -- strict thread matches above, loose matches on Subject: below --
2017-03-02  7:39 Guo, Mang

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=22D2C85ED001C54AA20BFE3B0E4751D1524DCDD6@SHSMSX103.ccr.corp.intel.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