summaryrefslogtreecommitdiff
path: root/crates/windows-kernel-sys/src/intrin.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/windows-kernel-sys/src/intrin.rs')
-rw-r--r--crates/windows-kernel-sys/src/intrin.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/crates/windows-kernel-sys/src/intrin.rs b/crates/windows-kernel-sys/src/intrin.rs
new file mode 100644
index 0000000..f6ef95f
--- /dev/null
+++ b/crates/windows-kernel-sys/src/intrin.rs
@@ -0,0 +1,16 @@
+#![allow(non_upper_case_globals)]
+#![allow(non_camel_case_types)]
+#![allow(non_snake_case)]
+
+use crate::base::*;
+
+#[link(name = "wrapper_intrin")]
+extern "C" {
+ pub fn read_cr3() -> u64;
+ pub fn write_cr3(value: u64);
+ pub fn read_msr(register: u32) -> u64;
+ pub fn read_msr_safe(register: u32, value: &mut u64) -> NTSTATUS;
+ pub fn write_msr(register: u32, value: u64);
+ pub fn write_msr_safe(register: u32, value: u64) -> NTSTATUS;
+ pub fn invlpg(value: usize);
+}