aboutsummaryrefslogtreecommitdiff
path: root/src/bits64/segmentation.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bits64/segmentation.rs')
-rw-r--r--src/bits64/segmentation.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/bits64/segmentation.rs b/src/bits64/segmentation.rs
index d246f0f..6d58a80 100644
--- a/src/bits64/segmentation.rs
+++ b/src/bits64/segmentation.rs
@@ -59,9 +59,10 @@ impl Descriptor64 {
impl GateDescriptorBuilder<u64> for DescriptorBuilder {
fn tss_descriptor(base: u64, limit: u64, available: bool) -> DescriptorBuilder {
- let typ = match available {
- true => DescriptorType::System64(SystemDescriptorTypes64::TssAvailable),
- false => DescriptorType::System64(SystemDescriptorTypes64::TssBusy),
+ let typ = if available {
+ DescriptorType::System64(SystemDescriptorTypes64::TssAvailable)
+ } else {
+ DescriptorType::System64(SystemDescriptorTypes64::TssBusy)
};
DescriptorBuilder::with_base_limit(base, limit).set_type(typ)
@@ -105,6 +106,11 @@ impl BuildDescriptor<Descriptor64> for DescriptorBuilder {
{
assert!(!self.db);
}
+
+ if typ == SystemDescriptorTypes64::InterruptGate {
+ desc.set_ist(self.ist);
+ }
+
typ as u8
}
Some(DescriptorType::System32(_typ)) => {