]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
IntelFsp2Pkg: Support FSP Dispatch mode
[mirror_edk2.git] / IntelFsp2Pkg / Library / BaseFspCommonLib / FspCommonLib.c
index d0128304e6bafdaffe38e70d9674a6b5aea801df..64ffba1d16789f8a5f1fe62f2a2e24fc6e4bf170 100644 (file)
@@ -519,14 +519,16 @@ FspApiReturnStatusReset (
 \r
   LoopUntilReset = TRUE;\r
   DEBUG ((DEBUG_INFO, "FSP returning control to Bootloader with reset required return status %x\n",FspResetType));\r
-  ///\r
-  /// Below code is not an infinite loop.The control will go back to API calling function in BootLoader each time BootLoader\r
-  /// calls the FSP API without honoring the reset request by FSP\r
-  ///\r
-  do {\r
-    SetFspApiReturnStatus ((EFI_STATUS)FspResetType);\r
-    Pei2LoaderSwitchStack ();\r
-    DEBUG ((DEBUG_ERROR, "!!!ERROR: FSP has requested BootLoader for reset. But BootLoader has not honored the reset\n"));\r
-    DEBUG ((DEBUG_ERROR, "!!!ERROR: Please add support in BootLoader to honor the reset request from FSP\n"));\r
-  } while (LoopUntilReset);\r
+  if (GetFspGlobalDataPointer ()->FspMode == FSP_IN_API_MODE) {\r
+    ///\r
+    /// Below code is not an infinite loop.The control will go back to API calling function in BootLoader each time BootLoader\r
+    /// calls the FSP API without honoring the reset request by FSP\r
+    ///\r
+    do {\r
+      SetFspApiReturnStatus ((EFI_STATUS)FspResetType);\r
+      Pei2LoaderSwitchStack ();\r
+      DEBUG ((DEBUG_ERROR, "!!!ERROR: FSP has requested BootLoader for reset. But BootLoader has not honored the reset\n"));\r
+      DEBUG ((DEBUG_ERROR, "!!!ERROR: Please add support in BootLoader to honor the reset request from FSP\n"));\r
+    } while (LoopUntilReset);\r
+  }\r
 }\r