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 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 feature must be enabled.
359 If FALSE, then the VMX feature must be disabled.
361 @retval RETURN_SUCCESS VMX feature is initialized.
363 @note This service could be called by BSP only.
368 IN UINTN ProcessorNumber
,
369 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
370 IN VOID
*ConfigData
, OPTIONAL
375 Detects if Lock Feature Control Register feature supported on current processor.
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().
385 @retval TRUE Lock Feature Control Register feature is supported.
386 @retval FALSE Lock Feature Control Register feature is not supported.
388 @note This service could be called by BSP/APs.
392 LockFeatureControlRegisterSupport (
393 IN UINTN ProcessorNumber
,
394 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
395 IN VOID
*ConfigData OPTIONAL
399 Initializes Lock Feature Control Register feature to specific state.
401 @param[in] ProcessorNumber The index of the CPU executing this function.
402 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
403 structure for the CPU executing this function.
404 @param[in] ConfigData A pointer to the configuration buffer returned
405 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
406 CPU_FEATURE_GET_CONFIG_DATA was not provided in
407 RegisterCpuFeature().
408 @param[in] State If TRUE, then the Lock Feature Control Register feature must be enabled.
409 If FALSE, then the Lock Feature Control Register feature must be disabled.
411 @retval RETURN_SUCCESS Lock Feature Control Register feature is initialized.
413 @note This service could be called by BSP only.
417 LockFeatureControlRegisterInitialize (
418 IN UINTN ProcessorNumber
,
419 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
420 IN VOID
*ConfigData
, OPTIONAL
425 Detects if SMX feature supported on current processor.
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().
435 @retval TRUE SMX feature is supported.
436 @retval FALSE SMX feature is not supported.
438 @note This service could be called by BSP/APs.
443 IN UINTN ProcessorNumber
,
444 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
445 IN VOID
*ConfigData OPTIONAL
449 Initializes SMX feature to specific state.
451 @param[in] ProcessorNumber The index of the CPU executing this function.
452 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
453 structure for the CPU executing this function.
454 @param[in] ConfigData A pointer to the configuration buffer returned
455 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
456 CPU_FEATURE_GET_CONFIG_DATA was not provided in
457 RegisterCpuFeature().
458 @param[in] State If TRUE, then SMX feature must be enabled.
459 If FALSE, then SMX feature must be disabled.
461 @retval RETURN_SUCCESS SMX feature is initialized.
462 @retval RETURN_UNSUPPORTED VMX not initialized.
464 @note This service could be called by BSP only.
469 IN UINTN ProcessorNumber
,
470 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
471 IN VOID
*ConfigData
, OPTIONAL
476 Detects if LimitCpuidMaxval feature supported on current processor.
478 @param[in] ProcessorNumber The index of the CPU executing this function.
479 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
480 structure for the CPU executing this function.
481 @param[in] ConfigData A pointer to the configuration buffer returned
482 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
483 CPU_FEATURE_GET_CONFIG_DATA was not provided in
484 RegisterCpuFeature().
486 @retval TRUE LimitCpuidMaxval feature is supported.
487 @retval FALSE LimitCpuidMaxval feature is not supported.
489 @note This service could be called by BSP/APs.
493 LimitCpuidMaxvalSupport (
494 IN UINTN ProcessorNumber
,
495 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
496 IN VOID
*ConfigData OPTIONAL
500 Initializes LimitCpuidMaxval feature to specific state.
502 @param[in] ProcessorNumber The index of the CPU executing this function.
503 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
504 structure for the CPU executing this function.
505 @param[in] ConfigData A pointer to the configuration buffer returned
506 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
507 CPU_FEATURE_GET_CONFIG_DATA was not provided in
508 RegisterCpuFeature().
509 @param[in] State If TRUE, then the LimitCpuidMaxval feature must be enabled.
510 If FALSE, then the LimitCpuidMaxval feature must be disabled.
512 @retval RETURN_SUCCESS LimitCpuidMaxval feature is initialized.
514 @note This service could be called by BSP only.
518 LimitCpuidMaxvalInitialize (
519 IN UINTN ProcessorNumber
,
520 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
521 IN VOID
*ConfigData
, OPTIONAL
526 Detects if Machine Check Exception feature supported on current processor.
528 @param[in] ProcessorNumber The index of the CPU executing this function.
529 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
530 structure for the CPU executing this function.
531 @param[in] ConfigData A pointer to the configuration buffer returned
532 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
533 CPU_FEATURE_GET_CONFIG_DATA was not provided in
534 RegisterCpuFeature().
536 @retval TRUE Machine Check Exception feature is supported.
537 @retval FALSE Machine Check Exception feature is not supported.
539 @note This service could be called by BSP/APs.
544 IN UINTN ProcessorNumber
,
545 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
546 IN VOID
*ConfigData OPTIONAL
550 Initializes Machine Check Exception feature to specific state.
552 @param[in] ProcessorNumber The index of the CPU executing this function.
553 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
554 structure for the CPU executing this function.
555 @param[in] ConfigData A pointer to the configuration buffer returned
556 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
557 CPU_FEATURE_GET_CONFIG_DATA was not provided in
558 RegisterCpuFeature().
559 @param[in] State If TRUE, then the Machine Check Exception feature must be enabled.
560 If FALSE, then the Machine Check Exception feature must be disabled.
562 @retval RETURN_SUCCESS Machine Check Exception feature is initialized.
564 @note This service could be called by BSP only.
569 IN UINTN ProcessorNumber
,
570 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
571 IN VOID
*ConfigData
, OPTIONAL
576 Detects if Machine Check Architecture feature supported on current processor.
578 @param[in] ProcessorNumber The index of the CPU executing this function.
579 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
580 structure for the CPU executing this function.
581 @param[in] ConfigData A pointer to the configuration buffer returned
582 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
583 CPU_FEATURE_GET_CONFIG_DATA was not provided in
584 RegisterCpuFeature().
586 @retval TRUE Machine Check Architecture feature is supported.
587 @retval FALSE Machine Check Architecture feature is not supported.
589 @note This service could be called by BSP/APs.
594 IN UINTN ProcessorNumber
,
595 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
596 IN VOID
*ConfigData OPTIONAL
600 Initializes Machine Check Architecture feature to specific state.
602 @param[in] ProcessorNumber The index of the CPU executing this function.
603 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
604 structure for the CPU executing this function.
605 @param[in] ConfigData A pointer to the configuration buffer returned
606 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
607 CPU_FEATURE_GET_CONFIG_DATA was not provided in
608 RegisterCpuFeature().
609 @param[in] State If TRUE, then the Machine Check Architecture feature must be enabled.
610 If FALSE, then the Machine Check Architecture feature must be disabled.
612 @retval RETURN_SUCCESS Machine Check Architecture feature is initialized.
614 @note This service could be called by BSP only.
619 IN UINTN ProcessorNumber
,
620 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
621 IN VOID
*ConfigData
, OPTIONAL
626 Detects if IA32_MCG_CTL feature supported on current processor.
628 @param[in] ProcessorNumber The index of the CPU executing this function.
629 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
630 structure for the CPU executing this function.
631 @param[in] ConfigData A pointer to the configuration buffer returned
632 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
633 CPU_FEATURE_GET_CONFIG_DATA was not provided in
634 RegisterCpuFeature().
636 @retval TRUE IA32_MCG_CTL feature is supported.
637 @retval FALSE IA32_MCG_CTL feature is not supported.
639 @note This service could be called by BSP/APs.
644 IN UINTN ProcessorNumber
,
645 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
646 IN VOID
*ConfigData OPTIONAL
650 Initializes IA32_MCG_CTL feature to specific state.
652 @param[in] ProcessorNumber The index of the CPU executing this function.
653 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
654 structure for the CPU executing this function.
655 @param[in] ConfigData A pointer to the configuration buffer returned
656 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
657 CPU_FEATURE_GET_CONFIG_DATA was not provided in
658 RegisterCpuFeature().
659 @param[in] State If TRUE, then the IA32_MCG_CTL feature must be enabled.
660 If FALSE, then the IA32_MCG_CTL feature must be disabled.
662 @retval RETURN_SUCCESS IA32_MCG_CTL feature is initialized.
664 @note This service could be called by BSP only.
669 IN UINTN ProcessorNumber
,
670 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
671 IN VOID
*ConfigData
, OPTIONAL
676 Detects if Pending Break feature supported on current processor.
678 @param[in] ProcessorNumber The index of the CPU executing this function.
679 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
680 structure for the CPU executing this function.
681 @param[in] ConfigData A pointer to the configuration buffer returned
682 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
683 CPU_FEATURE_GET_CONFIG_DATA was not provided in
684 RegisterCpuFeature().
686 @retval TRUE Pending Break feature is supported.
687 @retval FALSE Pending Break feature is not supported.
689 @note This service could be called by BSP/APs.
693 PendingBreakSupport (
694 IN UINTN ProcessorNumber
,
695 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
696 IN VOID
*ConfigData OPTIONAL
700 Initializes Pending Break feature to specific state.
702 @param[in] ProcessorNumber The index of the CPU executing this function.
703 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
704 structure for the CPU executing this function.
705 @param[in] ConfigData A pointer to the configuration buffer returned
706 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
707 CPU_FEATURE_GET_CONFIG_DATA was not provided in
708 RegisterCpuFeature().
709 @param[in] State If TRUE, then the Pending Break feature must be enabled.
710 If FALSE, then the Pending Break feature must be disabled.
712 @retval RETURN_SUCCESS Pending Break feature is initialized.
714 @note This service could be called by BSP only.
718 PendingBreakInitialize (
719 IN UINTN ProcessorNumber
,
720 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
721 IN VOID
*ConfigData
, OPTIONAL
726 Detects if C1E feature supported on current processor.
728 @param[in] ProcessorNumber The index of the CPU executing this function.
729 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
730 structure for the CPU executing this function.
731 @param[in] ConfigData A pointer to the configuration buffer returned
732 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
733 CPU_FEATURE_GET_CONFIG_DATA was not provided in
734 RegisterCpuFeature().
736 @retval TRUE C1E feature is supported.
737 @retval FALSE C1E feature is not supported.
739 @note This service could be called by BSP/APs.
744 IN UINTN ProcessorNumber
,
745 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
746 IN VOID
*ConfigData OPTIONAL
750 Initializes C1E feature to specific state.
752 @param[in] ProcessorNumber The index of the CPU executing this function.
753 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
754 structure for the CPU executing this function.
755 @param[in] ConfigData A pointer to the configuration buffer returned
756 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
757 CPU_FEATURE_GET_CONFIG_DATA was not provided in
758 RegisterCpuFeature().
759 @param[in] State If TRUE, then the C1E feature must be enabled.
760 If FALSE, then the C1E feature must be disabled.
762 @retval RETURN_SUCCESS C1E feature is initialized.
764 @note This service could be called by BSP only.
769 IN UINTN ProcessorNumber
,
770 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
771 IN VOID
*ConfigData
, OPTIONAL
776 Prepares for the data used by CPU feature detection and initialization.
778 @param[in] NumberOfProcessors The number of CPUs in the platform.
780 @return Pointer to a buffer of CPU related configuration data.
782 @note This service could be called by BSP only.
786 X2ApicGetConfigData (
787 IN UINTN NumberOfProcessors
791 Detects if X2Apci feature supported on current processor.
793 Detect if X2Apci has been already enabled.
795 @param[in] ProcessorNumber The index of the CPU executing this function.
796 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
797 structure for the CPU executing this function.
798 @param[in] ConfigData A pointer to the configuration buffer returned
799 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
800 CPU_FEATURE_GET_CONFIG_DATA was not provided in
801 RegisterCpuFeature().
803 @retval TRUE X2Apci feature is supported.
804 @retval FALSE X2Apci feature is not supported.
806 @note This service could be called by BSP/APs.
811 IN UINTN ProcessorNumber
,
812 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
813 IN VOID
*ConfigData OPTIONAL
817 Initializes X2Apci feature to specific state.
819 @param[in] ProcessorNumber The index of the CPU executing this function.
820 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
821 structure for the CPU executing this function.
822 @param[in] ConfigData A pointer to the configuration buffer returned
823 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
824 CPU_FEATURE_GET_CONFIG_DATA was not provided in
825 RegisterCpuFeature().
826 @param[in] State If TRUE, then the X2Apci feature must be enabled.
827 If FALSE, then the X2Apci feature must be disabled.
829 @retval RETURN_SUCCESS X2Apci feature is initialized.
831 @note This service could be called by BSP only.
836 IN UINTN ProcessorNumber
,
837 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
838 IN VOID
*ConfigData
, OPTIONAL
843 Prepares for the data used by CPU feature detection and initialization.
845 @param[in] NumberOfProcessors The number of CPUs in the platform.
847 @return Pointer to a buffer of CPU related configuration data.
849 @note This service could be called by BSP only.
853 FeatureControlGetConfigData (
854 IN UINTN NumberOfProcessors
858 Detects if Protected Processor Inventory Number feature supported on current
861 @param[in] ProcessorNumber The index of the CPU executing this function.
862 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
863 structure for the CPU executing this function.
864 @param[in] ConfigData A pointer to the configuration buffer returned
865 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
866 CPU_FEATURE_GET_CONFIG_DATA was not provided in
867 RegisterCpuFeature().
869 @retval TRUE Protected Processor Inventory Number feature is supported.
870 @retval FALSE Protected Processor Inventory Number feature is not supported.
872 @note This service could be called by BSP/APs.
877 IN UINTN ProcessorNumber
,
878 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
879 IN VOID
*ConfigData OPTIONAL
883 Initializes Protected Processor Inventory Number feature to specific state.
885 @param[in] ProcessorNumber The index of the CPU executing this function.
886 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
887 structure for the CPU executing this function.
888 @param[in] ConfigData A pointer to the configuration buffer returned
889 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
890 CPU_FEATURE_GET_CONFIG_DATA was not provided in
891 RegisterCpuFeature().
892 @param[in] State If TRUE, then the Protected Processor Inventory
893 Number feature must be enabled.
894 If FALSE, then the Protected Processor Inventory
895 Number feature must be disabled.
897 @retval RETURN_SUCCESS Protected Processor Inventory Number feature is
899 @retval RETURN_DEVICE_ERROR Device can't change state because it has been
906 IN UINTN ProcessorNumber
,
907 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
908 IN VOID
*ConfigData
, OPTIONAL
913 Detects if Local machine check exception feature supported on current
916 @param[in] ProcessorNumber The index of the CPU executing this function.
917 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
918 structure for the CPU executing this function.
919 @param[in] ConfigData A pointer to the configuration buffer returned
920 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
921 CPU_FEATURE_GET_CONFIG_DATA was not provided in
922 RegisterCpuFeature().
924 @retval TRUE Local machine check exception feature is supported.
925 @retval FALSE Local machine check exception feature is not supported.
927 @note This service could be called by BSP/APs.
932 IN UINTN ProcessorNumber
,
933 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
934 IN VOID
*ConfigData OPTIONAL
938 Initializes Local machine check exception feature to specific state.
940 @param[in] ProcessorNumber The index of the CPU executing this function.
941 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
942 structure for the CPU executing this function.
943 @param[in] ConfigData A pointer to the configuration buffer returned
944 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
945 CPU_FEATURE_GET_CONFIG_DATA was not provided in
946 RegisterCpuFeature().
947 @param[in] State If TRUE, then the Local machine check exception
948 feature must be enabled.
949 If FALSE, then the Local machine check exception
950 feature must be disabled.
952 @retval RETURN_SUCCESS Local machine check exception feature is initialized.
958 IN UINTN ProcessorNumber
,
959 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
960 IN VOID
*ConfigData
, OPTIONAL
965 Prepares for the data used by CPU feature detection and initialization.
967 @param[in] NumberOfProcessors The number of CPUs in the platform.
969 @return Pointer to a buffer of CPU related configuration data.
971 @note This service could be called by BSP only.
975 ProcTraceGetConfigData (
976 IN UINTN NumberOfProcessors
980 Detects if Intel Processor Trace feature supported on current processor.
982 @param[in] ProcessorNumber The index of the CPU executing this function.
983 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
984 structure for the CPU executing this function.
985 @param[in] ConfigData A pointer to the configuration buffer returned
986 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
987 CPU_FEATURE_GET_CONFIG_DATA was not provided in
988 RegisterCpuFeature().
990 @retval TRUE Processor Trace feature is supported.
991 @retval FALSE Processor Trace feature is not supported.
993 @note This service could be called by BSP/APs.
998 IN UINTN ProcessorNumber
,
999 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
1000 IN VOID
*ConfigData OPTIONAL
1004 Initializes Intel Processor Trace feature to specific state.
1006 @param[in] ProcessorNumber The index of the CPU executing this function.
1007 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
1008 structure for the CPU executing this function.
1009 @param[in] ConfigData A pointer to the configuration buffer returned
1010 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
1011 CPU_FEATURE_GET_CONFIG_DATA was not provided in
1012 RegisterCpuFeature().
1013 @param[in] State If TRUE, then the Processor Trace feature must be
1015 If FALSE, then the Processor Trace feature must be
1018 @retval RETURN_SUCCESS Intel Processor Trace feature is initialized.
1023 ProcTraceInitialize (
1024 IN UINTN ProcessorNumber
,
1025 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
1026 IN VOID
*ConfigData
, OPTIONAL