libmsr
0.3.0
A friendlier interface to accessing MSRs on Intel platforms
|
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <sys/time.h>
#include "msr_core.h"
#include "msr_misc.h"
#include "memhdlr.h"
#include "cpuid.h"
Functions | |
void | dump_misc_enable (struct misc_enable *s) |
Print list of enabled/disabled platform features as encoded in IA32_MISC_ENABLE. | |
void | get_misc_enable (unsigned socket, struct misc_enable *s) |
Read value of IA32_MISC_ENABLE and decode bit fields to determine enabled/disabled features on platform. | |
void | set_misc_enable (unsigned socket, struct misc_enable *s) |
Set value of IA32_MISC_ENABLE based on desired enabled/disabled features for platform. | |
void | pkg_cres_storage (struct pkg_cres **pcr) |
Initialize storage of package-level C-state residencies. | |
void | core_cres_storage (struct core_cres **ccr) |
Initialize storage of core-level C-state residencies. | |
void | dump_pkg_cres_label (FILE *writedest) |
Print labels for package-level C-states. | |
void | dump_pkg_cres (FILE *writedest) |
Read package-level C-state residencies and print contents. | |
void | dump_core_cres_label (FILE *writedest) |
Print labels for core-level C-states. | |
void | dump_core_cres (FILE *writedest) |
Read core -level C-state residencies and print contents. | |
void core_cres_storage | ( | struct core_cres ** | ccr | ) |
Initialize storage of core-level C-state residencies.
[out] | ccr | Pointer to core-level C-state residency data. |
void dump_core_cres | ( | FILE * | writedest | ) |
Read core -level C-state residencies and print contents.
[in] | writedest | File stream where output will be written to. |
void dump_core_cres_label | ( | FILE * | writedest | ) |
Print labels for core-level C-states.
[in] | writedest | File stream where output will be written to. |
void dump_misc_enable | ( | struct misc_enable * | s | ) |
Print list of enabled/disabled platform features as encoded in IA32_MISC_ENABLE.
[in] | s | Pointer to list of platform feature data. |
void dump_pkg_cres | ( | FILE * | writedest | ) |
Read package-level C-state residencies and print contents.
[in] | writedest | File stream where output will be written to. |
void dump_pkg_cres_label | ( | FILE * | writedest | ) |
Print labels for package-level C-states.
[in] | writedest | File stream where output will be written to. |
void get_misc_enable | ( | unsigned | socket, |
struct misc_enable * | s | ||
) |
Read value of IA32_MISC_ENABLE and decode bit fields to determine enabled/disabled features on platform.
[in] | socket | Unique socket/package identifier. |
[out] | s | Data indicating enabled/disabled features. |
void pkg_cres_storage | ( | struct pkg_cres ** | pcr | ) |
Initialize storage of package-level C-state residencies.
[out] | pcr | Pointer to package-level C-state residency data. |
void set_misc_enable | ( | unsigned | socket, |
struct misc_enable * | s | ||
) |
Set value of IA32_MISC_ENABLE based on desired enabled/disabled features for platform.
[in] | socket | Unique socket/package identifier. |
[in] | s | Data indicating enabled/disabled features. |