libmsr  0.3.0
A friendlier interface to accessing MSRs on Intel platforms
 All Classes Files Functions Variables Enumerations Enumerator Macros Pages
Functions
msr_misc.c File Reference
#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"
Include dependency graph for msr_misc.c:

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.
 

Function Documentation

void core_cres_storage ( struct core_cres **  ccr)

Initialize storage of core-level C-state residencies.

Parameters
[out]ccrPointer to core-level C-state residency data.
void dump_core_cres ( FILE *  writedest)

Read core -level C-state residencies and print contents.

Parameters
[in]writedestFile stream where output will be written to.
void dump_core_cres_label ( FILE *  writedest)

Print labels for core-level C-states.

Parameters
[in]writedestFile 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.

Parameters
[in]sPointer to list of platform feature data.
void dump_pkg_cres ( FILE *  writedest)

Read package-level C-state residencies and print contents.

Parameters
[in]writedestFile stream where output will be written to.
void dump_pkg_cres_label ( FILE *  writedest)

Print labels for package-level C-states.

Parameters
[in]writedestFile 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.

Parameters
[in]socketUnique socket/package identifier.
[out]sData indicating enabled/disabled features.
void pkg_cres_storage ( struct pkg_cres **  pcr)

Initialize storage of package-level C-state residencies.

Parameters
[out]pcrPointer 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.

Parameters
[in]socketUnique socket/package identifier.
[in]sData indicating enabled/disabled features.