]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/Library/CpuCommonFeaturesLib/CpuCommonFeatures.h
UefiCpuPkg CpuCommonFeaturesLib: Enable LMCE feature.
[mirror_edk2.git] / UefiCpuPkg / Library / CpuCommonFeaturesLib / CpuCommonFeatures.h
index aa6d1122b1a290448ec33e351a9a3eb363681aff..b8269b00f3f3f4c724eb205e5d9258a3d1a5401e 100644 (file)
@@ -346,7 +346,7 @@ VmxSupport (
   );\r
 \r
 /**\r
-  Initializes VMX inside SMX feature to specific state.\r
+  Initializes VMX feature to specific state.\r
 \r
   @param[in]  ProcessorNumber  The index of the CPU executing this function.\r
   @param[in]  CpuInfo          A pointer to the REGISTER_CPU_FEATURE_INFORMATION\r
@@ -355,42 +355,16 @@ VmxSupport (
                                by CPU_FEATURE_GET_CONFIG_DATA.  NULL if\r
                                CPU_FEATURE_GET_CONFIG_DATA was not provided in\r
                                RegisterCpuFeature().\r
-  @param[in]  State            If TRUE, then the VMX inside SMX feature must be enabled.\r
-                               If FALSE, then the VMX inside SMX feature must be disabled.\r
+  @param[in]  State            If TRUE, then the VMX feature must be enabled.\r
+                               If FALSE, then the VMX feature must be disabled.\r
 \r
-  @retval RETURN_SUCCESS       VMX inside SMX feature is initialized.\r
+  @retval RETURN_SUCCESS       VMX feature is initialized.\r
 \r
   @note This service could be called by BSP only.\r
 **/\r
 RETURN_STATUS\r
 EFIAPI\r
