x86_64 0.0.2

Library to program x86_64 hardware. Contains x86_64 specific data structure descriptions, data-tables, as well as convenience function to call assembly instructions. This is a fork of the `x86` crate, specialized for x86_64.
Documentation
//! Functions to flush the translation lookaside buffer (TLB).

use VirtualAddress;

/// Invalidate the given address in the TLB using the `invlpg` instruction.
pub fn flush(addr: VirtualAddress) {
    unsafe { asm!("invlpg ($0)" :: "r" (addr) : "memory") };
}

/// Invalidate the TLB completely by reloading the CR3 register.
pub fn flush_all() {
    use control_regs::{cr3, cr3_write};
    unsafe { cr3_write(cr3()) }
}