]> git.proxmox.com Git - mirror_edk2.git/blame - UefiCpuPkg/Library/MpInitLib/MpLib.h
StandaloneMmPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / UefiCpuPkg / Library / MpInitLib / MpLib.h
CommitLineData
3e8ad6bd
JF
1/** @file\r
2 Common header file for MP Initialize Library.\r
3\r
7367cc6c 4 Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>\r
3e8ad6bd
JF
5 This program and the accompanying materials\r
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#ifndef _MP_LIB_H_\r
16#define _MP_LIB_H_\r
17\r
18#include <PiPei.h>\r
19\r
20#include <Register/Cpuid.h>\r
21#include <Register/Msr.h>\r
22#include <Register/LocalApic.h>\r
23#include <Register/Microcode.h>\r
24\r
25#include <Library/MpInitLib.h>\r
26#include <Library/BaseLib.h>\r
27#include <Library/BaseMemoryLib.h>\r
28#include <Library/MemoryAllocationLib.h>\r
29#include <Library/DebugLib.h>\r
30#include <Library/LocalApicLib.h>\r
31#include <Library/CpuLib.h>\r
32#include <Library/UefiCpuLib.h>\r
33#include <Library/TimerLib.h>\r
34#include <Library/SynchronizationLib.h>\r
35#include <Library/MtrrLib.h>\r
36#include <Library/HobLib.h>\r
37\r
b8b04307
JF
38#define WAKEUP_AP_SIGNAL SIGNATURE_32 ('S', 'T', 'A', 'P')\r
39\r
93ca4c0f
JF
40#define CPU_INIT_MP_LIB_HOB_GUID \\r
41 { \\r
42 0x58eb6a19, 0x3699, 0x4c68, { 0xa8, 0x36, 0xda, 0xcd, 0x8e, 0xdc, 0xad, 0x4a } \\r
43 }\r
44\r
41be0da5
JF
45//\r
46// The MP data for switch BSP\r
47//\r
48#define CPU_SWITCH_STATE_IDLE 0\r
49#define CPU_SWITCH_STATE_STORED 1\r
50#define CPU_SWITCH_STATE_LOADED 2\r
51\r
52//\r
53// CPU exchange information for switch BSP\r
54//\r
55typedef struct {\r
56 UINT8 State; // offset 0\r
57 UINTN StackPointer; // offset 4 / 8\r
58 IA32_DESCRIPTOR Gdtr; // offset 8 / 16\r
59 IA32_DESCRIPTOR Idtr; // offset 14 / 26\r
60} CPU_EXCHANGE_ROLE_INFO;\r
61\r
9ebcf0f4
JF
62//\r
63// AP loop state when APs are in idle state\r
64// It's value is the same with PcdCpuApLoopMode\r
65//\r
66typedef enum {\r
67 ApInHltLoop = 1,\r
68 ApInMwaitLoop = 2,\r
69 ApInRunLoop = 3\r
70} AP_LOOP_MODE;\r
71\r
e59f8f6b
JF
72//\r
73// AP initialization state during APs wakeup\r
74//\r
75typedef enum {\r
76 ApInitConfig = 1,\r
77 ApInitReconfig = 2,\r
78 ApInitDone = 3\r
79} AP_INIT_STATE;\r
80\r
03a1a925
JF
81//\r
82// AP state\r
83//\r
2a5997f8
ED
84// The state transitions for an AP when it process a procedure are:\r
85// Idle ----> Ready ----> Busy ----> Idle\r
86// [BSP] [AP] [AP]\r
87//\r
03a1a925
JF
88typedef enum {\r
89 CpuStateIdle,\r
90 CpuStateReady,\r
91 CpuStateBusy,\r
e048ce88 92 CpuStateFinished,\r
03a1a925
JF
93 CpuStateDisabled\r
94} CPU_STATE;\r
95\r
68cb9330
JF
96//\r
97// CPU volatile registers around INIT-SIPI-SIPI\r
98//\r
99typedef struct {\r
100 UINTN Cr0;\r
101 UINTN Cr3;\r
102 UINTN Cr4;\r
103 UINTN Dr0;\r
104 UINTN Dr1;\r
105 UINTN Dr2;\r
106 UINTN Dr3;\r
107 UINTN Dr6;\r
108 UINTN Dr7;\r
e9415e48
JW
109 IA32_DESCRIPTOR Gdtr;\r
110 IA32_DESCRIPTOR Idtr;\r
111 UINT16 Tr;\r
68cb9330
JF
112} CPU_VOLATILE_REGISTERS;\r
113\r
e59f8f6b
JF
114//\r
115// AP related data\r
116//\r
117typedef struct {\r
118 SPIN_LOCK ApLock;\r
119 volatile UINT32 *StartupApSignal;\r
120 volatile UINTN ApFunction;\r
121 volatile UINTN ApFunctionArgument;\r
e59f8f6b 122 BOOLEAN CpuHealthy;\r
03a1a925 123 volatile CPU_STATE State;\r
68cb9330 124 CPU_VOLATILE_REGISTERS VolatileRegisters;\r
e59f8f6b
JF
125 BOOLEAN Waiting;\r
126 BOOLEAN *Finished;\r
127 UINT64 ExpectedTime;\r
128 UINT64 CurrentTime;\r
129 UINT64 TotalTime;\r
130 EFI_EVENT WaitEvent;\r
131} CPU_AP_DATA;\r
132\r
133//\r
134// Basic CPU information saved in Guided HOB.\r
135// Because the contents will be shard between PEI and DXE,\r
136// we need to make sure the each fields offset same in different\r
137// architecture.\r
138//\r
dd3fa0cd 139#pragma pack (1)\r
e59f8f6b
JF
140typedef struct {\r
141 UINT32 InitialApicId;\r
142 UINT32 ApicId;\r
143 UINT32 Health;\r
dd3fa0cd 144 UINT64 ApTopOfStack;\r
e59f8f6b 145} CPU_INFO_IN_HOB;\r
dd3fa0cd 146#pragma pack ()\r
e59f8f6b 147\r
f7f85d83
JF
148//\r
149// AP reset code information including code address and size,\r
150// this structure will be shared be C code and assembly code.\r
151// It is natural aligned by design.\r
152//\r
153typedef struct {\r
154 UINT8 *RendezvousFunnelAddress;\r
155 UINTN ModeEntryOffset;\r
156 UINTN RendezvousFunnelSize;\r
157 UINT8 *RelocateApLoopFuncAddress;\r
158 UINTN RelocateApLoopFuncSize;\r
f32bfe6d 159 UINTN ModeTransitionOffset;\r
f7f85d83 160} MP_ASSEMBLY_ADDRESS_MAP;\r
3e8ad6bd 161\r
e59f8f6b
JF
162typedef struct _CPU_MP_DATA CPU_MP_DATA;\r
163\r
d94e5f67
JF
164#pragma pack(1)\r
165\r
166//\r
167// MP CPU exchange information for AP reset code\r
168// This structure is required to be packed because fixed field offsets\r
169// into this structure are used in assembly code in this module\r
170//\r
171typedef struct {\r
172 UINTN Lock;\r
173 UINTN StackStart;\r
174 UINTN StackSize;\r
175 UINTN CFunction;\r
176 IA32_DESCRIPTOR GdtrProfile;\r
177 IA32_DESCRIPTOR IdtrProfile;\r
178 UINTN BufferStart;\r
179 UINTN ModeOffset;\r
37676b9f 180 UINTN ApIndex;\r
d94e5f67
JF
181 UINTN CodeSegment;\r
182 UINTN DataSegment;\r
5c66d125 183 UINTN EnableExecuteDisable;\r
d94e5f67 184 UINTN Cr3;\r
46d4b885
JF
185 UINTN InitFlag;\r
186 CPU_INFO_IN_HOB *CpuInfo;\r
0594ec41 187 UINTN NumApsExecuting;\r
e59f8f6b 188 CPU_MP_DATA *CpuMpData;\r
3b2928b4 189 UINTN InitializeFloatingPointUnitsAddress;\r
f32bfe6d
JW
190 UINT32 ModeTransitionMemory;\r
191 UINT16 ModeTransitionSegment;\r
192 UINT32 ModeHighMemory;\r
193 UINT16 ModeHighSegment;\r
d94e5f67
JF
194} MP_CPU_EXCHANGE_INFO;\r
195\r
196#pragma pack()\r
e59f8f6b
JF
197\r
198//\r
199// CPU MP Data save in memory\r
200//\r
201struct _CPU_MP_DATA {\r
202 UINT64 CpuInfoInHob;\r
203 UINT32 CpuCount;\r
204 UINT32 BspNumber;\r
205 //\r
206 // The above fields data will be passed from PEI to DXE\r
207 // Please make sure the fields offset same in the different\r
208 // architecture.\r
209 //\r
210 SPIN_LOCK MpLock;\r
211 UINTN Buffer;\r
212 UINTN CpuApStackSize;\r
213 MP_ASSEMBLY_ADDRESS_MAP AddressMap;\r
214 UINTN WakeupBuffer;\r
66833b2a 215 UINTN WakeupBufferHigh;\r
e59f8f6b
JF
216 UINTN BackupBuffer;\r
217 UINTN BackupBufferSize;\r
e59f8f6b 218\r
e59f8f6b 219 volatile UINT32 FinishedCount;\r
2da3e96c 220 UINT32 RunningCount;\r
e59f8f6b
JF
221 BOOLEAN SingleThread;\r
222 EFI_AP_PROCEDURE Procedure;\r
223 VOID *ProcArguments;\r
224 BOOLEAN *Finished;\r
225 UINT64 ExpectedTime;\r
226 UINT64 CurrentTime;\r
227 UINT64 TotalTime;\r
228 EFI_EVENT WaitEvent;\r
229 UINTN **FailedCpuList;\r
230\r
231 AP_INIT_STATE InitFlag;\r
232 BOOLEAN X2ApicEnable;\r
41be0da5 233 BOOLEAN SwitchBspFlag;\r
b3775af2 234 UINTN NewBspNumber;\r
41be0da5
JF
235 CPU_EXCHANGE_ROLE_INFO BSPInfo;\r
236 CPU_EXCHANGE_ROLE_INFO APInfo;\r
e59f8f6b
JF
237 MTRR_SETTINGS MtrrTable;\r
238 UINT8 ApLoopMode;\r
239 UINT8 ApTargetCState;\r
240 UINT16 PmCodeSegment;\r
241 CPU_AP_DATA *CpuData;\r
242 volatile MP_CPU_EXCHANGE_INFO *MpCpuExchangeInfo;\r
ffab2442
JF
243\r
244 UINT32 CurrentTimerCount;\r
245 UINTN DivideValue;\r
246 UINT8 Vector;\r
247 BOOLEAN PeriodicMode;\r
248 BOOLEAN TimerInterruptState;\r
1e3f7a37
ED
249 UINT64 MicrocodePatchAddress;\r
250 UINT64 MicrocodePatchRegionSize;\r
2a089134
ED
251\r
252 UINT32 ProcessorSignature;\r
253 UINT32 ProcessorFlags;\r
254 UINT64 MicrocodeDataAddress;\r
255 UINT32 MicrocodeRevision;\r
58942277
ED
256\r
257 //\r
258 // Whether need to use Init-Sipi-Sipi to wake up the APs.\r
259 // Two cases need to set this value to TRUE. One is in HLT\r
260 // loop mode, the other is resume from S3 which loop mode\r
e23d9c3e 261 // will be hardcode change to HLT mode by PiSmmCpuDxeSmm\r
58942277
ED
262 // driver.\r
263 //\r
264 BOOLEAN WakeUpByInitSipiSipi;\r
e59f8f6b 265};\r
93ca4c0f
JF
266\r
267extern EFI_GUID mCpuInitMpLibHobGuid;\r
268\r
76157021
JF
269/**\r
270 Assembly code to place AP into safe loop mode.\r
271\r
272 Place AP into targeted C-State if MONITOR is supported, otherwise\r
273 place AP into hlt state.\r
274 Place AP in protected mode if the current is long mode. Due to AP maybe\r
275 wakeup by some hardware event. It could avoid accessing page table that\r
276 may not available during booting to OS.\r
277\r
278 @param[in] MwaitSupport TRUE indicates MONITOR is supported.\r
279 FALSE indicates MONITOR is not supported.\r
280 @param[in] ApTargetCState Target C-State value.\r
281 @param[in] PmCodeSegment Protected mode code segment value.\r
282**/\r
283typedef\r
284VOID\r
285(EFIAPI * ASM_RELOCATE_AP_LOOP) (\r
286 IN BOOLEAN MwaitSupport,\r
287 IN UINTN ApTargetCState,\r
bf2786dc 288 IN UINTN PmCodeSegment,\r
9f91cb01
JF
289 IN UINTN TopOfApStack,\r
290 IN UINTN NumberToFinish\r
76157021 291 );\r
f7f85d83
JF
292\r
293/**\r
294 Assembly code to get starting address and size of the rendezvous entry for APs.\r
295 Information for fixing a jump instruction in the code is also returned.\r
296\r
297 @param[out] AddressMap Output buffer for address map information.\r
298**/\r
299VOID\r
300EFIAPI\r
301AsmGetAddressMap (\r
302 OUT MP_ASSEMBLY_ADDRESS_MAP *AddressMap\r
303 );\r
304\r
41be0da5
JF
305/**\r
306 This function is called by both the BSP and the AP which is to become the BSP to\r
307 Exchange execution context including stack between them. After return from this\r
308 function, the BSP becomes AP and the AP becomes the BSP.\r
309\r
310 @param[in] MyInfo Pointer to buffer holding the exchanging information for the executing processor.\r
311 @param[in] OthersInfo Pointer to buffer holding the exchanging information for the peer.\r
312\r
313**/\r
314VOID\r
315EFIAPI\r
316AsmExchangeRole (\r
317 IN CPU_EXCHANGE_ROLE_INFO *MyInfo,\r
318 IN CPU_EXCHANGE_ROLE_INFO *OthersInfo\r
319 );\r
320\r
93ca4c0f
JF
321/**\r
322 Get the pointer to CPU MP Data structure.\r
323\r
324 @return The pointer to CPU MP Data structure.\r
325**/\r
326CPU_MP_DATA *\r
327GetCpuMpData (\r
328 VOID\r
329 );\r
330\r
331/**\r
332 Save the pointer to CPU MP Data structure.\r
333\r
334 @param[in] CpuMpData The pointer to CPU MP Data structure will be saved.\r
335**/\r
336VOID\r
337SaveCpuMpData (\r
338 IN CPU_MP_DATA *CpuMpData\r
339 );\r
340\r
ed66e0e3
JF
341\r
342/**\r
a6b3d753 343 Get available system memory below 1MB by specified size.\r
ed66e0e3 344\r
a6b3d753
SZ
345 @param[in] WakeupBufferSize Wakeup buffer size required\r
346\r
347 @retval other Return wakeup buffer address below 1MB.\r
348 @retval -1 Cannot find free memory below 1MB.\r
ed66e0e3 349**/\r
a6b3d753
SZ
350UINTN\r
351GetWakeupBuffer (\r
352 IN UINTN WakeupBufferSize\r
ed66e0e3
JF
353 );\r
354\r
f32bfe6d
JW
355/**\r
356 Get available EfiBootServicesCode memory below 4GB by specified size.\r
357\r
358 This buffer is required to safely transfer AP from real address mode to\r
359 protected mode or long mode, due to the fact that the buffer returned by\r
360 GetWakeupBuffer() may be marked as non-executable.\r
361\r
362 @param[in] BufferSize Wakeup transition buffer size.\r
363\r
364 @retval other Return wakeup transition buffer address below 4GB.\r
365 @retval 0 Cannot find free memory below 4GB.\r
366**/\r
367UINTN\r
368GetModeTransitionBuffer (\r
369 IN UINTN BufferSize\r
370 );\r
371\r
96f5920d
JF
372/**\r
373 This function will be called by BSP to wakeup AP.\r
374\r
375 @param[in] CpuMpData Pointer to CPU MP Data\r
376 @param[in] Broadcast TRUE: Send broadcast IPI to all APs\r
377 FALSE: Send IPI to AP by ApicId\r
378 @param[in] ProcessorNumber The handle number of specified processor\r
379 @param[in] Procedure The function to be invoked by AP\r
380 @param[in] ProcedureArgument The argument to be passed into AP function\r
cf4e79e4 381 @param[in] WakeUpDisabledAps Whether need to wake up disabled APs in broadcast mode.\r
96f5920d
JF
382**/\r
383VOID\r
384WakeUpAP (\r
385 IN CPU_MP_DATA *CpuMpData,\r
386 IN BOOLEAN Broadcast,\r
387 IN UINTN ProcessorNumber,\r
388 IN EFI_AP_PROCEDURE Procedure, OPTIONAL\r
cf4e79e4
ED
389 IN VOID *ProcedureArgument, OPTIONAL\r
390 IN BOOLEAN WakeUpDisabledAps OPTIONAL\r
96f5920d
JF
391 );\r
392\r
93ca4c0f
JF
393/**\r
394 Initialize global data for MP support.\r
395\r
396 @param[in] CpuMpData The pointer to CPU MP Data structure.\r
397**/\r
398VOID\r
399InitMpGlobalData (\r
400 IN CPU_MP_DATA *CpuMpData\r
401 );\r
402\r
86efe976
JF
403/**\r
404 Worker function to execute a caller provided function on all enabled APs.\r
405\r
406 @param[in] Procedure A pointer to the function to be run on\r
407 enabled APs of the system.\r
408 @param[in] SingleThread If TRUE, then all the enabled APs execute\r
409 the function specified by Procedure one by\r
410 one, in ascending order of processor handle\r
411 number. If FALSE, then all the enabled APs\r
412 execute the function specified by Procedure\r
413 simultaneously.\r
414 @param[in] WaitEvent The event created by the caller with CreateEvent()\r
415 service.\r
367284e7 416 @param[in] TimeoutInMicroseconds Indicates the time limit in microseconds for\r
86efe976
JF
417 APs to return from Procedure, either for\r
418 blocking or non-blocking mode.\r
419 @param[in] ProcedureArgument The parameter passed into Procedure for\r
420 all APs.\r
421 @param[out] FailedCpuList If all APs finish successfully, then its\r
422 content is set to NULL. If not all APs\r
423 finish before timeout expires, then its\r
424 content is set to address of the buffer\r
425 holding handle numbers of the failed APs.\r
426\r
427 @retval EFI_SUCCESS In blocking mode, all APs have finished before\r
428 the timeout expired.\r
429 @retval EFI_SUCCESS In non-blocking mode, function has been dispatched\r
430 to all enabled APs.\r
431 @retval others Failed to Startup all APs.\r
432\r
433**/\r
434EFI_STATUS\r
435StartupAllAPsWorker (\r
436 IN EFI_AP_PROCEDURE Procedure,\r
437 IN BOOLEAN SingleThread,\r
438 IN EFI_EVENT WaitEvent OPTIONAL,\r
439 IN UINTN TimeoutInMicroseconds,\r
440 IN VOID *ProcedureArgument OPTIONAL,\r
441 OUT UINTN **FailedCpuList OPTIONAL\r
442 );\r
443\r
20ae5774
JF
444/**\r
445 Worker function to let the caller get one enabled AP to execute a caller-provided\r
446 function.\r
447\r
448 @param[in] Procedure A pointer to the function to be run on\r
449 enabled APs of the system.\r
450 @param[in] ProcessorNumber The handle number of the AP.\r
451 @param[in] WaitEvent The event created by the caller with CreateEvent()\r
452 service.\r
367284e7 453 @param[in] TimeoutInMicroseconds Indicates the time limit in microseconds for\r
20ae5774
JF
454 APs to return from Procedure, either for\r
455 blocking or non-blocking mode.\r
456 @param[in] ProcedureArgument The parameter passed into Procedure for\r
457 all APs.\r
458 @param[out] Finished If AP returns from Procedure before the\r
459 timeout expires, its content is set to TRUE.\r
460 Otherwise, the value is set to FALSE.\r
461\r
462 @retval EFI_SUCCESS In blocking mode, specified AP finished before\r
463 the timeout expires.\r
464 @retval others Failed to Startup AP.\r
465\r
466**/\r
467EFI_STATUS\r
468StartupThisAPWorker (\r
469 IN EFI_AP_PROCEDURE Procedure,\r
470 IN UINTN ProcessorNumber,\r
471 IN EFI_EVENT WaitEvent OPTIONAL,\r
472 IN UINTN TimeoutInMicroseconds,\r
473 IN VOID *ProcedureArgument OPTIONAL,\r
474 OUT BOOLEAN *Finished OPTIONAL\r
475 );\r
476\r
41be0da5
JF
477/**\r
478 Worker function to switch the requested AP to be the BSP from that point onward.\r
479\r
480 @param[in] ProcessorNumber The handle number of AP that is to become the new BSP.\r
481 @param[in] EnableOldBSP If TRUE, then the old BSP will be listed as an\r
482 enabled AP. Otherwise, it will be disabled.\r
483\r
484 @retval EFI_SUCCESS BSP successfully switched.\r
7367cc6c 485 @retval others Failed to switch BSP.\r
41be0da5
JF
486\r
487**/\r
488EFI_STATUS\r
489SwitchBSPWorker (\r
490 IN UINTN ProcessorNumber,\r
491 IN BOOLEAN EnableOldBSP\r
492 );\r
493\r
e37109bc
JF
494/**\r
495 Worker function to let the caller enable or disable an AP from this point onward.\r
496 This service may only be called from the BSP.\r
497\r
498 @param[in] ProcessorNumber The handle number of AP.\r
499 @param[in] EnableAP Specifies the new state for the processor for\r
500 enabled, FALSE for disabled.\r
501 @param[in] HealthFlag If not NULL, a pointer to a value that specifies\r
502 the new health status of the AP.\r
503\r
504 @retval EFI_SUCCESS The specified AP was enabled or disabled successfully.\r
505 @retval others Failed to Enable/Disable AP.\r
506\r
507**/\r
508EFI_STATUS\r
509EnableDisableApWorker (\r
510 IN UINTN ProcessorNumber,\r
511 IN BOOLEAN EnableAP,\r
512 IN UINT32 *HealthFlag OPTIONAL\r
513 );\r
514\r
93ca4c0f
JF
515/**\r
516 Get pointer to CPU MP Data structure from GUIDed HOB.\r
517\r
518 @return The pointer to CPU MP Data structure.\r
519**/\r
520CPU_MP_DATA *\r
521GetCpuMpDataFromGuidedHob (\r
522 VOID\r
523 );\r
08085f08
JF
524\r
525/** Checks status of specified AP.\r
526\r
527 This function checks whether the specified AP has finished the task assigned\r
528 by StartupThisAP(), and whether timeout expires.\r
529\r
530 @param[in] ProcessorNumber The handle number of processor.\r
531\r
532 @retval EFI_SUCCESS Specified AP has finished task assigned by StartupThisAPs().\r
533 @retval EFI_TIMEOUT The timeout expires.\r
534 @retval EFI_NOT_READY Specified AP has not finished task and timeout has not expired.\r
535**/\r
536EFI_STATUS\r
537CheckThisAP (\r
538 IN UINTN ProcessorNumber\r
539 );\r
540\r
541/**\r
542 Checks status of all APs.\r
543\r
544 This function checks whether all APs have finished task assigned by StartupAllAPs(),\r
545 and whether timeout expires.\r
546\r
547 @retval EFI_SUCCESS All APs have finished task assigned by StartupAllAPs().\r
548 @retval EFI_TIMEOUT The timeout expires.\r
549 @retval EFI_NOT_READY APs have not finished task and timeout has not expired.\r
550**/\r
551EFI_STATUS\r
552CheckAllAPs (\r
553 VOID\r
554 );\r
555\r
556/**\r
557 Checks APs status and updates APs status if needed.\r
558\r
559**/\r
560VOID\r
561CheckAndUpdateApsStatus (\r
562 VOID\r
563 );\r
564\r
94f63c76
JF
565/**\r
566 Detect whether specified processor can find matching microcode patch and load it.\r
567\r
2a089134
ED
568 @param[in] CpuMpData The pointer to CPU MP Data structure.\r
569 @param[in] IsBspCallIn Indicate whether the caller is BSP or not.\r
94f63c76
JF
570**/\r
571VOID\r
572MicrocodeDetect (\r
2a089134
ED
573 IN CPU_MP_DATA *CpuMpData,\r
574 IN BOOLEAN IsBspCallIn\r
94f63c76
JF
575 );\r
576\r
4d3314f6
JF
577/**\r
578 Detect whether Mwait-monitor feature is supported.\r
579\r
580 @retval TRUE Mwait-monitor feature is supported.\r
581 @retval FALSE Mwait-monitor feature is not supported.\r
582**/\r
583BOOLEAN\r
584IsMwaitSupport (\r
585 VOID\r
586 );\r
587\r
43c9fdcc
JF
588/**\r
589 Enable Debug Agent to support source debugging on AP function.\r
590\r
591**/\r
592VOID\r
593EnableDebugAgent (\r
594 VOID\r
595 );\r
596\r
3e8ad6bd
JF
597#endif\r
598\r