/** @file\r
SMM CPU misc functions for x64 arch specific.\r
\r
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2016, 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
*GdtStepSize = GdtTableStepSize;\r
return GdtTssTables;\r
}\r
+\r
+/**\r
+ Transfer AP to safe hlt-loop after it finished restore CPU features on S3 patch.\r
+\r
+ @param[in] ApHltLoopCode The 32-bit address of the safe hlt-loop function.\r
+ @param[in] TopOfStack A pointer to the new stack to use for the ApHltLoopCode.\r
+\r
+**/\r
+VOID\r
+TransferApToSafeState (\r
+ IN UINT32 ApHltLoopCode,\r
+ IN UINT32 TopOfStack\r
+ )\r
+{\r
+ SwitchStack (\r
+ (SWITCH_STACK_ENTRY_POINT) (UINTN) ApHltLoopCode,\r
+ NULL,\r
+ NULL,\r
+ (VOID *) (UINTN) TopOfStack\r
+ );\r
+ //\r
+ // It should never reach here\r
+ //\r
+ ASSERT (FALSE);\r
+}\r
+\r
+\r