#include <Library/BaseMemoryLib.h>\r
#include <Library/UefiLib.h>\r
#include <Library/FspWrapperApiLib.h>\r
+#include <Library/FspWrapperPlatformLib.h>\r
#include <Library/PerformanceLib.h>\r
#include <Library/HobLib.h>\r
\r
PERF_START_EX(&gFspApiPerformanceGuid, "EventRec", NULL, 0, 0x6000);\r
Status = CallFspNotifyPhase (&NotifyPhaseParams);\r
PERF_END_EX(&gFspApiPerformanceGuid, "EventRec", NULL, 0, 0x607F);\r
+\r
+ //\r
+ // Reset the system if FSP API returned FSP_STATUS_RESET_REQUIRED status\r
+ //\r
+ if ((Status >= FSP_STATUS_RESET_REQUIRED_COLD) && (Status <= FSP_STATUS_RESET_REQUIRED_8)) {\r
+ DEBUG((DEBUG_INFO, "FSP NotifyPhase AfterPciEnumeration requested reset 0x%x\n", Status));\r
+ CallFspWrapperResetSystem ((UINT32)Status);\r
+ }\r
+\r
if (Status != EFI_SUCCESS) {\r
DEBUG((DEBUG_ERROR, "FSP NotifyPhase AfterPciEnumeration failed, status: 0x%x\n", Status));\r
} else {\r
PERF_START_EX(&gFspApiPerformanceGuid, "EventRec", NULL, 0, 0x4000);\r
Status = CallFspNotifyPhase (&NotifyPhaseParams);\r
PERF_END_EX(&gFspApiPerformanceGuid, "EventRec", NULL, 0, 0x407F);\r
+\r
+ //\r
+ // Reset the system if FSP API returned FSP_STATUS_RESET_REQUIRED status\r
+ //\r
+ if ((Status >= FSP_STATUS_RESET_REQUIRED_COLD) && (Status <= FSP_STATUS_RESET_REQUIRED_8)) {\r
+ DEBUG((DEBUG_INFO, "FSP NotifyPhase ReadyToBoot requested reset 0x%x\n", Status));\r
+ CallFspWrapperResetSystem ((UINT32)Status);\r
+ }\r
+\r
if (Status != EFI_SUCCESS) {\r
DEBUG((DEBUG_ERROR, "FSP NotifyPhase ReadyToBoot failed, status: 0x%x\n", Status));\r
} else {\r
PERF_START_EX(&gFspApiPerformanceGuid, "EventRec", NULL, 0, 0x2000);\r
Status = CallFspNotifyPhase (&NotifyPhaseParams);\r
PERF_END_EX(&gFspApiPerformanceGuid, "EventRec", NULL, 0, 0x207F);\r
+\r
+ //\r
+ // Reset the system if FSP API returned FSP_STATUS_RESET_REQUIRED status\r
+ //\r
+ if ((Status >= FSP_STATUS_RESET_REQUIRED_COLD) && (Status <= FSP_STATUS_RESET_REQUIRED_8)) {\r
+ DEBUG((DEBUG_INFO, "FSP NotifyPhase EndOfFirmware requested reset 0x%x\n", Status));\r
+ CallFspWrapperResetSystem ((UINT32)Status);\r
+ }\r
+\r
if (Status != EFI_SUCCESS) {\r
DEBUG((DEBUG_ERROR, "FSP NotifyPhase EndOfFirmware failed, status: 0x%x\n", Status));\r
} else {\r