2 CPU Common features library header file.
4 Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #ifndef _CPU_COMMON_FEATURES_H_
10 #define _CPU_COMMON_FEATURES_H_
14 #include <Library/BaseLib.h>
15 #include <Library/PcdLib.h>
16 #include <Library/DebugLib.h>
17 #include <Library/RegisterCpuFeaturesLib.h>
18 #include <Library/BaseMemoryLib.h>
19 #include <Library/MemoryAllocationLib.h>
20 #include <Library/LocalApicLib.h>
22 #include <Register/Intel/Cpuid.h>
23 #include <Register/Intel/Msr.h>
26 Prepares for the data used by CPU feature detection and initialization.
28 @param[in] NumberOfProcessors The number of CPUs in the platform.
30 @return Pointer to a buffer of CPU related configuration data.
32 @note This service could be called by BSP only.
37 IN UINTN NumberOfProcessors
41 Detects if AESNI feature supported on current processor.
43 @param[in] ProcessorNumber The index of the CPU executing this function.
44 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
45 structure for the CPU executing this function.
46 @param[in] ConfigData A pointer to the configuration buffer returned
47 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
48 CPU_FEATURE_GET_CONFIG_DATA was not provided in
51 @retval TRUE AESNI feature is supported.
52 @retval FALSE AESNI feature is not supported.
54 @note This service could be called by BSP/APs.
59 IN UINTN ProcessorNumber
,
60 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
61 IN VOID
*ConfigData OPTIONAL
65 Initializes AESNI feature to specific state.
67 @param[in] ProcessorNumber The index of the CPU executing this function.
68 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
69 structure for the CPU executing this function.
70 @param[in] ConfigData A pointer to the configuration buffer returned
71 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
72 CPU_FEATURE_GET_CONFIG_DATA was not provided in
74 @param[in] State If TRUE, then the AESNI feature must be enabled.
75 If FALSE, then the AESNI feature must be disabled.
77 @retval RETURN_SUCCESS AESNI feature is initialized.
79 @note This service could be called by BSP only.
84 IN UINTN ProcessorNumber
,
85 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
86 IN VOID
*ConfigData OPTIONAL
,
91 Prepares for the data used by CPU feature detection and initialization.
93 @param[in] NumberOfProcessors The number of CPUs in the platform.
95 @return Pointer to a buffer of CPU related configuration data.
97 @note This service could be called by BSP only.
101 ClockModulationGetConfigData (
102 IN UINTN NumberOfProcessors
106 Detects if Clock Modulation feature supported on current processor.
108 @param[in] ProcessorNumber The index of the CPU executing this function.
109 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
110 structure for the CPU executing this function.
111 @param[in] ConfigData A pointer to the configuration buffer returned
112 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
113 CPU_FEATURE_GET_CONFIG_DATA was not provided in
114 RegisterCpuFeature().
116 @retval TRUE Clock Modulation feature is supported.
117 @retval FALSE Clock Modulation feature is not supported.
119 @note This service could be called by BSP/APs.
123 ClockModulationSupport (
124 IN UINTN ProcessorNumber
,
125 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
126 IN VOID
*ConfigData OPTIONAL
130 Initializes Clock Modulation feature to specific state.
132 @param[in] ProcessorNumber The index of the CPU executing this function.
133 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
134 structure for the CPU executing this function.
135 @param[in] ConfigData A pointer to the configuration buffer returned
136 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
137 CPU_FEATURE_GET_CONFIG_DATA was not provided in
138 RegisterCpuFeature().
139 @param[in] State If TRUE, then the Clock Modulation feature must be enabled.
140 If FALSE, then the Clock Modulation feature must be disabled.
142 @retval RETURN_SUCCESS Clock Modulation feature is initialized.
144 @note This service could be called by BSP only.
148 ClockModulationInitialize (
149 IN UINTN ProcessorNumber
,
150 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
151 IN VOID
*ConfigData OPTIONAL
,
156 Detects if Enhanced Intel SpeedStep feature supported on current processor.
158 @param[in] ProcessorNumber The index of the CPU executing this function.
159 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
160 structure for the CPU executing this function.
161 @param[in] ConfigData A pointer to the configuration buffer returned
162 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
163 CPU_FEATURE_GET_CONFIG_DATA was not provided in
164 RegisterCpuFeature().
166 @retval TRUE Enhanced Intel SpeedStep feature is supported.
167 @retval FALSE Enhanced Intel SpeedStep feature is not supported.
169 @note This service could be called by BSP/APs.
174 IN UINTN ProcessorNumber
,
175 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
176 IN VOID
*ConfigData OPTIONAL
180 Initializes Enhanced Intel SpeedStep feature to specific state.
182 @param[in] ProcessorNumber The index of the CPU executing this function.
183 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
184 structure for the CPU executing this function.
185 @param[in] ConfigData A pointer to the configuration buffer returned
186 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
187 CPU_FEATURE_GET_CONFIG_DATA was not provided in
188 RegisterCpuFeature().
189 @param[in] State If TRUE, then the Enhanced Intel SpeedStep feature
191 If FALSE, then the Enhanced Intel SpeedStep feature
194 @retval RETURN_SUCCESS Enhanced Intel SpeedStep feature is initialized.
196 @note This service could be called by BSP only.
201 IN UINTN ProcessorNumber
,
202 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
203 IN VOID
*ConfigData OPTIONAL
,
208 Detects if Execute Disable feature supported on current processor.
210 @param[in] ProcessorNumber The index of the CPU executing this function.
211 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
212 structure for the CPU executing this function.
213 @param[in] ConfigData A pointer to the configuration buffer returned
214 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
215 CPU_FEATURE_GET_CONFIG_DATA was not provided in
216 RegisterCpuFeature().
218 @retval TRUE Execute Disable feature is supported.
219 @retval FALSE Execute Disable feature is not supported.
221 @note This service could be called by BSP/APs.
225 ExecuteDisableSupport (
226 IN UINTN ProcessorNumber
,
227 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
228 IN VOID
*ConfigData OPTIONAL
232 Initializes Execute Disable feature to specific state.
234 @param[in] ProcessorNumber The index of the CPU executing this function.
235 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
236 structure for the CPU executing this function.
237 @param[in] ConfigData A pointer to the configuration buffer returned
238 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
239 CPU_FEATURE_GET_CONFIG_DATA was not provided in
240 RegisterCpuFeature().
241 @param[in] State If TRUE, then the Execute Disable feature must be enabled.
242 If FALSE, then the Execute Disable feature must be disabled.
244 @retval RETURN_SUCCESS Execute Disable feature is initialized.
246 @note This service could be called by BSP only.
250 ExecuteDisableInitialize (
251 IN UINTN ProcessorNumber
,
252 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
253 IN VOID
*ConfigData OPTIONAL
,
258 Initializes Fast-Strings feature to specific state.
260 @param[in] ProcessorNumber The index of the CPU executing this function.
261 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
262 structure for the CPU executing this function.
263 @param[in] ConfigData A pointer to the configuration buffer returned
264 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
265 CPU_FEATURE_GET_CONFIG_DATA was not provided in
266 RegisterCpuFeature().
267 @param[in] State If TRUE, then the Fast-Strings feature must be enabled.
268 If FALSE, then the Fast-Strings feature must be disabled.
270 @retval RETURN_SUCCESS Fast-Strings feature is initialized.
272 @note This service could be called by BSP only.
276 FastStringsInitialize (
277 IN UINTN ProcessorNumber
,
278 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
279 IN VOID
*ConfigData OPTIONAL
,
284 Detects if MONITOR/MWAIT feature supported on current processor.
286 @param[in] ProcessorNumber The index of the CPU executing this function.
287 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
288 structure for the CPU executing this function.
289 @param[in] ConfigData A pointer to the configuration buffer returned
290 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
291 CPU_FEATURE_GET_CONFIG_DATA was not provided in
292 RegisterCpuFeature().
294 @retval TRUE MONITOR/MWAIT feature is supported.
295 @retval FALSE MONITOR/MWAIT feature is not supported.
297 @note This service could be called by BSP/APs.
301 MonitorMwaitSupport (
302 IN UINTN ProcessorNumber
,
303 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
304 IN VOID
*ConfigData OPTIONAL
308 Initializes MONITOR/MWAIT feature to specific state.
310 @param[in] ProcessorNumber The index of the CPU executing this function.
311 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
312 structure for the CPU executing this function.
313 @param[in] ConfigData A pointer to the configuration buffer returned
314 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
315 CPU_FEATURE_GET_CONFIG_DATA was not provided in
316 RegisterCpuFeature().
317 @param[in] State If TRUE, then the MONITOR/MWAIT feature must be enabled.
318 If FALSE, then the MONITOR/MWAIT feature must be disabled.
320 @retval RETURN_SUCCESS MONITOR/MWAIT feature is initialized.
322 @note This service could be called by BSP only.
326 MonitorMwaitInitialize (
327 IN UINTN ProcessorNumber
,
328 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
329 IN VOID
*ConfigData OPTIONAL
,
334 Detects if VMX feature supported on current processor.
336 @param[in] ProcessorNumber The index of the CPU executing this function.
337 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
338 structure for the CPU executing this function.
339 @param[in] ConfigData A pointer to the configuration buffer returned
340 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
341 CPU_FEATURE_GET_CONFIG_DATA was not provided in
342 RegisterCpuFeature().
344 @retval TRUE VMX feature is supported.
345 @retval FALSE VMX feature is not supported.
347 @note This service could be called by BSP/APs.
352 IN UINTN ProcessorNumber
,
353 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
354 IN VOID
*ConfigData OPTIONAL
358 Initializes VMX feature to specific state.
360 @param[in] ProcessorNumber The index of the CPU executing this function.
361 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
362 structure for the CPU executing this function.
363 @param[in] ConfigData A pointer to the configuration buffer returned
364 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
365 CPU_FEATURE_GET_CONFIG_DATA was not provided in
366 RegisterCpuFeature().
367 @param[in] State If TRUE, then the VMX feature must be enabled.
368 If FALSE, then the VMX feature must be disabled.
370 @retval RETURN_SUCCESS VMX feature is initialized.
372 @note This service could be called by BSP only.
377 IN UINTN ProcessorNumber
,
378 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
379 IN VOID
*ConfigData OPTIONAL
,
384 Detects if Lock Feature Control Register feature supported on current processor.
386 @param[in] ProcessorNumber The index of the CPU executing this function.
387 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
388 structure for the CPU executing this function.
389 @param[in] ConfigData A pointer to the configuration buffer returned
390 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
391 CPU_FEATURE_GET_CONFIG_DATA was not provided in
392 RegisterCpuFeature().
394 @retval TRUE Lock Feature Control Register feature is supported.
395 @retval FALSE Lock Feature Control Register feature is not supported.
397 @note This service could be called by BSP/APs.
401 LockFeatureControlRegisterSupport (
402 IN UINTN ProcessorNumber
,
403 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
404 IN VOID
*ConfigData OPTIONAL
408 Initializes Lock Feature Control Register feature to specific state.
410 @param[in] ProcessorNumber The index of the CPU executing this function.
411 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
412 structure for the CPU executing this function.
413 @param[in] ConfigData A pointer to the configuration buffer returned
414 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
415 CPU_FEATURE_GET_CONFIG_DATA was not provided in
416 RegisterCpuFeature().
417 @param[in] State If TRUE, then the Lock Feature Control Register feature must be enabled.
418 If FALSE, then the Lock Feature Control Register feature must be disabled.
420 @retval RETURN_SUCCESS Lock Feature Control Register feature is initialized.
422 @note This service could be called by BSP only.
426 LockFeatureControlRegisterInitialize (
427 IN UINTN ProcessorNumber
,
428 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
429 IN VOID
*ConfigData OPTIONAL
,
434 Detects if SMX feature supported on current processor.
436 @param[in] ProcessorNumber The index of the CPU executing this function.
437 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
438 structure for the CPU executing this function.
439 @param[in] ConfigData A pointer to the configuration buffer returned
440 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
441 CPU_FEATURE_GET_CONFIG_DATA was not provided in
442 RegisterCpuFeature().
444 @retval TRUE SMX feature is supported.
445 @retval FALSE SMX feature is not supported.
447 @note This service could be called by BSP/APs.
452 IN UINTN ProcessorNumber
,
453 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
454 IN VOID
*ConfigData OPTIONAL
458 Initializes SMX feature to specific state.
460 @param[in] ProcessorNumber The index of the CPU executing this function.
461 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
462 structure for the CPU executing this function.
463 @param[in] ConfigData A pointer to the configuration buffer returned
464 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
465 CPU_FEATURE_GET_CONFIG_DATA was not provided in
466 RegisterCpuFeature().
467 @param[in] State If TRUE, then SMX feature must be enabled.
468 If FALSE, then SMX feature must be disabled.
470 @retval RETURN_SUCCESS SMX feature is initialized.
471 @retval RETURN_UNSUPPORTED VMX not initialized.
473 @note This service could be called by BSP only.
478 IN UINTN ProcessorNumber
,
479 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
480 IN VOID
*ConfigData OPTIONAL
,
485 Detects if LimitCpuidMaxval feature supported on current processor.
487 @param[in] ProcessorNumber The index of the CPU executing this function.
488 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
489 structure for the CPU executing this function.
490 @param[in] ConfigData A pointer to the configuration buffer returned
491 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
492 CPU_FEATURE_GET_CONFIG_DATA was not provided in
493 RegisterCpuFeature().
495 @retval TRUE LimitCpuidMaxval feature is supported.
496 @retval FALSE LimitCpuidMaxval feature is not supported.
498 @note This service could be called by BSP/APs.
502 LimitCpuidMaxvalSupport (
503 IN UINTN ProcessorNumber
,
504 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
505 IN VOID
*ConfigData OPTIONAL
509 Initializes LimitCpuidMaxval feature to specific state.
511 @param[in] ProcessorNumber The index of the CPU executing this function.
512 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
513 structure for the CPU executing this function.
514 @param[in] ConfigData A pointer to the configuration buffer returned
515 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
516 CPU_FEATURE_GET_CONFIG_DATA was not provided in
517 RegisterCpuFeature().
518 @param[in] State If TRUE, then the LimitCpuidMaxval feature must be enabled.
519 If FALSE, then the LimitCpuidMaxval feature must be disabled.
521 @retval RETURN_SUCCESS LimitCpuidMaxval feature is initialized.
523 @note This service could be called by BSP only.
527 LimitCpuidMaxvalInitialize (
528 IN UINTN ProcessorNumber
,
529 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
530 IN VOID
*ConfigData OPTIONAL
,
535 Detects if Machine Check Exception feature supported on current processor.
537 @param[in] ProcessorNumber The index of the CPU executing this function.
538 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
539 structure for the CPU executing this function.
540 @param[in] ConfigData A pointer to the configuration buffer returned
541 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
542 CPU_FEATURE_GET_CONFIG_DATA was not provided in
543 RegisterCpuFeature().
545 @retval TRUE Machine Check Exception feature is supported.
546 @retval FALSE Machine Check Exception feature is not supported.
548 @note This service could be called by BSP/APs.
553 IN UINTN ProcessorNumber
,
554 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
555 IN VOID
*ConfigData OPTIONAL
559 Initializes Machine Check Exception feature to specific state.
561 @param[in] ProcessorNumber The index of the CPU executing this function.
562 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
563 structure for the CPU executing this function.
564 @param[in] ConfigData A pointer to the configuration buffer returned
565 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
566 CPU_FEATURE_GET_CONFIG_DATA was not provided in
567 RegisterCpuFeature().
568 @param[in] State If TRUE, then the Machine Check Exception feature must be enabled.
569 If FALSE, then the Machine Check Exception feature must be disabled.
571 @retval RETURN_SUCCESS Machine Check Exception feature is initialized.
573 @note This service could be called by BSP only.
578 IN UINTN ProcessorNumber
,
579 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
580 IN VOID
*ConfigData OPTIONAL
,
585 Detects if Machine Check Architecture feature supported on current processor.
587 @param[in] ProcessorNumber The index of the CPU executing this function.
588 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
589 structure for the CPU executing this function.
590 @param[in] ConfigData A pointer to the configuration buffer returned
591 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
592 CPU_FEATURE_GET_CONFIG_DATA was not provided in
593 RegisterCpuFeature().
595 @retval TRUE Machine Check Architecture feature is supported.
596 @retval FALSE Machine Check Architecture feature is not supported.
598 @note This service could be called by BSP/APs.
603 IN UINTN ProcessorNumber
,
604 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
605 IN VOID
*ConfigData OPTIONAL
609 Initializes Machine Check Architecture feature to specific state.
611 @param[in] ProcessorNumber The index of the CPU executing this function.
612 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
613 structure for the CPU executing this function.
614 @param[in] ConfigData A pointer to the configuration buffer returned
615 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
616 CPU_FEATURE_GET_CONFIG_DATA was not provided in
617 RegisterCpuFeature().
618 @param[in] State If TRUE, then the Machine Check Architecture feature must be enabled.
619 If FALSE, then the Machine Check Architecture feature must be disabled.
621 @retval RETURN_SUCCESS Machine Check Architecture feature is initialized.
623 @note This service could be called by BSP only.
628 IN UINTN ProcessorNumber
,
629 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
630 IN VOID
*ConfigData OPTIONAL
,
635 Detects if IA32_MCG_CTL feature supported on current processor.
637 @param[in] ProcessorNumber The index of the CPU executing this function.
638 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
639 structure for the CPU executing this function.
640 @param[in] ConfigData A pointer to the configuration buffer returned
641 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
642 CPU_FEATURE_GET_CONFIG_DATA was not provided in
643 RegisterCpuFeature().
645 @retval TRUE IA32_MCG_CTL feature is supported.
646 @retval FALSE IA32_MCG_CTL feature is not supported.
648 @note This service could be called by BSP/APs.
653 IN UINTN ProcessorNumber
,
654 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
655 IN VOID
*ConfigData OPTIONAL
659 Initializes IA32_MCG_CTL feature to specific state.
661 @param[in] ProcessorNumber The index of the CPU executing this function.
662 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
663 structure for the CPU executing this function.
664 @param[in] ConfigData A pointer to the configuration buffer returned
665 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
666 CPU_FEATURE_GET_CONFIG_DATA was not provided in
667 RegisterCpuFeature().
668 @param[in] State If TRUE, then the IA32_MCG_CTL feature must be enabled.
669 If FALSE, then the IA32_MCG_CTL feature must be disabled.
671 @retval RETURN_SUCCESS IA32_MCG_CTL feature is initialized.
673 @note This service could be called by BSP only.
678 IN UINTN ProcessorNumber
,
679 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
680 IN VOID
*ConfigData OPTIONAL
,
685 Detects if Pending Break feature supported on current processor.
687 @param[in] ProcessorNumber The index of the CPU executing this function.
688 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
689 structure for the CPU executing this function.
690 @param[in] ConfigData A pointer to the configuration buffer returned
691 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
692 CPU_FEATURE_GET_CONFIG_DATA was not provided in
693 RegisterCpuFeature().
695 @retval TRUE Pending Break feature is supported.
696 @retval FALSE Pending Break feature is not supported.
698 @note This service could be called by BSP/APs.
702 PendingBreakSupport (
703 IN UINTN ProcessorNumber
,
704 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
705 IN VOID
*ConfigData OPTIONAL
709 Initializes Pending Break feature to specific state.
711 @param[in] ProcessorNumber The index of the CPU executing this function.
712 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
713 structure for the CPU executing this function.
714 @param[in] ConfigData A pointer to the configuration buffer returned
715 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
716 CPU_FEATURE_GET_CONFIG_DATA was not provided in
717 RegisterCpuFeature().
718 @param[in] State If TRUE, then the Pending Break feature must be enabled.
719 If FALSE, then the Pending Break feature must be disabled.
721 @retval RETURN_SUCCESS Pending Break feature is initialized.
723 @note This service could be called by BSP only.
727 PendingBreakInitialize (
728 IN UINTN ProcessorNumber
,
729 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
730 IN VOID
*ConfigData OPTIONAL
,
735 Detects if C1E feature supported on current processor.
737 @param[in] ProcessorNumber The index of the CPU executing this function.
738 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
739 structure for the CPU executing this function.
740 @param[in] ConfigData A pointer to the configuration buffer returned
741 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
742 CPU_FEATURE_GET_CONFIG_DATA was not provided in
743 RegisterCpuFeature().
745 @retval TRUE C1E feature is supported.
746 @retval FALSE C1E feature is not supported.
748 @note This service could be called by BSP/APs.
753 IN UINTN ProcessorNumber
,
754 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
755 IN VOID
*ConfigData OPTIONAL
759 Initializes C1E feature to specific state.
761 @param[in] ProcessorNumber The index of the CPU executing this function.
762 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
763 structure for the CPU executing this function.
764 @param[in] ConfigData A pointer to the configuration buffer returned
765 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
766 CPU_FEATURE_GET_CONFIG_DATA was not provided in
767 RegisterCpuFeature().
768 @param[in] State If TRUE, then the C1E feature must be enabled.
769 If FALSE, then the C1E feature must be disabled.
771 @retval RETURN_SUCCESS C1E feature is initialized.
773 @note This service could be called by BSP only.
778 IN UINTN ProcessorNumber
,
779 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
780 IN VOID
*ConfigData OPTIONAL
,
785 Prepares for the data used by CPU feature detection and initialization.
787 @param[in] NumberOfProcessors The number of CPUs in the platform.
789 @return Pointer to a buffer of CPU related configuration data.
791 @note This service could be called by BSP only.
795 X2ApicGetConfigData (
796 IN UINTN NumberOfProcessors
800 Detects if X2Apci feature supported on current processor.
802 Detect if X2Apci has been already enabled.
804 @param[in] ProcessorNumber The index of the CPU executing this function.
805 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
806 structure for the CPU executing this function.
807 @param[in] ConfigData A pointer to the configuration buffer returned
808 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
809 CPU_FEATURE_GET_CONFIG_DATA was not provided in
810 RegisterCpuFeature().
812 @retval TRUE X2Apci feature is supported.
813 @retval FALSE X2Apci feature is not supported.
815 @note This service could be called by BSP/APs.
820 IN UINTN ProcessorNumber
,
821 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
822 IN VOID
*ConfigData OPTIONAL
826 Initializes X2Apci feature to specific state.
828 @param[in] ProcessorNumber The index of the CPU executing this function.
829 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
830 structure for the CPU executing this function.
831 @param[in] ConfigData A pointer to the configuration buffer returned
832 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
833 CPU_FEATURE_GET_CONFIG_DATA was not provided in
834 RegisterCpuFeature().
835 @param[in] State If TRUE, then the X2Apci feature must be enabled.
836 If FALSE, then the X2Apci feature must be disabled.
838 @retval RETURN_SUCCESS X2Apci feature is initialized.
840 @note This service could be called by BSP only.
845 IN UINTN ProcessorNumber
,
846 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
847 IN VOID
*ConfigData OPTIONAL
,
852 Prepares for the data used by CPU feature detection and initialization.
854 @param[in] NumberOfProcessors The number of CPUs in the platform.
856 @return Pointer to a buffer of CPU related configuration data.
858 @note This service could be called by BSP only.
863 IN UINTN NumberOfProcessors
867 Detects if Protected Processor Inventory Number feature supported on current
870 @param[in] ProcessorNumber The index of the CPU executing this function.
871 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
872 structure for the CPU executing this function.
873 @param[in] ConfigData A pointer to the configuration buffer returned
874 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
875 CPU_FEATURE_GET_CONFIG_DATA was not provided in
876 RegisterCpuFeature().
878 @retval TRUE Protected Processor Inventory Number feature is supported.
879 @retval FALSE Protected Processor Inventory Number feature is not supported.
881 @note This service could be called by BSP/APs.
886 IN UINTN ProcessorNumber
,
887 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
888 IN VOID
*ConfigData OPTIONAL
892 Initializes Protected Processor Inventory Number feature to specific state.
894 @param[in] ProcessorNumber The index of the CPU executing this function.
895 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
896 structure for the CPU executing this function.
897 @param[in] ConfigData A pointer to the configuration buffer returned
898 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
899 CPU_FEATURE_GET_CONFIG_DATA was not provided in
900 RegisterCpuFeature().
901 @param[in] State If TRUE, then the Protected Processor Inventory
902 Number feature must be enabled.
903 If FALSE, then the Protected Processor Inventory
904 Number feature must be disabled.
906 @retval RETURN_SUCCESS Protected Processor Inventory Number feature is
908 @retval RETURN_DEVICE_ERROR Device can't change state because it has been
915 IN UINTN ProcessorNumber
,
916 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
917 IN VOID
*ConfigData OPTIONAL
,
922 Detects if Local machine check exception feature supported on current
925 @param[in] ProcessorNumber The index of the CPU executing this function.
926 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
927 structure for the CPU executing this function.
928 @param[in] ConfigData A pointer to the configuration buffer returned
929 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
930 CPU_FEATURE_GET_CONFIG_DATA was not provided in
931 RegisterCpuFeature().
933 @retval TRUE Local machine check exception feature is supported.
934 @retval FALSE Local machine check exception feature is not supported.
936 @note This service could be called by BSP/APs.
941 IN UINTN ProcessorNumber
,
942 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
943 IN VOID
*ConfigData OPTIONAL
947 Initializes Local machine check exception feature to specific state.
949 @param[in] ProcessorNumber The index of the CPU executing this function.
950 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
951 structure for the CPU executing this function.
952 @param[in] ConfigData A pointer to the configuration buffer returned
953 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
954 CPU_FEATURE_GET_CONFIG_DATA was not provided in
955 RegisterCpuFeature().
956 @param[in] State If TRUE, then the Local machine check exception
957 feature must be enabled.
958 If FALSE, then the Local machine check exception
959 feature must be disabled.
961 @retval RETURN_SUCCESS Local machine check exception feature is initialized.
967 IN UINTN ProcessorNumber
,
968 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
969 IN VOID
*ConfigData OPTIONAL
,
974 Prepares for the data used by CPU feature detection and initialization.
976 @param[in] NumberOfProcessors The number of CPUs in the platform.
978 @return Pointer to a buffer of CPU related configuration data.
980 @note This service could be called by BSP only.
984 ProcTraceGetConfigData (
985 IN UINTN NumberOfProcessors
989 Detects if Intel Processor Trace feature supported on current processor.
991 @param[in] ProcessorNumber The index of the CPU executing this function.
992 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
993 structure for the CPU executing this function.
994 @param[in] ConfigData A pointer to the configuration buffer returned
995 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
996 CPU_FEATURE_GET_CONFIG_DATA was not provided in
997 RegisterCpuFeature().
999 @retval TRUE Processor Trace feature is supported.
1000 @retval FALSE Processor Trace feature is not supported.
1002 @note This service could be called by BSP/APs.
1007 IN UINTN ProcessorNumber
,
1008 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
1009 IN VOID
*ConfigData OPTIONAL
1013 Initializes Intel Processor Trace feature to specific state.
1015 @param[in] ProcessorNumber The index of the CPU executing this function.
1016 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
1017 structure for the CPU executing this function.
1018 @param[in] ConfigData A pointer to the configuration buffer returned
1019 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
1020 CPU_FEATURE_GET_CONFIG_DATA was not provided in
1021 RegisterCpuFeature().
1022 @param[in] State If TRUE, then the Processor Trace feature must be
1024 If FALSE, then the Processor Trace feature must be
1027 @retval RETURN_SUCCESS Intel Processor Trace feature is initialized.
1032 ProcTraceInitialize (
1033 IN UINTN ProcessorNumber
,
1034 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
1035 IN VOID
*ConfigData OPTIONAL
,