]> git.proxmox.com Git - mirror_edk2.git/blob - UefiCpuPkg/Library/MpInitLib/MpLib.h
UefiCpuPkg/MpInitLib: Remove unused Lock from MP_CPU_EXCHANGE_INFO
[mirror_edk2.git] / UefiCpuPkg / Library / MpInitLib / MpLib.h
1 /** @file
2 Common header file for MP Initialize Library.
3
4 Copyright (c) 2016 - 2021, 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 StackStart;
194 UINTN StackSize;
195 UINTN CFunction;
196 IA32_DESCRIPTOR GdtrProfile;
197 IA32_DESCRIPTOR IdtrProfile;
198 UINTN BufferStart;
199 UINTN ModeOffset;
200 UINTN ApIndex;
201 UINTN CodeSegment;
202 UINTN DataSegment;
203 UINTN EnableExecuteDisable;
204 UINTN Cr3;
205 UINTN InitFlag;
206 CPU_INFO_IN_HOB *CpuInfo;
207 UINTN NumApsExecuting;
208 CPU_MP_DATA *CpuMpData;
209 UINTN InitializeFloatingPointUnitsAddress;
210 UINT32 ModeTransitionMemory;
211 UINT16 ModeTransitionSegment;
212 UINT32 ModeHighMemory;
213 UINT16 ModeHighSegment;
214 //
215 // Enable5LevelPaging indicates whether 5-level paging is enabled in long mode.
216 //
217 BOOLEAN Enable5LevelPaging;
218 BOOLEAN SevEsIsEnabled;
219 UINTN GhcbBase;
220 } MP_CPU_EXCHANGE_INFO;
221
222 #pragma pack()
223
224 //
225 // CPU MP Data save in memory
226 //
227 struct _CPU_MP_DATA {
228 UINT64 CpuInfoInHob;
229 UINT32 CpuCount;
230 UINT32 BspNumber;
231 //
232 // The above fields data will be passed from PEI to DXE
233 // Please make sure the fields offset same in the different
234 // architecture.
235 //
236 SPIN_LOCK MpLock;
237 UINTN Buffer;
238 UINTN CpuApStackSize;
239 MP_ASSEMBLY_ADDRESS_MAP AddressMap;
240 UINTN WakeupBuffer;
241 UINTN WakeupBufferHigh;
242 UINTN BackupBuffer;
243 UINTN BackupBufferSize;
244
245 volatile UINT32 FinishedCount;
246 UINT32 RunningCount;
247 BOOLEAN SingleThread;
248 EFI_AP_PROCEDURE Procedure;
249 VOID *ProcArguments;
250 BOOLEAN *Finished;
251 UINT64 ExpectedTime;
252 UINT64 CurrentTime;
253 UINT64 TotalTime;
254 EFI_EVENT WaitEvent;
255 UINTN **FailedCpuList;
256
257 AP_INIT_STATE InitFlag;
258 BOOLEAN SwitchBspFlag;
259 UINTN NewBspNumber;
260 CPU_EXCHANGE_ROLE_INFO BSPInfo;
261 CPU_EXCHANGE_ROLE_INFO APInfo;
262 MTRR_SETTINGS MtrrTable;
263 UINT8 ApLoopMode;
264 UINT8 ApTargetCState;
265 UINT16 PmCodeSegment;
266 UINT16 Pm16CodeSegment;
267 CPU_AP_DATA *CpuData;
268 volatile MP_CPU_EXCHANGE_INFO *MpCpuExchangeInfo;
269
270 UINT32 CurrentTimerCount;
271 UINTN DivideValue;
272 UINT8 Vector;
273 BOOLEAN PeriodicMode;
274 BOOLEAN TimerInterruptState;
275 UINT64 MicrocodePatchAddress;
276 UINT64 MicrocodePatchRegionSize;
277
278 //
279 // Whether need to use Init-Sipi-Sipi to wake up the APs.
280 // Two cases need to set this value to TRUE. One is in HLT
281 // loop mode, the other is resume from S3 which loop mode
282 // will be hardcode change to HLT mode by PiSmmCpuDxeSmm
283 // driver.
284 //
285 BOOLEAN WakeUpByInitSipiSipi;
286
287 BOOLEAN SevEsIsEnabled;
288 UINTN SevEsAPBuffer;
289 UINTN SevEsAPResetStackStart;
290 CPU_MP_DATA *NewCpuMpData;
291
292 UINT64 GhcbBase;
293 };
294
295 #define AP_SAFE_STACK_SIZE 128
296 #define AP_RESET_STACK_SIZE AP_SAFE_STACK_SIZE
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 IN UINTN Pm16CodeSegment,
355 IN UINTN SevEsAPJumpTable,
356 IN UINTN WakeupBuffer
357 );
358
359 /**
360 Assembly code to get starting address and size of the rendezvous entry for APs.
361 Information for fixing a jump instruction in the code is also returned.
362
363 @param[out] AddressMap Output buffer for address map information.
364 **/
365 VOID
366 EFIAPI
367 AsmGetAddressMap (
368 OUT MP_ASSEMBLY_ADDRESS_MAP *AddressMap
369 );
370
371 /**
372 This function is called by both the BSP and the AP which is to become the BSP to
373 Exchange execution context including stack between them. After return from this
374 function, the BSP becomes AP and the AP becomes the BSP.
375
376 @param[in] MyInfo Pointer to buffer holding the exchanging information for the executing processor.
377 @param[in] OthersInfo Pointer to buffer holding the exchanging information for the peer.
378
379 **/
380 VOID
381 EFIAPI
382 AsmExchangeRole (
383 IN CPU_EXCHANGE_ROLE_INFO *MyInfo,
384 IN CPU_EXCHANGE_ROLE_INFO *OthersInfo
385 );
386
387 /**
388 Get the pointer to CPU MP Data structure.
389
390 @return The pointer to CPU MP Data structure.
391 **/
392 CPU_MP_DATA *
393 GetCpuMpData (
394 VOID
395 );
396
397 /**
398 Save the pointer to CPU MP Data structure.
399
400 @param[in] CpuMpData The pointer to CPU MP Data structure will be saved.
401 **/
402 VOID
403 SaveCpuMpData (
404 IN CPU_MP_DATA *CpuMpData
405 );
406
407
408 /**
409 Get available system memory below 1MB by specified size.
410
411 @param[in] WakeupBufferSize Wakeup buffer size required
412
413 @retval other Return wakeup buffer address below 1MB.
414 @retval -1 Cannot find free memory below 1MB.
415 **/
416 UINTN
417 GetWakeupBuffer (
418 IN UINTN WakeupBufferSize
419 );
420
421 /**
422 Get available EfiBootServicesCode memory below 4GB by specified size.
423
424 This buffer is required to safely transfer AP from real address mode to
425 protected mode or long mode, due to the fact that the buffer returned by
426 GetWakeupBuffer() may be marked as non-executable.
427
428 @param[in] BufferSize Wakeup transition buffer size.
429
430 @retval other Return wakeup transition buffer address below 4GB.
431 @retval 0 Cannot find free memory below 4GB.
432 **/
433 UINTN
434 GetModeTransitionBuffer (
435 IN UINTN BufferSize
436 );
437
438 /**
439 Return the address of the SEV-ES AP jump table.
440
441 This buffer is required in order for an SEV-ES guest to transition from
442 UEFI into an OS.
443
444 @return Return SEV-ES AP jump table buffer
445 **/
446 UINTN
447 GetSevEsAPMemory (
448 VOID
449 );
450
451 /**
452 This function will be called by BSP to wakeup AP.
453
454 @param[in] CpuMpData Pointer to CPU MP Data
455 @param[in] Broadcast TRUE: Send broadcast IPI to all APs
456 FALSE: Send IPI to AP by ApicId
457 @param[in] ProcessorNumber The handle number of specified processor
458 @param[in] Procedure The function to be invoked by AP
459 @param[in] ProcedureArgument The argument to be passed into AP function
460 @param[in] WakeUpDisabledAps Whether need to wake up disabled APs in broadcast mode.
461 **/
462 VOID
463 WakeUpAP (
464 IN CPU_MP_DATA *CpuMpData,
465 IN BOOLEAN Broadcast,
466 IN UINTN ProcessorNumber,
467 IN EFI_AP_PROCEDURE Procedure, OPTIONAL
468 IN VOID *ProcedureArgument, OPTIONAL
469 IN BOOLEAN WakeUpDisabledAps OPTIONAL
470 );
471
472 /**
473 Initialize global data for MP support.
474
475 @param[in] CpuMpData The pointer to CPU MP Data structure.
476 **/
477 VOID
478 InitMpGlobalData (
479 IN CPU_MP_DATA *CpuMpData
480 );
481
482 /**
483 Worker function to execute a caller provided function on all enabled APs.
484
485 @param[in] Procedure A pointer to the function to be run on
486 enabled APs of the system.
487 @param[in] SingleThread If TRUE, then all the enabled APs execute
488 the function specified by Procedure one by
489 one, in ascending order of processor handle
490 number. If FALSE, then all the enabled APs
491 execute the function specified by Procedure
492 simultaneously.
493 @param[in] ExcludeBsp Whether let BSP also trig this task.
494 @param[in] WaitEvent The event created by the caller with CreateEvent()
495 service.
496 @param[in] TimeoutInMicroseconds Indicates the time limit in microseconds for
497 APs to return from Procedure, either for
498 blocking or non-blocking mode.
499 @param[in] ProcedureArgument The parameter passed into Procedure for
500 all APs.
501 @param[out] FailedCpuList If all APs finish successfully, then its
502 content is set to NULL. If not all APs
503 finish before timeout expires, then its
504 content is set to address of the buffer
505 holding handle numbers of the failed APs.
506
507 @retval EFI_SUCCESS In blocking mode, all APs have finished before
508 the timeout expired.
509 @retval EFI_SUCCESS In non-blocking mode, function has been dispatched
510 to all enabled APs.
511 @retval others Failed to Startup all APs.
512
513 **/
514 EFI_STATUS
515 StartupAllCPUsWorker (
516 IN EFI_AP_PROCEDURE Procedure,
517 IN BOOLEAN SingleThread,
518 IN BOOLEAN ExcludeBsp,
519 IN EFI_EVENT WaitEvent OPTIONAL,
520 IN UINTN TimeoutInMicroseconds,
521 IN VOID *ProcedureArgument OPTIONAL,
522 OUT UINTN **FailedCpuList OPTIONAL
523 );
524
525 /**
526 Worker function to let the caller get one enabled AP to execute a caller-provided
527 function.
528
529 @param[in] Procedure A pointer to the function to be run on
530 enabled APs of the system.
531 @param[in] ProcessorNumber The handle number of the AP.
532 @param[in] WaitEvent The event created by the caller with CreateEvent()
533 service.
534 @param[in] TimeoutInMicroseconds Indicates the time limit in microseconds for
535 APs to return from Procedure, either for
536 blocking or non-blocking mode.
537 @param[in] ProcedureArgument The parameter passed into Procedure for
538 all APs.
539 @param[out] Finished If AP returns from Procedure before the
540 timeout expires, its content is set to TRUE.
541 Otherwise, the value is set to FALSE.
542
543 @retval EFI_SUCCESS In blocking mode, specified AP finished before
544 the timeout expires.
545 @retval others Failed to Startup AP.
546
547 **/
548 EFI_STATUS
549 StartupThisAPWorker (
550 IN EFI_AP_PROCEDURE Procedure,
551 IN UINTN ProcessorNumber,
552 IN EFI_EVENT WaitEvent OPTIONAL,
553 IN UINTN TimeoutInMicroseconds,
554 IN VOID *ProcedureArgument OPTIONAL,
555 OUT BOOLEAN *Finished OPTIONAL
556 );
557
558 /**
559 Worker function to switch the requested AP to be the BSP from that point onward.
560
561 @param[in] ProcessorNumber The handle number of AP that is to become the new BSP.
562 @param[in] EnableOldBSP If TRUE, then the old BSP will be listed as an
563 enabled AP. Otherwise, it will be disabled.
564
565 @retval EFI_SUCCESS BSP successfully switched.
566 @retval others Failed to switch BSP.
567
568 **/
569 EFI_STATUS
570 SwitchBSPWorker (
571 IN UINTN ProcessorNumber,
572 IN BOOLEAN EnableOldBSP
573 );
574
575 /**
576 Worker function to let the caller enable or disable an AP from this point onward.
577 This service may only be called from the BSP.
578
579 @param[in] ProcessorNumber The handle number of AP.
580 @param[in] EnableAP Specifies the new state for the processor for
581 enabled, FALSE for disabled.
582 @param[in] HealthFlag If not NULL, a pointer to a value that specifies
583 the new health status of the AP.
584
585 @retval EFI_SUCCESS The specified AP was enabled or disabled successfully.
586 @retval others Failed to Enable/Disable AP.
587
588 **/
589 EFI_STATUS
590 EnableDisableApWorker (
591 IN UINTN ProcessorNumber,
592 IN BOOLEAN EnableAP,
593 IN UINT32 *HealthFlag OPTIONAL
594 );
595
596 /**
597 Get pointer to CPU MP Data structure from GUIDed HOB.
598
599 @return The pointer to CPU MP Data structure.
600 **/
601 CPU_MP_DATA *
602 GetCpuMpDataFromGuidedHob (
603 VOID
604 );
605
606 /** Checks status of specified AP.
607
608 This function checks whether the specified AP has finished the task assigned
609 by StartupThisAP(), and whether timeout expires.
610
611 @param[in] ProcessorNumber The handle number of processor.
612
613 @retval EFI_SUCCESS Specified AP has finished task assigned by StartupThisAPs().
614 @retval EFI_TIMEOUT The timeout expires.
615 @retval EFI_NOT_READY Specified AP has not finished task and timeout has not expired.
616 **/
617 EFI_STATUS
618 CheckThisAP (
619 IN UINTN ProcessorNumber
620 );
621
622 /**
623 Checks status of all APs.
624
625 This function checks whether all APs have finished task assigned by StartupAllAPs(),
626 and whether timeout expires.
627
628 @retval EFI_SUCCESS All APs have finished task assigned by StartupAllAPs().
629 @retval EFI_TIMEOUT The timeout expires.
630 @retval EFI_NOT_READY APs have not finished task and timeout has not expired.
631 **/
632 EFI_STATUS
633 CheckAllAPs (
634 VOID
635 );
636
637 /**
638 Checks APs status and updates APs status if needed.
639
640 **/
641 VOID
642 CheckAndUpdateApsStatus (
643 VOID
644 );
645
646 /**
647 Detect whether specified processor can find matching microcode patch and load it.
648
649 @param[in] CpuMpData The pointer to CPU MP Data structure.
650 @param[in] ProcessorNumber The handle number of the processor. The range is
651 from 0 to the total number of logical processors
652 minus 1.
653 **/
654 VOID
655 MicrocodeDetect (
656 IN CPU_MP_DATA *CpuMpData,
657 IN UINTN ProcessorNumber
658 );
659
660 /**
661 Shadow the required microcode patches data into memory.
662
663 @param[in, out] CpuMpData The pointer to CPU MP Data structure.
664 **/
665 VOID
666 ShadowMicrocodeUpdatePatch (
667 IN OUT CPU_MP_DATA *CpuMpData
668 );
669
670 /**
671 Get the cached microcode patch base address and size from the microcode patch
672 information cache HOB.
673
674 @param[out] Address Base address of the microcode patches data.
675 It will be updated if the microcode patch
676 information cache HOB is found.
677 @param[out] RegionSize Size of the microcode patches data.
678 It will be updated if the microcode patch
679 information cache HOB is found.
680
681 @retval TRUE The microcode patch information cache HOB is found.
682 @retval FALSE The microcode patch information cache HOB is not found.
683
684 **/
685 BOOLEAN
686 GetMicrocodePatchInfoFromHob (
687 UINT64 *Address,
688 UINT64 *RegionSize
689 );
690
691 /**
692 Detect whether Mwait-monitor feature is supported.
693
694 @retval TRUE Mwait-monitor feature is supported.
695 @retval FALSE Mwait-monitor feature is not supported.
696 **/
697 BOOLEAN
698 IsMwaitSupport (
699 VOID
700 );
701
702 /**
703 Enable Debug Agent to support source debugging on AP function.
704
705 **/
706 VOID
707 EnableDebugAgent (
708 VOID
709 );
710
711 /**
712 Find the current Processor number by APIC ID.
713
714 @param[in] CpuMpData Pointer to PEI CPU MP Data
715 @param[out] ProcessorNumber Return the pocessor number found
716
717 @retval EFI_SUCCESS ProcessorNumber is found and returned.
718 @retval EFI_NOT_FOUND ProcessorNumber is not found.
719 **/
720 EFI_STATUS
721 GetProcessorNumber (
722 IN CPU_MP_DATA *CpuMpData,
723 OUT UINTN *ProcessorNumber
724 );
725
726 /**
727 This funtion will try to invoke platform specific microcode shadow logic to
728 relocate microcode update patches into memory.
729
730 @param[in, out] CpuMpData The pointer to CPU MP Data structure.
731
732 @retval EFI_SUCCESS Shadow microcode success.
733 @retval EFI_OUT_OF_RESOURCES No enough resource to complete the operation.
734 @retval EFI_UNSUPPORTED Can't find platform specific microcode shadow
735 PPI/Protocol.
736 **/
737 EFI_STATUS
738 PlatformShadowMicrocode (
739 IN OUT CPU_MP_DATA *CpuMpData
740 );
741
742 #endif
743