| 
    libmsr
    0.3.0
    
   A friendlier interface to accessing MSRs on Intel platforms 
   | 
 
#include <stdint.h>#include <stdio.h>#include "msr_core.h"#include "msr_turbo.h"#include "msr_rapl.h"#include "memhdlr.h"#include "libmsr_error.h"#include "cpuid.h"#include "libmsr_debug.h"
Functions | |
| void | turbo_storage (uint64_t ***val) | 
| Allocate array for storing raw register data from IA32_PERF_CTL.   | |
| void | enable_turbo (void) | 
| Enable turbo by modifying IA32_PERF_CTL on each logical processor.   | |
| void | disable_turbo (void) | 
| Disable turbo by modifying IA32_PERF_CTL on each logical processor.   | |
| void | dump_turbo (FILE *writedest) | 
| Print turbo data for each logical processor.   | |
| void | calc_max_non_turbo (const unsigned socket, struct turbo_activation_ratio_data *info) | 
| Convert raw bits of MSR_TURBO_ACTIVATION_RATIO to human-readable values.   | |
| int | get_max_turbo_activation_ratio (const unsigned socket, struct turbo_activation_ratio_data *info) | 
| Read value of the MSR_TURBO_ACTIVATION_RATIO register and translate bit fields to human-readable values.   | |
| void | calc_max_turbo_ratio (const unsigned socket, struct turbo_limit_data *info, struct turbo_limit_data *info2) | 
| Convert raw bits of turbo ratio limit register to human-readable values.   | |
| int | get_turbo_ratio_limit (const unsigned socket, struct turbo_limit_data *info, struct turbo_limit_data *info2) | 
| Read value of the turbo ratio limit register and translate bit fields to human-readable values.   | |
| void calc_max_non_turbo | ( | const unsigned | socket, | 
| struct turbo_activation_ratio_data * | info | ||
| ) | 
Convert raw bits of MSR_TURBO_ACTIVATION_RATIO to human-readable values.
| [in] | socket | Unique socket/package identifier. | 
| [out] | info | Data for turbo activation ratio. | 
| void calc_max_turbo_ratio | ( | const unsigned | socket, | 
| struct turbo_limit_data * | info, | ||
| struct turbo_limit_data * | info2 | ||
| ) | 
Convert raw bits of turbo ratio limit register to human-readable values.
| [in] | socket | Unique socket/package identifier. | 
| [out] | info | Data for turbo ratio limit. | 
| [out] | info2 | Data for turbo ratio limit 1 (platform dependent). | 
| void disable_turbo | ( | void | ) | 
Disable turbo by modifying IA32_PERF_CTL on each logical processor.
Disable Intel Dynamic Acceleration (IDA) and Intel Turbo Boost Technology by setting bit 32 of IA32_PERF_CTL to 1. This bit is not shared across logical processors in a package, so it must be modified to the same value across all logical processors in the same package.
| void dump_turbo | ( | FILE * | writedest | ) | 
Print turbo data for each logical processor.
For each logical processor, print the unique core identifier, the value of bit 32 for IA32_PERF_CTL (1 indicates IDA/Turbo Boost is enabled) and the value of bit 38 for IA32_MISC_ENABLE (1 indicates support for IDA/Turbo Boost by the platform).
| [in] | writedest | File stream where output will be written to. | 
| void enable_turbo | ( | void | ) | 
Enable turbo by modifying IA32_PERF_CTL on each logical processor.
Enable Intel Dynamic Acceleration (IDA) and Intel Turbo Boost Technology by setting bit 32 of IA32_PERF_CTL to 0. This bit is not shared across logical processors in a package, so it must be modified to the same value across all logical processors in the same package.
| int get_max_turbo_activation_ratio | ( | const unsigned | socket, | 
| struct turbo_activation_ratio_data * | info | ||
| ) | 
Read value of the MSR_TURBO_ACTIVATION_RATIO register and translate bit fields to human-readable values.
| [in] | socket | Unique socket/package identifier. | 
| [out] | info | Data for turbo activation ratio. | 
| int get_turbo_ratio_limit | ( | const unsigned | socket, | 
| struct turbo_limit_data * | info, | ||
| struct turbo_limit_data * | info2 | ||
| ) | 
Read value of the turbo ratio limit register and translate bit fields to human-readable values.
| [in] | socket | Unique socket/package identifier. | 
| [out] | info | Data for turbo ratio limit. | 
| [out] | info2 | Data for turbo ratio limit 1 (platform dependent). | 
| void turbo_storage | ( | uint64_t *** | val | ) | 
Allocate array for storing raw register data from IA32_PERF_CTL.
There are plans to use a struct to make the indirection less crazy.
| [in] | val | Pointer to array of raw IA32_PERF_CTL data, length equal to the total number of logical processors. | 
 1.8.2