diff options
Diffstat (limited to 'src/segmentation.rs')
-rw-r--r-- | src/segmentation.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/segmentation.rs b/src/segmentation.rs index a9cc684..c58403e 100644 --- a/src/segmentation.rs +++ b/src/segmentation.rs @@ -239,6 +239,8 @@ pub struct DescriptorBuilder { pub(crate) limit_granularity_4k: bool, /// 64-bit code segment (IA-32e mode only) pub(crate) l: bool, + /// Interrupt stack table (IST) selector (IA-32e mode only) + pub(crate) ist: u8, } impl DescriptorBuilder { @@ -254,6 +256,7 @@ impl DescriptorBuilder { db: false, limit_granularity_4k: false, l: false, + ist: 0, } } @@ -272,6 +275,7 @@ impl DescriptorBuilder { db: false, limit_granularity_4k: false, l: false, + ist: 0, } } @@ -317,6 +321,13 @@ impl DescriptorBuilder { self.l = true; self } + + /// Set a the interrupt stack table index (only if this ends up being a 64-bit interrupt descriptor). + pub fn ist(mut self, index: u8) -> DescriptorBuilder { + debug_assert!(index <= 7); + self.ist = index; + self + } } impl GateDescriptorBuilder<u32> for DescriptorBuilder { |