aboutsummaryrefslogtreecommitdiff
path: root/src/shared/task.rs
diff options
context:
space:
mode:
authorGravatar John Ericson <Ericson2314@Yahoo.com> 2016-06-27 21:44:42 -0700
committerGravatar John Ericson <Ericson2314@Yahoo.com> 2016-07-01 14:50:29 -0700
commit8063b9a292697cd0259594f2369c9b1abb233c03 (patch)
tree8a0831fb716f856604559626eb2546cde047c493 /src/shared/task.rs
parentc37a7b580d528f0a4d0721702ddd645a357a405d (diff)
downloadrust-x86-8063b9a292697cd0259594f2369c9b1abb233c03.tar.gz
rust-x86-8063b9a292697cd0259594f2369c9b1abb233c03.tar.zst
rust-x86-8063b9a292697cd0259594f2369c9b1abb233c03.zip
Combine Interface: TSS; Actually almost completely arch-specific
Diffstat (limited to 'src/shared/task.rs')
-rw-r--r--src/shared/task.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/shared/task.rs b/src/shared/task.rs
new file mode 100644
index 0000000..b87c032
--- /dev/null
+++ b/src/shared/task.rs
@@ -0,0 +1,9 @@
+//! Helpers to program the task state segment.
+//! See Intel 3a, Chapter 7
+
+pub use shared::segmentation;
+
+/// Load the task state register.
+pub unsafe fn load_tr(sel: segmentation::SegmentSelector) {
+ asm!("ltr $0" :: "r" (sel));
+}