/** @file\r
Common header file for MP Initialize Library.\r
\r
- Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2016 - 2018, 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
//\r
// AP state\r
//\r
+// The state transitions for an AP when it process a procedure are:\r
+// Idle ----> Ready ----> Busy ----> Idle\r
+// [BSP] [AP] [AP]\r
+//\r
typedef enum {\r
CpuStateIdle,\r
CpuStateReady,\r
CpuStateBusy,\r
- CpuStateFinished,\r
CpuStateDisabled\r
} CPU_STATE;\r
\r
UINTN CpuApStackSize;\r
MP_ASSEMBLY_ADDRESS_MAP AddressMap;\r
UINTN WakeupBuffer;\r
+ UINTN WakeupBufferHigh;\r
UINTN BackupBuffer;\r
UINTN BackupBufferSize;\r
\r
BOOLEAN TimerInterruptState;\r
UINT64 MicrocodePatchAddress;\r
UINT64 MicrocodePatchRegionSize;\r
+\r
+ UINT32 ProcessorSignature;\r
+ UINT32 ProcessorFlags;\r
+ UINT64 MicrocodeDataAddress;\r
+ UINT32 MicrocodeRevision;\r
+\r
+ //\r
+ // Whether need to use Init-Sipi-Sipi to wake up the APs.\r
+ // Two cases need to set this value to TRUE. One is in HLT\r
+ // loop mode, the other is resume from S3 which loop mode\r
+ // will be hardcode change to HLT mode by PiSmmCpuDxeSmm \r
+ // driver.\r
+ //\r
+ BOOLEAN WakeUpByInitSipiSipi;\r
};\r
\r
extern EFI_GUID mCpuInitMpLibHobGuid;\r
enabled AP. Otherwise, it will be disabled.\r
\r
@retval EFI_SUCCESS BSP successfully switched.\r
- @retval others Failed to switch BSP. \r
+ @retval others Failed to switch BSP.\r
\r
**/\r
EFI_STATUS\r
/**\r
Detect whether specified processor can find matching microcode patch and load it.\r
\r
- @param[in] CpuMpData The pointer to CPU MP Data structure.\r
+ @param[in] CpuMpData The pointer to CPU MP Data structure.\r
+ @param[in] IsBspCallIn Indicate whether the caller is BSP or not.\r
**/\r
VOID\r
MicrocodeDetect (\r
- IN CPU_MP_DATA *CpuMpData\r
+ IN CPU_MP_DATA *CpuMpData,\r
+ IN BOOLEAN IsBspCallIn\r
);\r
\r
/**\r