2 CPU Common features library header file.
4 Copyright (c) 2017 - 2018, 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/Cpuid.h>
23 #include <Register/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 Detects if Clock Modulation feature supported on current processor.
93 @param[in] ProcessorNumber The index of the CPU executing this function.
94 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
95 structure for the CPU executing this function.
96 @param[in] ConfigData A pointer to the configuration buffer returned
97 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
98 CPU_FEATURE_GET_CONFIG_DATA was not provided in
101 @retval TRUE Clock Modulation feature is supported.
102 @retval FALSE Clock Modulation feature is not supported.
104 @note This service could be called by BSP/APs.
108 ClockModulationSupport (
109 IN UINTN ProcessorNumber
,
110 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
111 IN VOID
*ConfigData OPTIONAL
115 Initializes Clock Modulation feature to specific state.
117 @param[in] ProcessorNumber The index of the CPU executing this function.
118 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
119 structure for the CPU executing this function.
120 @param[in] ConfigData A pointer to the configuration buffer returned
121 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
122 CPU_FEATURE_GET_CONFIG_DATA was not provided in
123 RegisterCpuFeature().
124 @param[in] State If TRUE, then the Clock Modulation feature must be enabled.
125 If FALSE, then the Clock Modulation feature must be disabled.
127 @retval RETURN_SUCCESS Clock Modulation feature is initialized.
129 @note This service could be called by BSP only.
133 ClockModulationInitialize (
134 IN UINTN ProcessorNumber
,
135 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
136 IN VOID
*ConfigData
, OPTIONAL
141 Detects if Enhanced Intel SpeedStep feature supported on current processor.
143 @param[in] ProcessorNumber The index of the CPU executing this function.
144 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
145 structure for the CPU executing this function.
146 @param[in] ConfigData A pointer to the configuration buffer returned
147 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
148 CPU_FEATURE_GET_CONFIG_DATA was not provided in
149 RegisterCpuFeature().
151 @retval TRUE Enhanced Intel SpeedStep feature is supported.
152 @retval FALSE Enhanced Intel SpeedStep feature is not supported.
154 @note This service could be called by BSP/APs.
159 IN UINTN ProcessorNumber
,
160 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
161 IN VOID
*ConfigData OPTIONAL
165 Initializes Enhanced Intel SpeedStep feature to specific state.
167 @param[in] ProcessorNumber The index of the CPU executing this function.
168 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
169 structure for the CPU executing this function.
170 @param[in] ConfigData A pointer to the configuration buffer returned
171 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
172 CPU_FEATURE_GET_CONFIG_DATA was not provided in
173 RegisterCpuFeature().
174 @param[in] State If TRUE, then the Enhanced Intel SpeedStep feature
176 If FALSE, then the Enhanced Intel SpeedStep feature
179 @retval RETURN_SUCCESS Enhanced Intel SpeedStep feature is initialized.
181 @note This service could be called by BSP only.
186 IN UINTN ProcessorNumber
,
187 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
188 IN VOID
*ConfigData
, OPTIONAL
193 Detects if Execute Disable feature supported on current processor.
195 @param[in] ProcessorNumber The index of the CPU executing this function.
196 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
197 structure for the CPU executing this function.
198 @param[in] ConfigData A pointer to the configuration buffer returned
199 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
200 CPU_FEATURE_GET_CONFIG_DATA was not provided in
201 RegisterCpuFeature().
203 @retval TRUE Execute Disable feature is supported.
204 @retval FALSE Execute Disable feature is not supported.
206 @note This service could be called by BSP/APs.
210 ExecuteDisableSupport (
211 IN UINTN ProcessorNumber
,
212 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
213 IN VOID
*ConfigData OPTIONAL
217 Initializes Execute Disable feature to specific state.
219 @param[in] ProcessorNumber The index of the CPU executing this function.
220 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
221 structure for the CPU executing this function.
222 @param[in] ConfigData A pointer to the configuration buffer returned
223 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
224 CPU_FEATURE_GET_CONFIG_DATA was not provided in
225 RegisterCpuFeature().
226 @param[in] State If TRUE, then the Execute Disable feature must be enabled.
227 If FALSE, then the Execute Disable feature must be disabled.
229 @retval RETURN_SUCCESS Execute Disable feature is initialized.
231 @note This service could be called by BSP only.
235 ExecuteDisableInitialize (
236 IN UINTN ProcessorNumber
,
237 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
238 IN VOID
*ConfigData
, OPTIONAL
243 Initializes Fast-Strings feature to specific state.
245 @param[in] ProcessorNumber The index of the CPU executing this function.
246 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
247 structure for the CPU executing this function.
248 @param[in] ConfigData A pointer to the configuration buffer returned
249 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
250 CPU_FEATURE_GET_CONFIG_DATA was not provided in
251 RegisterCpuFeature().
252 @param[in] State If TRUE, then the Fast-Strings feature must be enabled.
253 If FALSE, then the Fast-Strings feature must be disabled.
255 @retval RETURN_SUCCESS Fast-Strings feature is initialized.
257 @note This service could be called by BSP only.
261 FastStringsInitialize (
262 IN UINTN ProcessorNumber
,
263 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
264 IN VOID
*ConfigData
, OPTIONAL
269 Detects if MONITOR/MWAIT feature supported on current processor.
271 @param[in] ProcessorNumber The index of the CPU executing this function.
272 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
273 structure for the CPU executing this function.
274 @param[in] ConfigData A pointer to the configuration buffer returned
275 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
276 CPU_FEATURE_GET_CONFIG_DATA was not provided in
277 RegisterCpuFeature().
279 @retval TRUE MONITOR/MWAIT feature is supported.
280 @retval FALSE MONITOR/MWAIT feature is not supported.
282 @note This service could be called by BSP/APs.
286 MonitorMwaitSupport (
287 IN UINTN ProcessorNumber
,
288 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
289 IN VOID
*ConfigData OPTIONAL
293 Initializes MONITOR/MWAIT feature to specific state.
295 @param[in] ProcessorNumber The index of the CPU executing this function.
296 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
297 structure for the CPU executing this function.
298 @param[in] ConfigData A pointer to the configuration buffer returned
299 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
300 CPU_FEATURE_GET_CONFIG_DATA was not provided in
301 RegisterCpuFeature().
302 @param[in] State If TRUE, then the MONITOR/MWAIT feature must be enabled.
303 If FALSE, then the MONITOR/MWAIT feature must be disabled.
305 @retval RETURN_SUCCESS MONITOR/MWAIT feature is initialized.
307 @note This service could be called by BSP only.
311 MonitorMwaitInitialize (
312 IN UINTN ProcessorNumber
,
313 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
314 IN VOID
*ConfigData
, OPTIONAL
319 Detects if VMX feature supported on current processor.
321 @param[in] ProcessorNumber The index of the CPU executing this function.
322 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
323 structure for the CPU executing this function.
324 @param[in] ConfigData A pointer to the configuration buffer returned
325 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
326 CPU_FEATURE_GET_CONFIG_DATA was not provided in
327 RegisterCpuFeature().
329 @retval TRUE VMX feature is supported.
330 @retval FALSE VMX feature is not supported.
332 @note This service could be called by BSP/APs.
337 IN UINTN ProcessorNumber
,
338 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
339 IN VOID
*ConfigData OPTIONAL
343 Initializes VMX feature to specific state.
345 @param[in] ProcessorNumber The index of the CPU executing this function.
346 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
347 structure for the CPU executing this function.
348 @param[in] ConfigData A pointer to the configuration buffer returned
349 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
350 CPU_FEATURE_GET_CONFIG_DATA was not provided in
351 RegisterCpuFeature().
352 @param[in] State If TRUE, then the VMX feature must be enabled.
353 If FALSE, then the VMX feature must be disabled.
355 @retval RETURN_SUCCESS VMX feature is initialized.
357 @note This service could be called by BSP only.
362 IN UINTN ProcessorNumber
,
363 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
364 IN VOID
*ConfigData
, OPTIONAL
369 Detects if Lock Feature Control Register feature supported on current processor.
371 @param[in] ProcessorNumber The index of the CPU executing this function.
372 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
373 structure for the CPU executing this function.
374 @param[in] ConfigData A pointer to the configuration buffer returned
375 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
376 CPU_FEATURE_GET_CONFIG_DATA was not provided in
377 RegisterCpuFeature().
379 @retval TRUE Lock Feature Control Register feature is supported.
380 @retval FALSE Lock Feature Control Register feature is not supported.
382 @note This service could be called by BSP/APs.
386 LockFeatureControlRegisterSupport (
387 IN UINTN ProcessorNumber
,
388 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
389 IN VOID
*ConfigData OPTIONAL
393 Initializes Lock Feature Control Register feature to specific state.
395 @param[in] ProcessorNumber The index of the CPU executing this function.
396 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
397 structure for the CPU executing this function.
398 @param[in] ConfigData A pointer to the configuration buffer returned
399 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
400 CPU_FEATURE_GET_CONFIG_DATA was not provided in
401 RegisterCpuFeature().
402 @param[in] State If TRUE, then the Lock Feature Control Register feature must be enabled.
403 If FALSE, then the Lock Feature Control Register feature must be disabled.
405 @retval RETURN_SUCCESS Lock Feature Control Register feature is initialized.
407 @note This service could be called by BSP only.
411 LockFeatureControlRegisterInitialize (
412 IN UINTN ProcessorNumber
,
413 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
414 IN VOID
*ConfigData
, OPTIONAL
419 Detects if SMX feature supported on current processor.
421 @param[in] ProcessorNumber The index of the CPU executing this function.
422 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
423 structure for the CPU executing this function.
424 @param[in] ConfigData A pointer to the configuration buffer returned
425 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
426 CPU_FEATURE_GET_CONFIG_DATA was not provided in
427 RegisterCpuFeature().
429 @retval TRUE SMX feature is supported.
430 @retval FALSE SMX feature is not supported.
432 @note This service could be called by BSP/APs.
437 IN UINTN ProcessorNumber
,
438 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
439 IN VOID
*ConfigData OPTIONAL
443 Initializes SMX feature to specific state.
445 @param[in] ProcessorNumber The index of the CPU executing this function.
446 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
447 structure for the CPU executing this function.
448 @param[in] ConfigData A pointer to the configuration buffer returned
449 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
450 CPU_FEATURE_GET_CONFIG_DATA was not provided in
451 RegisterCpuFeature().
452 @param[in] State If TRUE, then SMX feature must be enabled.
453 If FALSE, then SMX feature must be disabled.
455 @retval RETURN_SUCCESS SMX feature is initialized.
456 @retval RETURN_UNSUPPORTED VMX not initialized.
458 @note This service could be called by BSP only.
463 IN UINTN ProcessorNumber
,
464 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
465 IN VOID
*ConfigData
, OPTIONAL
470 Detects if LimitCpuidMaxval feature supported on current processor.
472 @param[in] ProcessorNumber The index of the CPU executing this function.
473 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
474 structure for the CPU executing this function.
475 @param[in] ConfigData A pointer to the configuration buffer returned
476 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
477 CPU_FEATURE_GET_CONFIG_DATA was not provided in
478 RegisterCpuFeature().
480 @retval TRUE LimitCpuidMaxval feature is supported.
481 @retval FALSE LimitCpuidMaxval feature is not supported.
483 @note This service could be called by BSP/APs.
487 LimitCpuidMaxvalSupport (
488 IN UINTN ProcessorNumber
,
489 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
490 IN VOID
*ConfigData OPTIONAL
494 Initializes LimitCpuidMaxval feature to specific state.
496 @param[in] ProcessorNumber The index of the CPU executing this function.
497 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
498 structure for the CPU executing this function.
499 @param[in] ConfigData A pointer to the configuration buffer returned
500 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
501 CPU_FEATURE_GET_CONFIG_DATA was not provided in
502 RegisterCpuFeature().
503 @param[in] State If TRUE, then the LimitCpuidMaxval feature must be enabled.
504 If FALSE, then the LimitCpuidMaxval feature must be disabled.
506 @retval RETURN_SUCCESS LimitCpuidMaxval feature is initialized.
508 @note This service could be called by BSP only.
512 LimitCpuidMaxvalInitialize (
513 IN UINTN ProcessorNumber
,
514 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
515 IN VOID
*ConfigData
, OPTIONAL
520 Detects if Machine Check Exception feature supported on current processor.
522 @param[in] ProcessorNumber The index of the CPU executing this function.
523 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
524 structure for the CPU executing this function.
525 @param[in] ConfigData A pointer to the configuration buffer returned
526 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
527 CPU_FEATURE_GET_CONFIG_DATA was not provided in
528 RegisterCpuFeature().
530 @retval TRUE Machine Check Exception feature is supported.
531 @retval FALSE Machine Check Exception feature is not supported.
533 @note This service could be called by BSP/APs.
538 IN UINTN ProcessorNumber
,
539 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
540 IN VOID
*ConfigData OPTIONAL
544 Initializes Machine Check Exception feature to specific state.
546 @param[in] ProcessorNumber The index of the CPU executing this function.
547 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
548 structure for the CPU executing this function.
549 @param[in] ConfigData A pointer to the configuration buffer returned
550 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
551 CPU_FEATURE_GET_CONFIG_DATA was not provided in
552 RegisterCpuFeature().
553 @param[in] State If TRUE, then the Machine Check Exception feature must be enabled.
554 If FALSE, then the Machine Check Exception feature must be disabled.
556 @retval RETURN_SUCCESS Machine Check Exception feature is initialized.
558 @note This service could be called by BSP only.
563 IN UINTN ProcessorNumber
,
564 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
565 IN VOID
*ConfigData
, OPTIONAL
570 Detects if Machine Check Architecture feature supported on current processor.
572 @param[in] ProcessorNumber The index of the CPU executing this function.
573 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
574 structure for the CPU executing this function.
575 @param[in] ConfigData A pointer to the configuration buffer returned
576 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
577 CPU_FEATURE_GET_CONFIG_DATA was not provided in
578 RegisterCpuFeature().
580 @retval TRUE Machine Check Architecture feature is supported.
581 @retval FALSE Machine Check Architecture feature is not supported.
583 @note This service could be called by BSP/APs.
588 IN UINTN ProcessorNumber
,
589 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
590 IN VOID
*ConfigData OPTIONAL
594 Initializes Machine Check Architecture feature to specific state.
596 @param[in] ProcessorNumber The index of the CPU executing this function.
597 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
598 structure for the CPU executing this function.
599 @param[in] ConfigData A pointer to the configuration buffer returned
600 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
601 CPU_FEATURE_GET_CONFIG_DATA was not provided in
602 RegisterCpuFeature().
603 @param[in] State If TRUE, then the Machine Check Architecture feature must be enabled.
604 If FALSE, then the Machine Check Architecture feature must be disabled.
606 @retval RETURN_SUCCESS Machine Check Architecture feature is initialized.
608 @note This service could be called by BSP only.
613 IN UINTN ProcessorNumber
,
614 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
615 IN VOID
*ConfigData
, OPTIONAL
620 Detects if IA32_MCG_CTL feature supported on current processor.
622 @param[in] ProcessorNumber The index of the CPU executing this function.
623 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
624 structure for the CPU executing this function.
625 @param[in] ConfigData A pointer to the configuration buffer returned
626 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
627 CPU_FEATURE_GET_CONFIG_DATA was not provided in
628 RegisterCpuFeature().
630 @retval TRUE IA32_MCG_CTL feature is supported.
631 @retval FALSE IA32_MCG_CTL feature is not supported.
633 @note This service could be called by BSP/APs.
638 IN UINTN ProcessorNumber
,
639 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
640 IN VOID
*ConfigData OPTIONAL
644 Initializes IA32_MCG_CTL feature to specific state.
646 @param[in] ProcessorNumber The index of the CPU executing this function.
647 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
648 structure for the CPU executing this function.
649 @param[in] ConfigData A pointer to the configuration buffer returned
650 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
651 CPU_FEATURE_GET_CONFIG_DATA was not provided in
652 RegisterCpuFeature().
653 @param[in] State If TRUE, then the IA32_MCG_CTL feature must be enabled.
654 If FALSE, then the IA32_MCG_CTL feature must be disabled.
656 @retval RETURN_SUCCESS IA32_MCG_CTL feature is initialized.
658 @note This service could be called by BSP only.
663 IN UINTN ProcessorNumber
,
664 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
665 IN VOID
*ConfigData
, OPTIONAL
670 Detects if Pending Break feature supported on current processor.
672 @param[in] ProcessorNumber The index of the CPU executing this function.
673 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
674 structure for the CPU executing this function.
675 @param[in] ConfigData A pointer to the configuration buffer returned
676 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
677 CPU_FEATURE_GET_CONFIG_DATA was not provided in
678 RegisterCpuFeature().
680 @retval TRUE Pending Break feature is supported.
681 @retval FALSE Pending Break feature is not supported.
683 @note This service could be called by BSP/APs.
687 PendingBreakSupport (
688 IN UINTN ProcessorNumber
,
689 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
690 IN VOID
*ConfigData OPTIONAL
694 Initializes Pending Break feature to specific state.
696 @param[in] ProcessorNumber The index of the CPU executing this function.
697 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
698 structure for the CPU executing this function.
699 @param[in] ConfigData A pointer to the configuration buffer returned
700 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
701 CPU_FEATURE_GET_CONFIG_DATA was not provided in
702 RegisterCpuFeature().
703 @param[in] State If TRUE, then the Pending Break feature must be enabled.
704 If FALSE, then the Pending Break feature must be disabled.
706 @retval RETURN_SUCCESS Pending Break feature is initialized.
708 @note This service could be called by BSP only.
712 PendingBreakInitialize (
713 IN UINTN ProcessorNumber
,
714 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
715 IN VOID
*ConfigData
, OPTIONAL
720 Detects if C1E feature supported on current processor.
722 @param[in] ProcessorNumber The index of the CPU executing this function.
723 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
724 structure for the CPU executing this function.
725 @param[in] ConfigData A pointer to the configuration buffer returned
726 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
727 CPU_FEATURE_GET_CONFIG_DATA was not provided in
728 RegisterCpuFeature().
730 @retval TRUE C1E feature is supported.
731 @retval FALSE C1E feature is not supported.
733 @note This service could be called by BSP/APs.
738 IN UINTN ProcessorNumber
,
739 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
740 IN VOID
*ConfigData OPTIONAL
744 Initializes C1E feature to specific state.
746 @param[in] ProcessorNumber The index of the CPU executing this function.
747 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
748 structure for the CPU executing this function.
749 @param[in] ConfigData A pointer to the configuration buffer returned
750 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
751 CPU_FEATURE_GET_CONFIG_DATA was not provided in
752 RegisterCpuFeature().
753 @param[in] State If TRUE, then the C1E feature must be enabled.
754 If FALSE, then the C1E feature must be disabled.
756 @retval RETURN_SUCCESS C1E feature is initialized.
758 @note This service could be called by BSP only.
763 IN UINTN ProcessorNumber
,
764 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
765 IN VOID
*ConfigData
, OPTIONAL
770 Prepares for the data used by CPU feature detection and initialization.
772 @param[in] NumberOfProcessors The number of CPUs in the platform.
774 @return Pointer to a buffer of CPU related configuration data.
776 @note This service could be called by BSP only.
780 X2ApicGetConfigData (
781 IN UINTN NumberOfProcessors
785 Detects if X2Apci feature supported on current processor.
787 Detect if X2Apci has been already enabled.
789 @param[in] ProcessorNumber The index of the CPU executing this function.
790 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
791 structure for the CPU executing this function.
792 @param[in] ConfigData A pointer to the configuration buffer returned
793 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
794 CPU_FEATURE_GET_CONFIG_DATA was not provided in
795 RegisterCpuFeature().
797 @retval TRUE X2Apci feature is supported.
798 @retval FALSE X2Apci feature is not supported.
800 @note This service could be called by BSP/APs.
805 IN UINTN ProcessorNumber
,
806 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
807 IN VOID
*ConfigData OPTIONAL
811 Initializes X2Apci feature to specific state.
813 @param[in] ProcessorNumber The index of the CPU executing this function.
814 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
815 structure for the CPU executing this function.
816 @param[in] ConfigData A pointer to the configuration buffer returned
817 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
818 CPU_FEATURE_GET_CONFIG_DATA was not provided in
819 RegisterCpuFeature().
820 @param[in] State If TRUE, then the X2Apci feature must be enabled.
821 If FALSE, then the X2Apci feature must be disabled.
823 @retval RETURN_SUCCESS X2Apci feature is initialized.
825 @note This service could be called by BSP only.
830 IN UINTN ProcessorNumber
,
831 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
832 IN VOID
*ConfigData
, OPTIONAL
837 Prepares for the data used by CPU feature detection and initialization.
839 @param[in] NumberOfProcessors The number of CPUs in the platform.
841 @return Pointer to a buffer of CPU related configuration data.
843 @note This service could be called by BSP only.
847 FeatureControlGetConfigData (
848 IN UINTN NumberOfProcessors
852 Detects if Protected Processor Inventory Number feature supported on current
855 @param[in] ProcessorNumber The index of the CPU executing this function.
856 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
857 structure for the CPU executing this function.
858 @param[in] ConfigData A pointer to the configuration buffer returned
859 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
860 CPU_FEATURE_GET_CONFIG_DATA was not provided in
861 RegisterCpuFeature().
863 @retval TRUE Protected Processor Inventory Number feature is supported.
864 @retval FALSE Protected Processor Inventory Number feature is not supported.
866 @note This service could be called by BSP/APs.
871 IN UINTN ProcessorNumber
,
872 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
873 IN VOID
*ConfigData OPTIONAL
877 Initializes Protected Processor Inventory Number feature to specific state.
879 @param[in] ProcessorNumber The index of the CPU executing this function.
880 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
881 structure for the CPU executing this function.
882 @param[in] ConfigData A pointer to the configuration buffer returned
883 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
884 CPU_FEATURE_GET_CONFIG_DATA was not provided in
885 RegisterCpuFeature().
886 @param[in] State If TRUE, then the Protected Processor Inventory
887 Number feature must be enabled.
888 If FALSE, then the Protected Processor Inventory
889 Number feature must be disabled.
891 @retval RETURN_SUCCESS Protected Processor Inventory Number feature is
893 @retval RETURN_DEVICE_ERROR Device can't change state because it has been
900 IN UINTN ProcessorNumber
,
901 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
902 IN VOID
*ConfigData
, OPTIONAL
907 Detects if Local machine check exception feature supported on current
910 @param[in] ProcessorNumber The index of the CPU executing this function.
911 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
912 structure for the CPU executing this function.
913 @param[in] ConfigData A pointer to the configuration buffer returned
914 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
915 CPU_FEATURE_GET_CONFIG_DATA was not provided in
916 RegisterCpuFeature().
918 @retval TRUE Local machine check exception feature is supported.
919 @retval FALSE Local machine check exception feature is not supported.
921 @note This service could be called by BSP/APs.
926 IN UINTN ProcessorNumber
,
927 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
928 IN VOID
*ConfigData OPTIONAL
932 Initializes Local machine check exception feature to specific state.
934 @param[in] ProcessorNumber The index of the CPU executing this function.
935 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
936 structure for the CPU executing this function.
937 @param[in] ConfigData A pointer to the configuration buffer returned
938 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
939 CPU_FEATURE_GET_CONFIG_DATA was not provided in
940 RegisterCpuFeature().
941 @param[in] State If TRUE, then the Local machine check exception
942 feature must be enabled.
943 If FALSE, then the Local machine check exception
944 feature must be disabled.
946 @retval RETURN_SUCCESS Local machine check exception feature is initialized.
952 IN UINTN ProcessorNumber
,
953 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
954 IN VOID
*ConfigData
, OPTIONAL
959 Prepares for the data used by CPU feature detection and initialization.
961 @param[in] NumberOfProcessors The number of CPUs in the platform.
963 @return Pointer to a buffer of CPU related configuration data.
965 @note This service could be called by BSP only.
969 ProcTraceGetConfigData (
970 IN UINTN NumberOfProcessors
974 Detects if Intel Processor Trace feature supported on current processor.
976 @param[in] ProcessorNumber The index of the CPU executing this function.
977 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
978 structure for the CPU executing this function.
979 @param[in] ConfigData A pointer to the configuration buffer returned
980 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
981 CPU_FEATURE_GET_CONFIG_DATA was not provided in
982 RegisterCpuFeature().
984 @retval TRUE Processor Trace feature is supported.
985 @retval FALSE Processor Trace feature is not supported.
987 @note This service could be called by BSP/APs.
992 IN UINTN ProcessorNumber
,
993 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
994 IN VOID
*ConfigData OPTIONAL
998 Initializes Intel Processor Trace feature to specific state.
1000 @param[in] ProcessorNumber The index of the CPU executing this function.
1001 @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
1002 structure for the CPU executing this function.
1003 @param[in] ConfigData A pointer to the configuration buffer returned
1004 by CPU_FEATURE_GET_CONFIG_DATA. NULL if
1005 CPU_FEATURE_GET_CONFIG_DATA was not provided in
1006 RegisterCpuFeature().
1007 @param[in] State If TRUE, then the Processor Trace feature must be
1009 If FALSE, then the Processor Trace feature must be
1012 @retval RETURN_SUCCESS Intel Processor Trace feature is initialized.
1017 ProcTraceInitialize (
1018 IN UINTN ProcessorNumber
,
1019 IN REGISTER_CPU_FEATURE_INFORMATION
*CpuInfo
,
1020 IN VOID
*ConfigData
, OPTIONAL