CPU_REGISTER_TABLE *RegisterTableList;\r
UINT32 InitApicId;\r
UINTN Index;\r
- UINT32 TopOfStack;\r
+ UINTN TopOfStack;\r
UINT8 Stack[128];\r
\r
ProgramVirtualWireMode ();\r
//\r
// Place AP into the safe code, count down the number with lock mechanism in the safe code.\r
//\r
- TopOfStack = (UINT32) (UINTN) Stack + sizeof (Stack);\r
- TopOfStack &= ~(UINT32) (CPU_STACK_ALIGNMENT - 1);\r
+ TopOfStack = (UINTN) Stack + sizeof (Stack);\r
+ TopOfStack &= ~(UINTN) (CPU_STACK_ALIGNMENT - 1);\r
CopyMem ((VOID *) (UINTN) mApHltLoopCode, mApHltLoopCodeTemplate, sizeof (mApHltLoopCodeTemplate));\r
- TransferApToSafeState ((UINT32) (UINTN) mApHltLoopCode, TopOfStack, &mNumberToFinish);\r
+ TransferApToSafeState ((UINTN)mApHltLoopCode, TopOfStack, (UINTN)&mNumberToFinish);\r
}\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
- @param[in] NumberToFinish Semaphore of APs finish count.\r
+ @param[in] ApHltLoopCode The address of the safe hlt-loop function.\r
+ @param[in] TopOfStack A pointer to the new stack to use for the ApHltLoopCode.\r
+ @param[in] NumberToFinishAddress Address of Semaphore of APs finish count.\r
\r
**/\r
VOID\r
TransferApToSafeState (\r
- IN UINT32 ApHltLoopCode,\r
- IN UINT32 TopOfStack,\r
- IN UINT32 *NumberToFinish\r
+ IN UINTN ApHltLoopCode,\r
+ IN UINTN TopOfStack,\r
+ IN UINTN NumberToFinishAddress\r
)\r
{\r
SwitchStack (\r
- (SWITCH_STACK_ENTRY_POINT) (UINTN) ApHltLoopCode,\r
- NumberToFinish,\r
+ (SWITCH_STACK_ENTRY_POINT)ApHltLoopCode,\r
+ (VOID *)NumberToFinishAddress,\r
NULL,\r
- (VOID *) (UINTN) TopOfStack\r
+ (VOID *)TopOfStack\r
);\r
//\r
// It should never reach here\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
- @param[in] NumberToFinish Semaphore of APs finish count.\r
+ @param[in] ApHltLoopCode The address of the safe hlt-loop function.\r
+ @param[in] TopOfStack A pointer to the new stack to use for the ApHltLoopCode.\r
+ @param[in] NumberToFinishAddress Address of Semaphore of APs finish count.\r
\r
**/\r
VOID\r
TransferApToSafeState (\r
- IN UINT32 ApHltLoopCode,\r
- IN UINT32 TopOfStack,\r
- IN UINT32 *NumberToFinish\r
+ IN UINTN ApHltLoopCode,\r
+ IN UINTN TopOfStack,\r
+ IN UINTN NumberToFinishAddress\r
);\r
\r
#endif\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
- @param[in] NumberToFinish Semaphore of APs finish count.\r
+ @param[in] ApHltLoopCode The address of the safe hlt-loop function.\r
+ @param[in] TopOfStack A pointer to the new stack to use for the ApHltLoopCode.\r
+ @param[in] NumberToFinishAddress Address of Semaphore of APs finish count.\r
\r
**/\r
VOID\r
TransferApToSafeState (\r
- IN UINT32 ApHltLoopCode,\r
- IN UINT32 TopOfStack,\r
- IN UINT32 *NumberToFinish\r
+ IN UINTN ApHltLoopCode,\r
+ IN UINTN TopOfStack,\r
+ IN UINTN NumberToFinishAddress\r
)\r
{\r
AsmDisablePaging64 (\r
GetProtectedModeCS (),\r
- (UINT32) (UINTN) ApHltLoopCode,\r
- (UINT32) (UINTN) NumberToFinish,\r
+ (UINT32)ApHltLoopCode,\r
+ (UINT32)NumberToFinishAddress,\r
0,\r
- TopOfStack\r
+ (UINT32)TopOfStack\r
);\r
//\r
// It should never reach here\r