GithubHelp home page GithubHelp logo

helloymf / rust-x86 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gz/rust-x86

0.0 0.0 0.0 4.06 MB

Rust library to use x86 (amd64) specific functionality and registers.

Home Page: https://docs.rs/x86

License: MIT License

Shell 0.27% Rust 99.73%

rust-x86's Introduction

x86 / amd64 library Crates.io docs.rs/x86 Standard checks

Library to program x86 (amd64) hardware. Contains x86 specific data structure descriptions, data-tables, as well as convenience function to call assembly instructions typically not exposed in higher level languages.

Currently supports:

  • I/O registers
  • Control registers
  • Debug registers
  • MSR registers
  • Segmentation
  • Descriptor-tables (GDT, LDT, IDT)
  • IA32-e page table layout
  • Interrupts (with xAPIC and x2APIC, I/O APIC drivers)
  • Task state
  • Performance counter information
  • Intel SGX: Software Guard Extensions
  • Random numbers (rdrand, rdseed)
  • Time (rdtsc, rdtscp)
  • Querying CPUID (uses raw_cpuid library)
  • Transactional memory (Intel RTM and HLE)
  • Virtualization (Intel VMX)

This library depends on libcore so it can be used in kernel level code.

Testing

We use two forms of tests for the crate. Regular tests with #[test] that run in a ring 3 process and #[x86test] tests that run in a VM (and therefore grant a privileged execution environment, see x86test).

# To execute x86tests run:
$ RUSTFLAGS="-C relocation-model=dynamic-no-pic -C code-model=kernel" RUST_BACKTRACE=1 cargo test --features vmtest

# To execute the regular tests, run:
$ cargo test --features utest

Features

  • performance-counter: Includes the performance counter information. Note this feature can increase compilation time significantly due to large, statically generated hash-tables that are included in the source. Therefore, it is disabled by default.

Documentation

rust-x86's People

Contributors

achreto avatar arkivm avatar arpansriv avatar brayniac avatar colinfinck avatar dependabot[bot] avatar dschatzberg avatar edigaryev avatar emk avatar equation314 avatar ericson2314 avatar ethindp avatar gabrielmajeri avatar gz avatar iankronquist avatar jbreitbart avatar jounathaen avatar jutuon avatar lilasta avatar phil-opp avatar rexlunae avatar rukai avatar scialex avatar sergey-v-galtsev avatar squidboylan avatar stlankes avatar tobba avatar workingjubilee avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.