msru

Crates.iomsru
lib.rsmsru
version0.2.0
sourcesrc
created_at2023-05-19 21:30:09.016075
updated_at2023-05-25 18:15:06.141594
descriptionA Rust-safe library for interracting with Model Specific Registers in user-space.
homepagehttps://github.com/virtee/msru
repositoryhttps://github.com/virtee/msru
max_upload_size
id869106
size16,329
Owners (github:virtee:owners)

documentation

README

msru

msru provides a Rust-friendly interface for x86_64 CPU MSRs (Model Specific Registers). It allows you to read and write to MSRs via a specified CPU msr device file (/dev/cpu/{cpu_number}/msr).

Installation

Add the following line to your Cargo.toml file:

[dependencies]
msru = "0.2.0"

Usage

use msru::Msr;

// X86_64 SYSCFG MSR
let msr: Msr = Msr::new(0xC0010010, 0)?;

let raw_value: u64 = msr.read()?;

// ...
Commit count: 6

cargo fmt