2 CPU Common features library header file.
4 Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef _CPU_COMMON_FEATURES_H_
16 #define _CPU_COMMON_FEATURES_H_
20 #include <Library/BaseLib.h>
21 #include <Library/PcdLib.h>
22 #include <Library/DebugLib.h>
23 #include <Library/RegisterCpuFeaturesLib.h>
24 #include <Library/BaseMemoryLib.h>
25 #include <Library/MemoryAllocationLib.h>
26 #include <Library/LocalApicLib.h>
28 #include <Register/Cpuid.h>
29 #include <Register/Msr.h>
32 Prepares for the data used by CPU feature detection and initialization.
34 @param[in] NumberOfProcessors The number of CPUs in the platform.
36 @return Pointer to a buffer of CPU related configuration data.
38 @note This service could be called by BSP only.
43 IN UINTN NumberOfProcessors
47 Detects if AESNI feature supported on current processor.
49 @param[in] ProcessorNumber The index of the CPU executing this function.
50 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
51 structure for the CPU executing this function.
52 @param[in] ConfigData A pointer to the configuration buffer returned
53 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
54 CPU_FEATURE_GET_CONFIG_DATA was not provided in
57 @retval TRUE AESNI feature is supported.
58 @retval FALSE AESNI feature is not supported.
60 @note This service could be called by BSP/APs.
65 IN UINTN ProcessorNumber
,
66 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
67 IN VOID
*ConfigData OPTIONAL
71 Initializes AESNI feature to specific state.
73 @param[in] ProcessorNumber The index of the CPU executing this function.
74 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
75 structure for the CPU executing this function.
76 @param[in] ConfigData A pointer to the configuration buffer returned
77 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
78 CPU_FEATURE_GET_CONFIG_DATA was not provided in
80 @param[in] State If TRUE, then the AESNI feature must be enabled.
81 If FALSE, then the AESNI feature must be disabled.
83 @retval RETURN_SUCCESS AESNI feature is initialized.
85 @note This service could be called by BSP only.
90 IN UINTN ProcessorNumber
,
91 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
92 IN VOID
*ConfigData
, OPTIONAL
97 Detects if Clock Modulation feature supported on current processor.
99 @param[in] ProcessorNumber The index of the CPU executing this function.
100 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
101 structure for the CPU executing this function.
102 @param[in] ConfigData A pointer to the configuration buffer returned
103 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
104 CPU_FEATURE_GET_CONFIG_DATA was not provided in
105 RegisterCpuFeature().
107 @retval TRUE Clock Modulation feature is supported.
108 @retval FALSE Clock Modulation feature is not supported.
110 @note This service could be called by BSP/APs.
114 ClockModulationSupport (
115 IN UINTN ProcessorNumber
,
116 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
117 IN VOID
*ConfigData OPTIONAL
121 Initializes Clock Modulation feature to specific state.
123 @param[in] ProcessorNumber The index of the CPU executing this function.
124 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
125 structure for the CPU executing this function.
126 @param[in] ConfigData A pointer to the configuration buffer returned
127 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
128 CPU_FEATURE_GET_CONFIG_DATA was not provided in
129 RegisterCpuFeature().
130 @param[in] State If TRUE, then the Clock Modulation feature must be enabled.
131 If FALSE, then the Clock Modulation feature must be disabled.
133 @retval RETURN_SUCCESS Clock Modulation feature is initialized.
135 @note This service could be called by BSP only.
139 ClockModulationInitialize (
140 IN UINTN ProcessorNumber
,
141 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
142 IN VOID
*ConfigData
, OPTIONAL
147 Detects if Enhanced Intel SpeedStep feature supported on current processor.
149 @param[in] ProcessorNumber The index of the CPU executing this function.
150 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
151 structure for the CPU executing this function.
152 @param[in] ConfigData A pointer to the configuration buffer returned
153 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
154 CPU_FEATURE_GET_CONFIG_DATA was not provided in
155 RegisterCpuFeature().
157 @retval TRUE Enhanced Intel SpeedStep feature is supported.
158 @retval FALSE Enhanced Intel SpeedStep feature is not supported.
160 @note This service could be called by BSP/APs.
165 IN UINTN ProcessorNumber
,
166 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
167 IN VOID
*ConfigData OPTIONAL
171 Initializes Enhanced Intel SpeedStep feature to specific state.
173 @param[in] ProcessorNumber The index of the CPU executing this function.
174 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
175 structure for the CPU executing this function.
176 @param[in] ConfigData A pointer to the configuration buffer returned
177 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
178 CPU_FEATURE_GET_CONFIG_DATA was not provided in
179 RegisterCpuFeature().
180 @param[in] State If TRUE, then the Enhanced Intel SpeedStep feature
182 If FALSE, then the Enhanced Intel SpeedStep feature
185 @retval RETURN_SUCCESS Enhanced Intel SpeedStep feature is initialized.
187 @note This service could be called by BSP only.
192 IN UINTN ProcessorNumber
,
193 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
194 IN VOID
*ConfigData
, OPTIONAL
199 Detects if Execute Disable feature supported on current processor.
201 @param[in] ProcessorNumber The index of the CPU executing this function.
202 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
203 structure for the CPU executing this function.
204 @param[in] ConfigData A pointer to the configuration buffer returned
205 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
206 CPU_FEATURE_GET_CONFIG_DATA was not provided in
207 RegisterCpuFeature().
209 @retval TRUE Execute Disable feature is supported.
210 @retval FALSE Execute Disable feature is not supported.
212 @note This service could be called by BSP/APs.
216 ExecuteDisableSupport (
217 IN UINTN ProcessorNumber
,
218 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
219 IN VOID
*ConfigData OPTIONAL
223 Initializes Execute Disable feature to specific state.
225 @param[in] ProcessorNumber The index of the CPU executing this function.
226 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
227 structure for the CPU executing this function.
228 @param[in] ConfigData A pointer to the configuration buffer returned
229 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
230 CPU_FEATURE_GET_CONFIG_DATA was not provided in
231 RegisterCpuFeature().
232 @param[in] State If TRUE, then the Execute Disable feature must be enabled.
233 If FALSE, then the Execute Disable feature must be disabled.
235 @retval RETURN_SUCCESS Execute Disable feature is initialized.
237 @note This service could be called by BSP only.
241 ExecuteDisableInitialize (
242 IN UINTN ProcessorNumber
,
243 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
244 IN VOID
*ConfigData
, OPTIONAL
249 Initializes Fast-Strings feature to specific state.
251 @param[in] ProcessorNumber The index of the CPU executing this function.
252 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
253 structure for the CPU executing this function.
254 @param[in] ConfigData A pointer to the configuration buffer returned
255 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
256 CPU_FEATURE_GET_CONFIG_DATA was not provided in
257 RegisterCpuFeature().
258 @param[in] State If TRUE, then the Fast-Strings feature must be enabled.
259 If FALSE, then the Fast-Strings feature must be disabled.
261 @retval RETURN_SUCCESS Fast-Strings feature is initialized.
263 @note This service could be called by BSP only.
267 FastStringsInitialize (
268 IN UINTN ProcessorNumber
,
269 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
270 IN VOID
*ConfigData
, OPTIONAL
275 Detects if MONITOR/MWAIT feature supported on current processor.
277 @param[in] ProcessorNumber The index of the CPU executing this function.
278 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
279 structure for the CPU executing this function.
280 @param[in] ConfigData A pointer to the configuration buffer returned
281 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
282 CPU_FEATURE_GET_CONFIG_DATA was not provided in
283 RegisterCpuFeature().
285 @retval TRUE MONITOR/MWAIT feature is supported.
286 @retval FALSE MONITOR/MWAIT feature is not supported.
288 @note This service could be called by BSP/APs.
292 MonitorMwaitSupport (
293 IN UINTN ProcessorNumber
,
294 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
295 IN VOID
*ConfigData OPTIONAL
299 Initializes MONITOR/MWAIT feature to specific state.
301 @param[in] ProcessorNumber The index of the CPU executing this function.
302 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
303 structure for the CPU executing this function.
304 @param[in] ConfigData A pointer to the configuration buffer returned
305 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
306 CPU_FEATURE_GET_CONFIG_DATA was not provided in
307 RegisterCpuFeature().
308 @param[in] State If TRUE, then the MONITOR/MWAIT feature must be enabled.
309 If FALSE, then the MONITOR/MWAIT feature must be disabled.
311 @retval RETURN_SUCCESS MONITOR/MWAIT feature is initialized.
313 @note This service could be called by BSP only.
317 MonitorMwaitInitialize (
318 IN UINTN ProcessorNumber
,
319 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
320 IN VOID
*ConfigData
, OPTIONAL
325 Detects if VMX feature supported on current processor.
327 @param[in] ProcessorNumber The index of the CPU executing this function.
328 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
329 structure for the CPU executing this function.
330 @param[in] ConfigData A pointer to the configuration buffer returned
331 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
332 CPU_FEATURE_GET_CONFIG_DATA was not provided in
333 RegisterCpuFeature().
335 @retval TRUE VMX feature is supported.
336 @retval FALSE VMX feature is not supported.
338 @note This service could be called by BSP/APs.
343 IN UINTN ProcessorNumber
,
344 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
345 IN VOID
*ConfigData OPTIONAL
349 Initializes VMX inside SMX feature to specific state.
351 @param[in] ProcessorNumber The index of the CPU executing this function.
352 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
353 structure for the CPU executing this function.
354 @param[in] ConfigData A pointer to the configuration buffer returned
355 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
356 CPU_FEATURE_GET_CONFIG_DATA was not provided in
357 RegisterCpuFeature().
358 @param[in] State If TRUE, then the VMX inside SMX feature must be enabled.
359 If FALSE, then the VMX inside SMX feature must be disabled.
361 @retval RETURN_SUCCESS VMX inside SMX feature is initialized.
363 @note This service could be called by BSP only.
367 VmxInsideSmxInitialize (
368 IN UINTN ProcessorNumber
,
369 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
370 IN VOID
*ConfigData
, OPTIONAL
375 Initializes SENTER feature to specific state.
377 @param[in] ProcessorNumber The index of the CPU executing this function.
378 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
379 structure for the CPU executing this function.
380 @param[in] ConfigData A pointer to the configuration buffer returned
381 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
382 CPU_FEATURE_GET_CONFIG_DATA was not provided in
383 RegisterCpuFeature().
384 @param[in] State If TRUE, then the SENTER feature must be enabled.
385 If FALSE, then the SENTER feature must be disabled.
387 @retval RETURN_SUCCESS SENTER feature is initialized.
389 @note This service could be called by BSP only.
394 IN UINTN ProcessorNumber
,
395 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
396 IN VOID
*ConfigData
, OPTIONAL
401 Detects if Lock Feature Control Register feature supported on current processor.
403 @param[in] ProcessorNumber The index of the CPU executing this function.
404 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
405 structure for the CPU executing this function.
406 @param[in] ConfigData A pointer to the configuration buffer returned
407 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
408 CPU_FEATURE_GET_CONFIG_DATA was not provided in
409 RegisterCpuFeature().
411 @retval TRUE Lock Feature Control Register feature is supported.
412 @retval FALSE Lock Feature Control Register feature is not supported.
414 @note This service could be called by BSP/APs.
418 LockFeatureControlRegisterSupport (
419 IN UINTN ProcessorNumber
,
420 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
421 IN VOID
*ConfigData OPTIONAL
425 Initializes Lock Feature Control Register feature to specific state.
427 @param[in] ProcessorNumber The index of the CPU executing this function.
428 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
429 structure for the CPU executing this function.
430 @param[in] ConfigData A pointer to the configuration buffer returned
431 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
432 CPU_FEATURE_GET_CONFIG_DATA was not provided in
433 RegisterCpuFeature().
434 @param[in] State If TRUE, then the Lock Feature Control Register feature must be enabled.
435 If FALSE, then the Lock Feature Control Register feature must be disabled.
437 @retval RETURN_SUCCESS Lock Feature Control Register feature is initialized.
439 @note This service could be called by BSP only.
443 LockFeatureControlRegisterInitialize (
444 IN UINTN ProcessorNumber
,
445 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
446 IN VOID
*ConfigData
, OPTIONAL
451 Detects if SMX feature supported on current processor.
453 @param[in] ProcessorNumber The index of the CPU executing this function.
454 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
455 structure for the CPU executing this function.
456 @param[in] ConfigData A pointer to the configuration buffer returned
457 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
458 CPU_FEATURE_GET_CONFIG_DATA was not provided in
459 RegisterCpuFeature().
461 @retval TRUE SMX feature is supported.
462 @retval FALSE SMX feature is not supported.
464 @note This service could be called by BSP/APs.
469 IN UINTN ProcessorNumber
,
470 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
471 IN VOID
*ConfigData OPTIONAL
475 Initializes VMX outside SMX feature to specific state.
477 @param[in] ProcessorNumber The index of the CPU executing this function.
478 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
479 structure for the CPU executing this function.
480 @param[in] ConfigData A pointer to the configuration buffer returned
481 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
482 CPU_FEATURE_GET_CONFIG_DATA was not provided in
483 RegisterCpuFeature().
484 @param[in] State If TRUE, then the VMX outside SMX feature must be enabled.
485 If FALSE, then the VMX outside SMX feature must be disabled.
487 @retval RETURN_SUCCESS VMX outside SMX feature is initialized.
489 @note This service could be called by BSP only.
493 VmxOutsideSmxInitialize (
494 IN UINTN ProcessorNumber
,
495 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
496 IN VOID
*ConfigData
, OPTIONAL
501 Detects if LimitCpuidMaxval feature supported on current processor.
503 @param[in] ProcessorNumber The index of the CPU executing this function.
504 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
505 structure for the CPU executing this function.
506 @param[in] ConfigData A pointer to the configuration buffer returned
507 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
508 CPU_FEATURE_GET_CONFIG_DATA was not provided in
509 RegisterCpuFeature().
511 @retval TRUE LimitCpuidMaxval feature is supported.
512 @retval FALSE LimitCpuidMaxval feature is not supported.
514 @note This service could be called by BSP/APs.
518 LimitCpuidMaxvalSupport (
519 IN UINTN ProcessorNumber
,
520 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
521 IN VOID
*ConfigData OPTIONAL
525 Initializes LimitCpuidMaxval feature to specific state.
527 @param[in] ProcessorNumber The index of the CPU executing this function.
528 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
529 structure for the CPU executing this function.
530 @param[in] ConfigData A pointer to the configuration buffer returned
531 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
532 CPU_FEATURE_GET_CONFIG_DATA was not provided in
533 RegisterCpuFeature().
534 @param[in] State If TRUE, then the LimitCpuidMaxval feature must be enabled.
535 If FALSE, then the LimitCpuidMaxval feature must be disabled.
537 @retval RETURN_SUCCESS LimitCpuidMaxval feature is initialized.
539 @note This service could be called by BSP only.
543 LimitCpuidMaxvalInitialize (
544 IN UINTN ProcessorNumber
,
545 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
546 IN VOID
*ConfigData
, OPTIONAL
551 Detects if Machine Check Exception feature supported on current processor.
553 @param[in] ProcessorNumber The index of the CPU executing this function.
554 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
555 structure for the CPU executing this function.
556 @param[in] ConfigData A pointer to the configuration buffer returned
557 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
558 CPU_FEATURE_GET_CONFIG_DATA was not provided in
559 RegisterCpuFeature().
561 @retval TRUE Machine Check Exception feature is supported.
562 @retval FALSE Machine Check Exception feature is not supported.
564 @note This service could be called by BSP/APs.
569 IN UINTN ProcessorNumber
,
570 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
571 IN VOID
*ConfigData OPTIONAL
575 Initializes Machine Check Exception feature to specific state.
577 @param[in] ProcessorNumber The index of the CPU executing this function.
578 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
579 structure for the CPU executing this function.
580 @param[in] ConfigData A pointer to the configuration buffer returned
581 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
582 CPU_FEATURE_GET_CONFIG_DATA was not provided in
583 RegisterCpuFeature().
584 @param[in] State If TRUE, then the Machine Check Exception feature must be enabled.
585 If FALSE, then the Machine Check Exception feature must be disabled.
587 @retval RETURN_SUCCESS Machine Check Exception feature is initialized.
589 @note This service could be called by BSP only.
594 IN UINTN ProcessorNumber
,
595 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
596 IN VOID
*ConfigData
, OPTIONAL
601 Detects if Machine Check Architecture feature supported on current processor.
603 @param[in] ProcessorNumber The index of the CPU executing this function.
604 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
605 structure for the CPU executing this function.
606 @param[in] ConfigData A pointer to the configuration buffer returned
607 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
608 CPU_FEATURE_GET_CONFIG_DATA was not provided in
609 RegisterCpuFeature().
611 @retval TRUE Machine Check Architecture feature is supported.
612 @retval FALSE Machine Check Architecture feature is not supported.
614 @note This service could be called by BSP/APs.
619 IN UINTN ProcessorNumber
,
620 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
621 IN VOID
*ConfigData OPTIONAL
625 Initializes Machine Check Architecture feature to specific state.
627 @param[in] ProcessorNumber The index of the CPU executing this function.
628 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
629 structure for the CPU executing this function.
630 @param[in] ConfigData A pointer to the configuration buffer returned
631 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
632 CPU_FEATURE_GET_CONFIG_DATA was not provided in
633 RegisterCpuFeature().
634 @param[in] State If TRUE, then the Machine Check Architecture feature must be enabled.
635 If FALSE, then the Machine Check Architecture feature must be disabled.
637 @retval RETURN_SUCCESS Machine Check Architecture feature is initialized.
639 @note This service could be called by BSP only.
644 IN UINTN ProcessorNumber
,
645 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
646 IN VOID
*ConfigData
, OPTIONAL
651 Detects if IA32_MCG_CTL feature supported on current processor.
653 @param[in] ProcessorNumber The index of the CPU executing this function.
654 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
655 structure for the CPU executing this function.
656 @param[in] ConfigData A pointer to the configuration buffer returned
657 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
658 CPU_FEATURE_GET_CONFIG_DATA was not provided in
659 RegisterCpuFeature().
661 @retval TRUE IA32_MCG_CTL feature is supported.
662 @retval FALSE IA32_MCG_CTL feature is not supported.
664 @note This service could be called by BSP/APs.
669 IN UINTN ProcessorNumber
,
670 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
671 IN VOID
*ConfigData OPTIONAL
675 Initializes IA32_MCG_CTL feature to specific state.
677 @param[in] ProcessorNumber The index of the CPU executing this function.
678 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
679 structure for the CPU executing this function.
680 @param[in] ConfigData A pointer to the configuration buffer returned
681 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
682 CPU_FEATURE_GET_CONFIG_DATA was not provided in
683 RegisterCpuFeature().
684 @param[in] State If TRUE, then the IA32_MCG_CTL feature must be enabled.
685 If FALSE, then the IA32_MCG_CTL feature must be disabled.
687 @retval RETURN_SUCCESS IA32_MCG_CTL feature is initialized.
689 @note This service could be called by BSP only.
694 IN UINTN ProcessorNumber
,
695 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
696 IN VOID
*ConfigData
, OPTIONAL
701 Detects if Pending Break feature supported on current processor.
703 @param[in] ProcessorNumber The index of the CPU executing this function.
704 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
705 structure for the CPU executing this function.
706 @param[in] ConfigData A pointer to the configuration buffer returned
707 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
708 CPU_FEATURE_GET_CONFIG_DATA was not provided in
709 RegisterCpuFeature().
711 @retval TRUE Pending Break feature is supported.
712 @retval FALSE Pending Break feature is not supported.
714 @note This service could be called by BSP/APs.
718 PendingBreakSupport (
719 IN UINTN ProcessorNumber
,
720 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
721 IN VOID
*ConfigData OPTIONAL
725 Initializes Pending Break feature to specific state.
727 @param[in] ProcessorNumber The index of the CPU executing this function.
728 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
729 structure for the CPU executing this function.
730 @param[in] ConfigData A pointer to the configuration buffer returned
731 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
732 CPU_FEATURE_GET_CONFIG_DATA was not provided in
733 RegisterCpuFeature().
734 @param[in] State If TRUE, then the Pending Break feature must be enabled.
735 If FALSE, then the Pending Break feature must be disabled.
737 @retval RETURN_SUCCESS Pending Break feature is initialized.
739 @note This service could be called by BSP only.
743 PendingBreakInitialize (
744 IN UINTN ProcessorNumber
,
745 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
746 IN VOID
*ConfigData
, OPTIONAL
751 Detects if C1E feature supported on current processor.
753 @param[in] ProcessorNumber The index of the CPU executing this function.
754 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
755 structure for the CPU executing this function.
756 @param[in] ConfigData A pointer to the configuration buffer returned
757 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
758 CPU_FEATURE_GET_CONFIG_DATA was not provided in
759 RegisterCpuFeature().
761 @retval TRUE C1E feature is supported.
762 @retval FALSE C1E feature is not supported.
764 @note This service could be called by BSP/APs.
769 IN UINTN ProcessorNumber
,
770 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
771 IN VOID
*ConfigData OPTIONAL
775 Initializes C1E feature to specific state.
777 @param[in] ProcessorNumber The index of the CPU executing this function.
778 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
779 structure for the CPU executing this function.
780 @param[in] ConfigData A pointer to the configuration buffer returned
781 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
782 CPU_FEATURE_GET_CONFIG_DATA was not provided in
783 RegisterCpuFeature().
784 @param[in] State If TRUE, then the C1E feature must be enabled.
785 If FALSE, then the C1E feature must be disabled.
787 @retval RETURN_SUCCESS C1E feature is initialized.
789 @note This service could be called by BSP only.
794 IN UINTN ProcessorNumber
,
795 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
796 IN VOID
*ConfigData
, OPTIONAL
801 Detects if X2Apci feature supported on current processor.
803 Detect if X2Apci has been already enabled.
805 @param[in] ProcessorNumber The index of the CPU executing this function.
806 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
807 structure for the CPU executing this function.
808 @param[in] ConfigData A pointer to the configuration buffer returned
809 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
810 CPU_FEATURE_GET_CONFIG_DATA was not provided in
811 RegisterCpuFeature().
813 @retval TRUE X2Apci feature is supported.
814 @retval FALSE X2Apci feature is not supported.
816 @note This service could be called by BSP/APs.
821 IN UINTN ProcessorNumber
,
822 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
823 IN VOID
*ConfigData OPTIONAL
827 Initializes X2Apci feature to specific state.
829 @param[in] ProcessorNumber The index of the CPU executing this function.
830 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
831 structure for the CPU executing this function.
832 @param[in] ConfigData A pointer to the configuration buffer returned
833 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
834 CPU_FEATURE_GET_CONFIG_DATA was not provided in
835 RegisterCpuFeature().
836 @param[in] State If TRUE, then the X2Apci feature must be enabled.
837 If FALSE, then the X2Apci feature must be disabled.
839 @retval RETURN_SUCCESS X2Apci feature is initialized.
841 @note This service could be called by BSP only.
846 IN UINTN ProcessorNumber
,
847 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
848 IN VOID
*ConfigData
, OPTIONAL
853 Prepares for the data used by CPU feature detection and initialization.
855 @param[in] NumberOfProcessors The number of CPUs in the platform.
857 @return Pointer to a buffer of CPU related configuration data.
859 @note This service could be called by BSP only.
863 FeatureControlGetConfigData (
864 IN UINTN NumberOfProcessors