]> git.proxmox.com Git - mirror_edk2.git/blob - UefiCpuPkg/Library/MpInitLib/MpLib.h
UefiCpuPkg: Allow AP booting under SEV-ES
[mirror_edk2.git] / UefiCpuPkg / Library / MpInitLib / MpLib.h
1 /** @file
2 Common header file for MP Initialize Library.
3
4 Copyright (c) 2016 - 2020, Intel Corporation. All rights reserved.<BR>
5 Copyright (c) 2020, AMD Inc. All rights reserved.<BR>
6
7 SPDX-License-Identifier: BSD-2-Clause-Patent
8
9 **/
10
11 #ifndef _MP_LIB_H_
12 #define _MP_LIB_H_
13
14 #include <PiPei.h>
15
16 #include <Register/Intel/Cpuid.h>
17 #include <Register/Amd/Cpuid.h>
18 #include <Register/Intel/Msr.h>
19 #include <Register/Intel/LocalApic.h>
20 #include <Register/Intel/Microcode.h>
21
22 #include <Library/MpInitLib.h>
23 #include <Library/BaseLib.h>
24 #include <Library/BaseMemoryLib.h>
25 #include <Library/MemoryAllocationLib.h>
26 #include <Library/DebugLib.h>
27 #include <Library/LocalApicLib.h>
28 #include <Library/CpuLib.h>
29 #include <Library/UefiCpuLib.h>
30 #include <Library/TimerLib.h>
31 #include <Library/SynchronizationLib.h>
32 #include <Library/MtrrLib.h>
33 #include <Library/HobLib.h>
34 #include <Library/PcdLib.h>
35
36 #include <Guid/MicrocodePatchHob.h>
37
38 #define WAKEUP_AP_SIGNAL SIGNATURE_32 ('S', 'T', 'A', 'P')
39
40 #define CPU_INIT_MP_LIB_HOB_GUID \
41 { \
42 0x58eb6a19, 0x3699, 0x4c68, { 0xa8, 0x36, 0xda, 0xcd, 0x8e, 0xdc, 0xad, 0x4a } \
43 }
44
45 //
46 // The MP data for switch BSP
47 //
48 #define CPU_SWITCH_STATE_IDLE 0
49 #define CPU_SWITCH_STATE_STORED 1
50 #define CPU_SWITCH_STATE_LOADED 2
51
52 //
53 // Default maximum number of entries to store the microcode patches information
54 //
55 #define DEFAULT_MAX_MICROCODE_PATCH_NUM 8
56
57 //
58 // Data structure for microcode patch information
59 //
60 typedef struct {
61 UINTN Address;
62 UINTN Size;
63 } MICROCODE_PATCH_INFO;
64
65 //
66 // CPU exchange information for switch BSP
67 //
68 typedef struct {
69 UINT8 State; // offset 0
70 UINTN StackPointer; // offset 4 / 8
71 IA32_DESCRIPTOR Gdtr; // offset 8 / 16
72 IA32_DESCRIPTOR Idtr; // offset 14 / 26
73 } CPU_EXCHANGE_ROLE_INFO;
74
75 //
76 // AP loop state when APs are in idle state
77 // It's value is the same with PcdCpuApLoopMode
78 //
79 typedef enum {
80 ApInHltLoop = 1,
81 ApInMwaitLoop = 2,
82 ApInRunLoop = 3
83 } AP_LOOP_MODE;
84
85 //
86 // AP initialization state during APs wakeup
87 //
88 typedef enum {
89 ApInitConfig = 1,
90 ApInitReconfig = 2,
91 ApInitDone = 3
92 } AP_INIT_STATE;
93
94 //
95 // AP state
96 //
97 // The state transitions for an AP when it process a procedure are:
98 // Idle ----> Ready ----> Busy ----> Idle
99 // [BSP] [AP] [AP]
100 //
101 typedef enum {
102 CpuStateIdle,
103 CpuStateReady,
104 CpuStateBusy,
105 CpuStateFinished,
106 CpuStateDisabled
107 } CPU_STATE;
108
109 //
110 // CPU volatile registers around INIT-SIPI-SIPI
111 //
112 typedef struct {
113 UINTN Cr0;
114 UINTN Cr3;
115 UINTN Cr4;
116 UINTN Dr0;
117 UINTN Dr1;
118 UINTN Dr2;
119 UINTN Dr3;
120 UINTN Dr6;
121 UINTN Dr7;
122 IA32_DESCRIPTOR Gdtr;
123 IA32_DESCRIPTOR Idtr;
124 UINT16 Tr;
125 } CPU_VOLATILE_REGISTERS;
126
127 //
128 // AP related data
129 //
130 typedef struct {
131 SPIN_LOCK ApLock;
132 volatile UINT32 *StartupApSignal;
133 volatile UINTN ApFunction;
134 volatile UINTN ApFunctionArgument;
135 BOOLEAN CpuHealthy;
136 volatile CPU_STATE State;
137 CPU_VOLATILE_REGISTERS VolatileRegisters;
138 BOOLEAN Waiting;
139 BOOLEAN *Finished;
140 UINT64 ExpectedTime;
141 UINT64 CurrentTime;
142 UINT64 TotalTime;
143 EFI_EVENT WaitEvent;
144 UINT32 ProcessorSignature;
145 UINT8 PlatformId;
146 UINT64 MicrocodeEntryAddr;
147 } CPU_AP_DATA;
148
149 //
150 // Basic CPU information saved in Guided HOB.
151 // Because the contents will be shard between PEI and DXE,
152 // we need to make sure the each fields offset same in different
153 // architecture.
154 //
155 #pragma pack (1)
156 typedef struct {
157 UINT32 InitialApicId;
158 UINT32 ApicId;
159 UINT32 Health;
160 UINT64 ApTopOfStack;
161 } CPU_INFO_IN_HOB;
162 #pragma pack ()
163
164 //
165 // AP reset code information including code address and size,
166 // this structure will be shared be C code and assembly code.
167 // It is natural aligned by design.
168 //
169 typedef struct {
170 UINT8 *RendezvousFunnelAddress;
171 UINTN ModeEntryOffset;
172 UINTN RendezvousFunnelSize;
173 UINT8 *RelocateApLoopFuncAddress;
174 UINTN RelocateApLoopFuncSize;
175 UINTN ModeTransitionOffset;
176 UINTN SwitchToRealSize;
177 UINTN SwitchToRealOffset;
178 UINTN SwitchToRealNoNxOffset;
179 UINTN SwitchToRealPM16ModeOffset;
180 UINTN SwitchToRealPM16ModeSize;
181 } MP_ASSEMBLY_ADDRESS_MAP;
182
183 typedef struct _CPU_MP_DATA CPU_MP_DATA;
184
185 #pragma pack(1)
186
187 //
188 // MP CPU exchange information for AP reset code
189 // This structure is required to be packed because fixed field offsets
190 // into this structure are used in assembly code in this module
191 //
192 typedef struct {
193 UINTN Lock;
194 UINTN StackStart;
195 UINTN StackSize;
196 UINTN CFunction;
197 IA32_DESCRIPTOR GdtrProfile;
198 IA32_DESCRIPTOR IdtrProfile;
199 UINTN BufferStart;
200 UINTN ModeOffset;
201 UINTN ApIndex;
202 UINTN CodeSegment;
203 UINTN DataSegment;
204 UINTN EnableExecuteDisable;
205 UINTN Cr3;
206 UINTN InitFlag;
207 CPU_INFO_IN_HOB *CpuInfo;
208 UINTN NumApsExecuting;
209 CPU_MP_DATA *CpuMpData;
210 UINTN InitializeFloatingPointUnitsAddress;
211 UINT32 ModeTransitionMemory;
212 UINT16 ModeTransitionSegment;
213 UINT32 ModeHighMemory;
214 UINT16 ModeHighSegment;
215 //
216 // Enable5LevelPaging indicates whether 5-level paging is enabled in long mode.
217 //
218 BOOLEAN Enable5LevelPaging;
219 BOOLEAN SevEsIsEnabled;
220 UINTN GhcbBase;
221 } MP_CPU_EXCHANGE_INFO;
222
223 #pragma pack()
224
225 //
226 // CPU MP Data save in memory
227 //
228 struct _CPU_MP_DATA {
229 UINT64 CpuInfoInHob;
230 UINT32 CpuCount;
231 UINT32 BspNumber;
232 //
233 // The above fields data will be passed from PEI to DXE
234 // Please make sure the fields offset same in the different
235 // architecture.
236 //
237 SPIN_LOCK MpLock;
238 UINTN Buffer;
239 UINTN CpuApStackSize;
240 MP_ASSEMBLY_ADDRESS_MAP AddressMap;
241 UINTN WakeupBuffer;
242 UINTN WakeupBufferHigh;
243 UINTN BackupBuffer;
244 UINTN BackupBufferSize;
245
246 volatile UINT32 FinishedCount;
247 UINT32 RunningCount;
248 BOOLEAN SingleThread;
249 EFI_AP_PROCEDURE Procedure;
250 VOID *ProcArguments;
251 BOOLEAN *Finished;
252 UINT64 ExpectedTime;
253 UINT64 CurrentTime;
254 UINT64 TotalTime;
255 EFI_EVENT WaitEvent;
256 UINTN **FailedCpuList;
257
258 AP_INIT_STATE InitFlag;
259 BOOLEAN SwitchBspFlag;
260 UINTN NewBspNumber;
261 CPU_EXCHANGE_ROLE_INFO BSPInfo;
262 CPU_EXCHANGE_ROLE_INFO APInfo;
263 MTRR_SETTINGS MtrrTable;
264 UINT8 ApLoopMode;
265 UINT8 ApTargetCState;
266 UINT16 PmCodeSegment;
267 UINT16 Pm16CodeSegment;
268 CPU_AP_DATA *CpuData;
269 volatile MP_CPU_EXCHANGE_INFO *MpCpuExchangeInfo;
270
271 UINT32 CurrentTimerCount;
272 UINTN DivideValue;
273 UINT8 Vector;
274 BOOLEAN PeriodicMode;
275 BOOLEAN TimerInterruptState;
276 UINT64 MicrocodePatchAddress;
277 UINT64 MicrocodePatchRegionSize;
278
279 //
280 // Whether need to use Init-Sipi-Sipi to wake up the APs.
281 // Two cases need to set this value to TRUE. One is in HLT
282 // loop mode, the other is resume from S3 which loop mode
283 // will be hardcode change to HLT mode by PiSmmCpuDxeSmm
284 // driver.
285 //
286 BOOLEAN WakeUpByInitSipiSipi;
287
288 BOOLEAN SevEsIsEnabled;
289 UINTN SevEsAPBuffer;
290 UINTN SevEsAPResetStackStart;
291 CPU_MP_DATA *NewCpuMpData;
292
293 UINT64 GhcbBase;
294 };
295
296 #define AP_RESET_STACK_SIZE 64
297
298 #pragma pack(1)
299
300 typedef struct {
301 UINT8 InsnBuffer[8];
302 UINT16 Rip;
303 UINT16 Segment;
304 } SEV_ES_AP_JMP_FAR;
305
306 #pragma pack()
307
308 /**
309 Assembly code to move an AP from long mode to real mode.
310
311 Move an AP from long mode to real mode in preparation to invoking
312 the reset vector. This is used for SEV-ES guests where a hypervisor
313 is not allowed to set the CS and RIP to point to the reset vector.
314
315 @param[in] BufferStart The reset vector target.
316 @param[in] Code16 16-bit protected mode code segment value.
317 @param[in] Code32 32-bit protected mode code segment value.
318 @param[in] StackStart The start of a stack to be used for transitioning
319 from long mode to real mode.
320 **/
321 typedef
322 VOID
323 (EFIAPI AP_RESET) (
324 IN UINTN BufferStart,
325 IN UINT16 Code16,
326 IN UINT16 Code32,
327 IN UINTN StackStart
328 );
329
330 extern EFI_GUID mCpuInitMpLibHobGuid;
331
332 /**
333 Assembly code to place AP into safe loop mode.
334
335 Place AP into targeted C-State if MONITOR is supported, otherwise
336 place AP into hlt state.
337 Place AP in protected mode if the current is long mode. Due to AP maybe
338 wakeup by some hardware event. It could avoid accessing page table that
339 may not available during booting to OS.
340
341 @param[in] MwaitSupport TRUE indicates MONITOR is supported.
342 FALSE indicates MONITOR is not supported.
343 @param[in] ApTargetCState Target C-State value.
344 @param[in] PmCodeSegment Protected mode code segment value.
345 **/
346 typedef
347 VOID
348 (EFIAPI * ASM_RELOCATE_AP_LOOP) (
349 IN BOOLEAN MwaitSupport,
350 IN UINTN ApTargetCState,
351 IN UINTN PmCodeSegment,
352 IN UINTN TopOfApStack,
353 IN UINTN NumberToFinish
354 );
355
356 /**
357 Assembly code to get starting address and size of the rendezvous entry for APs.
358 Information for fixing a jump instruction in the code is also returned.
359
360 @param[out] AddressMap Output buffer for address map information.
361 **/
362 VOID
363 EFIAPI
364 AsmGetAddressMap (
365 OUT MP_ASSEMBLY_ADDRESS_MAP *AddressMap
366 );
367
368 /**
369 This function is called by both the BSP and the AP which is to become the BSP to
370 Exchange execution context including stack between them. After return from this
371 function, the BSP becomes AP and the AP becomes the BSP.
372
373 @param[in] MyInfo Pointer to buffer holding the exchanging information for the executing processor.
374 @param[in] OthersInfo Pointer to buffer holding the exchanging information for the peer.
375
376 **/
377 VOID
378 EFIAPI
379 AsmExchangeRole (
380 IN CPU_EXCHANGE_ROLE_INFO *MyInfo,
381 IN CPU_EXCHANGE_ROLE_INFO *OthersInfo
382 );
383
384 /**
385 Get the pointer to CPU MP Data structure.
386
387 @return The pointer to CPU MP Data structure.
388 **/
389 CPU_MP_DATA *
390 GetCpuMpData (
391 VOID
392 );
393
394 /**
395 Save the pointer to CPU MP Data structure.
396
397 @param[in] CpuMpData The pointer to CPU MP Data structure will be saved.
398 **/
399 VOID
400 SaveCpuMpData (
401 IN CPU_MP_DATA *CpuMpData
402 );
403
404
405 /**
406 Get available system memory below 1MB by specified size.
407
408 @param[in] WakeupBufferSize Wakeup buffer size required
409
410 @retval other Return wakeup buffer address below 1MB.
411 @retval -1 Cannot find free memory below 1MB.
412 **/
413 UINTN
414 GetWakeupBuffer (
415 IN UINTN WakeupBufferSize
416 );
417
418 /**
419 Get available EfiBootServicesCode memory below 4GB by specified size.
420
421 This buffer is required to safely transfer AP from real address mode to
422 protected mode or long mode, due to the fact that the buffer returned by
423 GetWakeupBuffer() may be marked as non-executable.
424
425 @param[in] BufferSize Wakeup transition buffer size.
426
427 @retval other Return wakeup transition buffer address below 4GB.
428 @retval 0 Cannot find free memory below 4GB.
429 **/
430 UINTN
431 GetModeTransitionBuffer (
432 IN UINTN BufferSize
433 );
434
435 /**
436 Return the address of the SEV-ES AP jump table.
437
438 This buffer is required in order for an SEV-ES guest to transition from
439 UEFI into an OS.
440
441 @return Return SEV-ES AP jump table buffer
442 **/
443 UINTN
444 GetSevEsAPMemory (
445 VOID
446 );
447
448 /**
449 This function will be called by BSP to wakeup AP.
450
451 @param[in] CpuMpData Pointer to CPU MP Data
452 @param[in] Broadcast TRUE: Send broadcast IPI to all APs
453 FALSE: Send IPI to AP by ApicId
454 @param[in] ProcessorNumber The handle number of specified processor
455 @param[in] Procedure The function to be invoked by AP
456 @param[in] ProcedureArgument The argument to be passed into AP function
457 @param[in] WakeUpDisabledAps Whether need to wake up disabled APs in broadcast mode.
458 **/
459 VOID
460 WakeUpAP (
461 IN CPU_MP_DATA *CpuMpData,
462 IN BOOLEAN Broadcast,
463 IN UINTN ProcessorNumber,
464 IN EFI_AP_PROCEDURE Procedure, OPTIONAL
465 IN VOID *ProcedureArgument, OPTIONAL
466 IN BOOLEAN WakeUpDisabledAps OPTIONAL
467 );
468
469 /**
470 Initialize global data for MP support.
471
472 @param[in] CpuMpData The pointer to CPU MP Data structure.
473 **/
474 VOID
475 InitMpGlobalData (
476 IN CPU_MP_DATA *CpuMpData
477 );
478
479 /**
480 Worker function to execute a caller provided function on all enabled APs.
481
482 @param[in] Procedure A pointer to the function to be run on
483 enabled APs of the system.
484 @param[in] SingleThread If TRUE, then all the enabled APs execute
485 the function specified by Procedure one by
486 one, in ascending order of processor handle
487 number. If FALSE, then all the enabled APs
488 execute the function specified by Procedure
489 simultaneously.
490 @param[in] ExcludeBsp Whether let BSP also trig this task.
491 @param[in] WaitEvent The event created by the caller with CreateEvent()
492 service.
493 @param[in] TimeoutInMicroseconds Indicates the time limit in microseconds for
494 APs to return from Procedure, either for
495 blocking or non-blocking mode.
496 @param[in] ProcedureArgument The parameter passed into Procedure for
497 all APs.
498 @param[out] FailedCpuList If all APs finish successfully, then its
499 content is set to NULL. If not all APs
500 finish before timeout expires, then its
501 content is set to address of the buffer
502 holding handle numbers of the failed APs.
503
504 @retval EFI_SUCCESS In blocking mode, all APs have finished before
505 the timeout expired.
506 @retval EFI_SUCCESS In non-blocking mode, function has been dispatched
507 to all enabled APs.
508 @retval others Failed to Startup all APs.
509
510 **/
511 EFI_STATUS
512 StartupAllCPUsWorker (
513 IN EFI_AP_PROCEDURE Procedure,
514 IN BOOLEAN SingleThread,
515 IN BOOLEAN ExcludeBsp,
516 IN EFI_EVENT WaitEvent OPTIONAL,
517 IN UINTN TimeoutInMicroseconds,
518 IN VOID *ProcedureArgument OPTIONAL,
519 OUT UINTN **FailedCpuList OPTIONAL
520 );
521
522 /**
523 Worker function to let the caller get one enabled AP to execute a caller-provided
524 function.
525
526 @param[in] Procedure A pointer to the function to be run on
527 enabled APs of the system.
528 @param[in] ProcessorNumber The handle number of the AP.
529 @param[in] WaitEvent The event created by the caller with CreateEvent()
530 service.
531 @param[in] TimeoutInMicroseconds Indicates the time limit in microseconds for
532 APs to return from Procedure, either for
533 blocking or non-blocking mode.
534 @param[in] ProcedureArgument The parameter passed into Procedure for
535 all APs.
536 @param[out] Finished If AP returns from Procedure before the
537 timeout expires, its content is set to TRUE.
538 Otherwise, the value is set to FALSE.
539
540 @retval EFI_SUCCESS In blocking mode, specified AP finished before
541 the timeout expires.
542 @retval others Failed to Startup AP.
543
544 **/
545 EFI_STATUS
546 StartupThisAPWorker (
547 IN EFI_AP_PROCEDURE Procedure,
548 IN UINTN ProcessorNumber,
549 IN EFI_EVENT WaitEvent OPTIONAL,
550 IN UINTN TimeoutInMicroseconds,
551 IN VOID *ProcedureArgument OPTIONAL,
552 OUT BOOLEAN *Finished OPTIONAL
553 );
554
555 /**
556 Worker function to switch the requested AP to be the BSP from that point onward.
557
558 @param[in] ProcessorNumber The handle number of AP that is to become the new BSP.
559 @param[in] EnableOldBSP If TRUE, then the old BSP will be listed as an
560 enabled AP. Otherwise, it will be disabled.
561
562 @retval EFI_SUCCESS BSP successfully switched.
563 @retval others Failed to switch BSP.
564
565 **/
566 EFI_STATUS
567 SwitchBSPWorker (
568 IN UINTN ProcessorNumber,
569 IN BOOLEAN EnableOldBSP
570 );
571
572 /**
573 Worker function to let the caller enable or disable an AP from this point onward.
574 This service may only be called from the BSP.
575
576 @param[in] ProcessorNumber The handle number of AP.
577 @param[in] EnableAP Specifies the new state for the processor for
578 enabled, FALSE for disabled.
579 @param[in] HealthFlag If not NULL, a pointer to a value that specifies
580 the new health status of the AP.
581
582 @retval EFI_SUCCESS The specified AP was enabled or disabled successfully.
583 @retval others Failed to Enable/Disable AP.
584
585 **/
586 EFI_STATUS
587 EnableDisableApWorker (
588 IN UINTN ProcessorNumber,
589 IN BOOLEAN EnableAP,
590 IN UINT32 *HealthFlag OPTIONAL
591 );
592
593 /**
594 Get pointer to CPU MP Data structure from GUIDed HOB.
595
596 @return The pointer to CPU MP Data structure.
597 **/
598 CPU_MP_DATA *
599 GetCpuMpDataFromGuidedHob (
600 VOID
601 );
602
603 /** Checks status of specified AP.
604
605 This function checks whether the specified AP has finished the task assigned
606 by StartupThisAP(), and whether timeout expires.
607
608 @param[in] ProcessorNumber The handle number of processor.
609
610 @retval EFI_SUCCESS Specified AP has finished task assigned by StartupThisAPs().
611 @retval EFI_TIMEOUT The timeout expires.
612 @retval EFI_NOT_READY Specified AP has not finished task and timeout has not expired.
613 **/
614 EFI_STATUS
615 CheckThisAP (
616 IN UINTN ProcessorNumber
617 );
618
619 /**
620 Checks status of all APs.
621
622 This function checks whether all APs have finished task assigned by StartupAllAPs(),
623 and whether timeout expires.
624
625 @retval EFI_SUCCESS All APs have finished task assigned by StartupAllAPs().
626 @retval EFI_TIMEOUT The timeout expires.
627 @retval EFI_NOT_READY APs have not finished task and timeout has not expired.
628 **/
629 EFI_STATUS
630 CheckAllAPs (
631 VOID
632 );
633
634 /**
635 Checks APs status and updates APs status if needed.
636
637 **/
638 VOID
639 CheckAndUpdateApsStatus (
640 VOID
641 );
642
643 /**
644 Detect whether specified processor can find matching microcode patch and load it.
645
646 @param[in] CpuMpData The pointer to CPU MP Data structure.
647 @param[in] ProcessorNumber The handle number of the processor. The range is
648 from 0 to the total number of logical processors
649 minus 1.
650 **/
651 VOID
652 MicrocodeDetect (
653 IN CPU_MP_DATA *CpuMpData,
654 IN UINTN ProcessorNumber
655 );
656
657 /**
658 Shadow the required microcode patches data into memory.
659
660 @param[in, out] CpuMpData The pointer to CPU MP Data structure.
661 **/
662 VOID
663 ShadowMicrocodeUpdatePatch (
664 IN OUT CPU_MP_DATA *CpuMpData
665 );
666
667 /**
668 Get the cached microcode patch base address and size from the microcode patch
669 information cache HOB.
670
671 @param[out] Address Base address of the microcode patches data.
672 It will be updated if the microcode patch
673 information cache HOB is found.
674 @param[out] RegionSize Size of the microcode patches data.
675 It will be updated if the microcode patch
676 information cache HOB is found.
677
678 @retval TRUE The microcode patch information cache HOB is found.
679 @retval FALSE The microcode patch information cache HOB is not found.
680
681 **/
682 BOOLEAN
683 GetMicrocodePatchInfoFromHob (
684 UINT64 *Address,
685 UINT64 *RegionSize
686 );
687
688 /**
689 Detect whether Mwait-monitor feature is supported.
690
691 @retval TRUE Mwait-monitor feature is supported.
692 @retval FALSE Mwait-monitor feature is not supported.
693 **/
694 BOOLEAN
695 IsMwaitSupport (
696 VOID
697 );
698
699 /**
700 Enable Debug Agent to support source debugging on AP function.
701
702 **/
703 VOID
704 EnableDebugAgent (
705 VOID
706 );
707
708 /**
709 Find the current Processor number by APIC ID.
710
711 @param[in] CpuMpData Pointer to PEI CPU MP Data
712 @param[out] ProcessorNumber Return the pocessor number found
713
714 @retval EFI_SUCCESS ProcessorNumber is found and returned.
715 @retval EFI_NOT_FOUND ProcessorNumber is not found.
716 **/
717 EFI_STATUS
718 GetProcessorNumber (
719 IN CPU_MP_DATA *CpuMpData,
720 OUT UINTN *ProcessorNumber
721 );
722
723 /**
724 This funtion will try to invoke platform specific microcode shadow logic to
725 relocate microcode update patches into memory.
726
727 @param[in, out] CpuMpData The pointer to CPU MP Data structure.
728
729 @retval EFI_SUCCESS Shadow microcode success.
730 @retval EFI_OUT_OF_RESOURCES No enough resource to complete the operation.
731 @retval EFI_UNSUPPORTED Can't find platform specific microcode shadow
732 PPI/Protocol.
733 **/
734 EFI_STATUS
735 PlatformShadowMicrocode (
736 IN OUT CPU_MP_DATA *CpuMpData
737 );
738
739 #endif
740