msr

package module
v0.0.0-...-6e72573 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package msr implements functions to read MSRs.

  • Copyright (C) 2023 Intel Corporation
  • SPDX-License-Identifier: MIT

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MSR

type MSR struct {
	// contains filtered or unexported fields
}

func NewMSR

func NewMSR() (msr *MSR, err error)

func (*MSR) ReadAll

func (msr *MSR) ReadAll(reg uint64) (out []uint64, err error)

ReadAll returns the register value for all cores

func (*MSR) ReadOne

func (msr *MSR) ReadOne(reg uint64, core int) (out uint64, err error)

ReadOne returns the register value for the specified core

func (*MSR) ReadPackages

func (msr *MSR) ReadPackages(reg uint64) (out []uint64, err error)

ReadPackages returns the specified register value for each package (CPU/Socket)

func (*MSR) SetBitRange

func (msr *MSR) SetBitRange(highBit int, lowBit int) (err error)

SetBitRange filters bits for subsequent calls to Read* functions

func (*MSR) WriteAll

func (msr *MSR) WriteAll(reg uint64, val uint64) (err error)

WriteAll writes the given value to all cores at the given register offset

func (*MSR) WriteOne

func (msr *MSR) WriteOne(reg uint64, core int, val uint64) (err error)

WriteOne writes the given value to the the specified core at the given register offset

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL