]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/Library/CpuCommonFeaturesLib/CpuCommonFeatures.h
UefiCpuPkg: Clean up source files
[mirror_edk2.git] / UefiCpuPkg / Library / CpuCommonFeaturesLib / CpuCommonFeatures.h
index b8269b00f3f3f4c724eb205e5d9258a3d1a5401e..acdfabd56bfca6ba32eff5e791c58fd8011f94d8 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   CPU Common features library header file.\r
 \r
-  Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -855,7 +855,7 @@ FeatureControlGetConfigData (
   );\r
 \r
 /**\r
-  Detects if Protected Processor Inventory Number feature supported on current \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
@@ -889,14 +889,14 @@ PpinSupport (
                                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
+  @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
+                               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
+  @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
+  @retval RETURN_DEVICE_ERROR  Device can't change state because it has been\r
                                locked.\r
 \r
 **/\r
@@ -910,7 +910,7 @@ PpinInitialize (
   );\r
 \r
 /**\r
-  Detects if Local machine check exception feature supported on current \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
@@ -961,4 +961,70 @@ LmceInitialize (
   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
+ProcTraceGetConfigData (\r
+  IN UINTN  NumberOfProcessors\r
+  );\r
+\r
+/**\r
+  Detects if Intel Processor Trace feature supported on current 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     Processor Trace feature is supported.\r
+  @retval FALSE    Processor Trace feature is not supported.\r
+\r
+  @note This service could be called by BSP/APs.\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+ProcTraceSupport (\r
+  IN UINTN                             ProcessorNumber,\r
+  IN REGISTER_CPU_FEATURE_INFORMATION  *CpuInfo,\r
+  IN VOID                              *ConfigData  OPTIONAL\r
+  );\r
+\r
+/**\r
+  Initializes Intel Processor Trace 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 Processor Trace feature must be\r
+                               enabled.\r
+                               If FALSE, then the Processor Trace feature must be\r
+                               disabled.\r
+\r
+  @retval RETURN_SUCCESS       Intel Processor Trace feature is initialized.\r
+\r
+**/\r
+RETURN_STATUS\r
+EFIAPI\r
+ProcTraceInitialize (\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