TianoCore EDK2 master
|
#include "CpuCommonFeatures.h"
Go to the source code of this file.
Data Structures | |
struct | PROC_TRACE_PROCESSOR_DATA |
struct | PROC_TRACE_DATA |
struct | PROC_TRACE_TOPA_TABLE |
Macros | |
#define | MAX_TOPA_ENTRY_COUNT 2 |
Enumerations | |
enum | RTIT_OUTPUT_SCHEME { RtitOutputSchemeSingleRange = 0 , RtitOutputSchemeToPA } |
Functions | |
VOID *EFIAPI | ProcTraceGetConfigData (IN UINTN NumberOfProcessors) |
BOOLEAN EFIAPI | ProcTraceSupport (IN UINTN ProcessorNumber, IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo, IN VOID *ConfigData OPTIONAL) |
RETURN_STATUS EFIAPI | ProcTraceInitialize (IN UINTN ProcessorNumber, IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo, IN VOID *ConfigData OPTIONAL, IN BOOLEAN State) |
Intel Processor Trace feature.
Copyright (c) 2017 - 2023, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file ProcTrace.c.
#define MAX_TOPA_ENTRY_COUNT 2 |
This macro define the max entries in the Topa table. Each entry in the table contains some attribute bits, a pointer to an output region, and the size of the region. The last entry in the table may hold a pointer to the next table. This pointer can either point to the top of the current table (for circular array) or to the base of another table. At least 2 entries are needed because the list of entries must be terminated by an entry with the END bit set to 1, so 2 entries are required to use a single valid entry.
Definition at line 20 of file ProcTrace.c.
enum RTIT_OUTPUT_SCHEME |
Processor trace output scheme selection.
Definition at line 25 of file ProcTrace.c.
Prepares for the data used by CPU feature detection and initialization.
[in] | NumberOfProcessors | The number of CPUs in the platform. |
Definition at line 71 of file ProcTrace.c.
RETURN_STATUS EFIAPI ProcTraceInitialize | ( | IN UINTN | ProcessorNumber, |
IN REGISTER_CPU_FEATURE_INFORMATION * | CpuInfo, | ||
IN VOID *ConfigData | OPTIONAL, | ||
IN BOOLEAN | State | ||
) |
Initializes Intel Processor Trace feature to specific state.
[in] | ProcessorNumber | The index of the CPU executing this function. |
[in] | CpuInfo | A pointer to the REGISTER_CPU_FEATURE_INFORMATION structure for the CPU executing this function. |
[in] | ConfigData | A pointer to the configuration buffer returned by CPU_FEATURE_GET_CONFIG_DATA. NULL if CPU_FEATURE_GET_CONFIG_DATA was not provided in RegisterCpuFeature(). |
[in] | State | If TRUE, then the Processor Trace feature must be enabled. If FALSE, then the Processor Trace feature must be disabled. |
RETURN_SUCCESS | Intel Processor Trace feature is initialized. |
Clear bit 0 in MSR IA32_RTIT_CTL (570)
Clear MSR IA32_RTIT_STS (571h) to all zeros
Refer to PROC_TRACE_MEM_SIZE Table for Size Encoding
Check Processor Trace output scheme: Single Range output or ToPA table
Enable the Processor Trace feature from MSR IA32_RTIT_CTL (570h)
Definition at line 176 of file ProcTrace.c.
BOOLEAN EFIAPI ProcTraceSupport | ( | IN UINTN | ProcessorNumber, |
IN REGISTER_CPU_FEATURE_INFORMATION * | CpuInfo, | ||
IN VOID *ConfigData | OPTIONAL | ||
) |
Detects if Intel Processor Trace feature supported on current processor.
[in] | ProcessorNumber | The index of the CPU executing this function. |
[in] | CpuInfo | A pointer to the REGISTER_CPU_FEATURE_INFORMATION structure for the CPU executing this function. |
[in] | ConfigData | A pointer to the configuration buffer returned by CPU_FEATURE_GET_CONFIG_DATA. NULL if CPU_FEATURE_GET_CONFIG_DATA was not provided in RegisterCpuFeature(). |
TRUE | Processor Trace feature is supported. |
FALSE | Processor Trace feature is not supported. |
Definition at line 109 of file ProcTrace.c.