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