-VmxInsideSmxInitialize (\r
-  IN UINTN                             ProcessorNumber,\r
-  IN REGISTER_CPU_FEATURE_INFORMATION  *CpuInfo,\r
-  IN VOID                              *ConfigData,  OPTIONAL\r
-  IN BOOLEAN                           State\r
-  );\r
-\r
-/**\r
-  Initializes SENTER feature to specific state.\r
-\r
-  @param[in]  ProcessorNumber  The index of the CPU executing this function.\r
-  @param[in]  CpuInfo          A pointer to the REGISTER_CPU_FEATURE_INFORMATION\r
-                               structure for the CPU executing this function.\r
-  @param[in]  ConfigData       A pointer to the configuration buffer returned\r
-                               by CPU_FEATURE_GET_CONFIG_DATA.  NULL if\r
-                               CPU_FEATURE_GET_CONFIG_DATA was not provided in\r
-                               RegisterCpuFeature().\r
-  @param[in]  State            If TRUE, then the SENTER feature must be enabled.\r
-                               If FALSE, then the SENTER feature must be disabled.\r
-\r
-  @retval RETURN_SUCCESS       SENTER feature is initialized.\r
-\r
-  @note This service could be called by BSP only.\r
-**/\r
-RETURN_STATUS\r
-EFIAPI\r
-SenterInitialize (\r
+VmxInitialize (\r
   IN UINTN                             ProcessorNumber,\r
   IN REGISTER_CPU_FEATURE_INFORMATION  *CpuInfo,\r
   IN VOID                              *ConfigData,  OPTIONAL\r
@@ -472,7 +446,7 @@ SmxSupport (
   );\r
 \r
 /**\r
-  Initializes VMX outside SMX feature to specific state.\r
+  Initializes SMX feature to specific state.\r
 \r
   @param[in]  ProcessorNumber  The index of the CPU executing this function.\r
   @param[in]  CpuInfo          A pointer to the REGISTER_CPU_FEATURE_INFORMATION\r
@@ -481,16 +455,17 @@ SmxSupport (
                                by CPU_FEATURE_GET_CONFIG_DATA.  NULL if\r
                                CPU_FEATURE_GET_CONFIG_DATA was not provided in\r
                                RegisterCpuFeature().\r
-  @param[in]  State            If TRUE, then the VMX outside SMX feature must be enabled.\r
-                               If FALSE, then the VMX outside SMX feature must be disabled.\r
+  @param[in]  State            If TRUE, then SMX feature must be enabled.\r
+                               If FALSE, then SMX feature must be disabled.\r
 \r
-  @retval RETURN_SUCCESS       VMX outside SMX feature is initialized.\r
+  @retval RETURN_SUCCESS       SMX feature is initialized.\r
+  @retval RETURN_UNSUPPORTED   VMX not initialized.\r
 \r
   @note This service could be called by BSP only.\r
 **/\r
 RETURN_STATUS\r
 EFIAPI\r
-VmxOutsideSmxInitialize (\r
+SmxInitialize (\r
   IN UINTN                             ProcessorNumber,\r
   IN REGISTER_CPU_FEATURE_INFORMATION  *CpuInfo,\r
   IN VOID                              *ConfigData,  OPTIONAL\r
@@ -797,6 +772,21 @@ C1eInitialize (
   IN BOOLEAN                           State\r
   );\r
 \r
+/**\r
+  Prepares for the data used by CPU feature detection and initialization.\r
+\r
+  @param[in]  NumberOfProcessors  The number of CPUs in the platform.\r
+\r
+  @return  Pointer to a buffer of CPU related configuration data.\r
+\r
+  @note This service could be called by BSP only.\r
+**/\r
+VOID *\r
+EFIAPI\r
+X2ApicGetConfigData (\r
+  IN UINTN  NumberOfProcessors\r
+  );\r
+\r
 /**\r
   Detects if X2Apci feature supported on current processor.\r
 \r
@@ -864,4 +854,111 @@ FeatureControlGetConfigData (
   IN UINTN               NumberOfProcessors\r
   );\r
 \r
+/**\r
+  Detects if Protected Processor Inventory Number feature supported on current \r
+  processor.\r
+\r
+  @param[in]  ProcessorNumber  The index of the CPU executing this function.\r
+  @param[in]  CpuInfo          A pointer to the REGISTER_CPU_FEATURE_INFORMATION\r
+                               structure for the CPU executing this function.\r
+  @param[in]  ConfigData       A pointer to the configuration buffer returned\r
+                               by CPU_FEATURE_GET_CONFIG_DATA.  NULL if\r
+                               CPU_FEATURE_GET_CONFIG_DATA was not provided in\r
+                               RegisterCpuFeature().\r
+\r
+  @retval TRUE     Protected Processor Inventory Number feature is supported.\r
+  @retval FALSE    Protected Processor Inventory Number feature is not supported.\r
+\r
+  @note This service could be called by BSP/APs.\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+PpinSupport (\r
+  IN UINTN                             ProcessorNumber,\r
+  IN REGISTER_CPU_FEATURE_INFORMATION  *CpuInfo,\r
+  IN VOID                              *ConfigData  OPTIONAL\r
+  );\r
+\r
+/**\r
+  Initializes Protected Processor Inventory Number feature to specific state.\r
+\r
+  @param[in]  ProcessorNumber  The index of the CPU executing this function.\r
+  @param[in]  CpuInfo          A pointer to the REGISTER_CPU_FEATURE_INFORMATION\r
+                               structure for the CPU executing this function.\r
+  @param[in]  ConfigData       A pointer to the configuration buffer returned\r
+                               by CPU_FEATURE_GET_CONFIG_DATA.  NULL if\r
+                               CPU_FEATURE_GET_CONFIG_DATA was not provided in\r
+                               RegisterCpuFeature().\r
+  @param[in]  State            If TRUE, then the Protected Processor Inventory \r
+                               Number feature must be enabled.\r
+                               If FALSE, then the Protected Processor Inventory \r
+                               Number feature must be disabled.\r
+\r
+  @retval RETURN_SUCCESS       Protected Processor Inventory Number feature is \r
+                               initialized.\r
+  @retval RETURN_DEVICE_ERROR  Device can't change state because it has been \r
+                               locked.\r
+\r
+**/\r
+RETURN_STATUS\r
+EFIAPI\r
+PpinInitialize (\r
+  IN UINTN                             ProcessorNumber,\r
+  IN REGISTER_CPU_FEATURE_INFORMATION  *CpuInfo,\r
+  IN VOID                              *ConfigData,  OPTIONAL\r
+  IN BOOLEAN                           State\r
+  );\r
+\r
+/**\r
+  Detects if Local machine check exception feature supported on current \r
+  processor.\r
+\r
+  @param[in]  ProcessorNumber  The index of the CPU executing this function.\r
+  @param[in]  CpuInfo          A pointer to the REGISTER_CPU_FEATURE_INFORMATION\r
+                               structure for the CPU executing this function.\r
+  @param[in]  ConfigData       A pointer to the configuration buffer returned\r
+                               by CPU_FEATURE_GET_CONFIG_DATA.  NULL if\r
+                               CPU_FEATURE_GET_CONFIG_DATA was not provided in\r
+                               RegisterCpuFeature().\r
+\r
+  @retval TRUE     Local machine check exception feature is supported.\r
+  @retval FALSE    Local machine check exception feature is not supported.\r
+\r
+  @note This service could be called by BSP/APs.\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+LmceSupport (\r
+  IN UINTN                             ProcessorNumber,\r
+  IN REGISTER_CPU_FEATURE_INFORMATION  *CpuInfo,\r
+  IN VOID                              *ConfigData  OPTIONAL\r
+  );\r
+\r
+/**\r
+  Initializes Local machine check exception feature to specific state.\r
+\r
+  @param[in]  ProcessorNumber  The index of the CPU executing this function.\r
+  @param[in]  CpuInfo          A pointer to the REGISTER_CPU_FEATURE_INFORMATION\r
+                               structure for the CPU executing this function.\r
+  @param[in]  ConfigData       A pointer to the configuration buffer returned\r
+                               by CPU_FEATURE_GET_CONFIG_DATA.  NULL if\r
+                               CPU_FEATURE_GET_CONFIG_DATA was not provided in\r
+                               RegisterCpuFeature().\r
+  @param[in]  State            If TRUE, then the Local machine check exception\r
+                               feature must be enabled.\r
+                               If FALSE, then the Local machine check exception\r
+                               feature must be disabled.\r
+\r
+  @retval RETURN_SUCCESS       Local machine check exception feature is initialized.\r
+\r
+**/\r
+RETURN_STATUS\r
+EFIAPI\r
+LmceInitialize (\r
+  IN UINTN                             ProcessorNumber,\r
+  IN REGISTER_CPU_FEATURE_INFORMATION  *CpuInfo,\r
+  IN VOID                              *ConfigData,  OPTIONAL\r
+  IN BOOLEAN                           State\r
+  );\r
+\r
 #endif\r