]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFspWrapperPkg/FspNotifyDxe/FspNotifyDxe.c
ArmPlaformPkg: Replaced gArmPlatformTokenSpaceGuid.PcdPlatformBootTimeOut
[mirror_edk2.git] / IntelFspWrapperPkg / FspNotifyDxe / FspNotifyDxe.c
index 7beedc458ae04481886c3c62a435c0b802cc219d..f8e8e826f135a3491b087cb7e97d53ba6b4a094a 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   This driver will register two callbacks to call fsp's notifies.\r
 \r
-  Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -40,7 +40,6 @@ OnPciEnumerationComplete (
 {\r
   NOTIFY_PHASE_PARAMS NotifyPhaseParams;\r
   EFI_STATUS          Status;\r
-  FSP_STATUS          FspStatus;\r
   VOID                *Interface;\r
 \r
   //\r
@@ -57,9 +56,9 @@ OnPciEnumerationComplete (
   }\r
 \r
   NotifyPhaseParams.Phase = EnumInitPhaseAfterPciEnumeration;\r
-  FspStatus = CallFspNotifyPhase (mFspHeader, &NotifyPhaseParams);\r
-  if (FspStatus != FSP_SUCCESS) {\r
-    DEBUG((DEBUG_ERROR, "FSP NotifyPhase AfterPciEnumeration failed, status: 0x%x\n", FspStatus));\r
+  Status = CallFspNotifyPhase (mFspHeader, &NotifyPhaseParams);\r
+  if (Status != EFI_SUCCESS) {\r
+    DEBUG((DEBUG_ERROR, "FSP NotifyPhase AfterPciEnumeration failed, status: 0x%x\n", Status));\r
   } else {\r
     DEBUG((DEBUG_INFO, "FSP NotifyPhase AfterPciEnumeration Success.\n"));\r
   }\r
@@ -84,14 +83,14 @@ OnReadyToBoot (
   )\r
 {\r
   NOTIFY_PHASE_PARAMS NotifyPhaseParams;\r
-  FSP_STATUS          FspStatus;\r
+  EFI_STATUS          Status;\r
 \r
   gBS->CloseEvent (Event);\r
 \r
   NotifyPhaseParams.Phase = EnumInitPhaseReadyToBoot;\r
-  FspStatus = CallFspNotifyPhase (mFspHeader, &NotifyPhaseParams);\r
-  if (FspStatus != FSP_SUCCESS) {\r
-    DEBUG((DEBUG_ERROR, "FSP NotifyPhase ReadyToBoot failed, status: 0x%x\n", FspStatus));\r
+  Status = CallFspNotifyPhase (mFspHeader, &NotifyPhaseParams);\r
+  if (Status != EFI_SUCCESS) {\r
+    DEBUG((DEBUG_ERROR, "FSP NotifyPhase ReadyToBoot failed, status: 0x%x\n", Status));\r
   } else {\r
     DEBUG((DEBUG_INFO, "FSP NotifyPhase ReadyToBoot Success.\n"));\r
   }\r
@@ -121,7 +120,11 @@ FspDxeEntryPoint (
   VOID       *Registration;\r
   EFI_EVENT  ProtocolNotifyEvent;\r
 \r
-  mFspHeader = FspFindFspHeader (PcdGet32 (PcdFlashFvFspBase));\r
+  if (PcdGet32 (PcdFlashFvSecondFspBase) == 0) {\r
+    mFspHeader = FspFindFspHeader (PcdGet32 (PcdFlashFvFspBase));\r
+  } else {\r
+    mFspHeader = FspFindFspHeader (PcdGet32 (PcdFlashFvSecondFspBase));\r
+  }\r
   DEBUG ((DEBUG_INFO, "FspHeader - 0x%x\n", mFspHeader));\r
   if (mFspHeader == NULL) {\r
     return EFI_DEVICE_ERROR;\r