rustubs::arch::x86_64::interrupt::idt

Struct GateDescriptor64

Source
#[repr(C, packed(1))]
struct GateDescriptor64 { pub offset_1: u16, pub selector: u16, pub ist: u8, pub attrs: u8, pub offset_2: u16, pub offset_3: u32, res0: u32, }
Expand description
<pre>
[0 :15]  addr[0:15]
[16:31]  segment selector: must point to valid code segment in GDT
[32:39]  ist: index into Interrupt Stack Table; only lower 3 bit used,
         other bits are reserved to 0
[40:47]  attrs: attributes of the call gate:
         [0:3]    - Gate Type: 0xe for interrupt and 0xf for trap
         [ 4 ]    - Res0
         [5:6]    - DPL: allowed privilege levels (via INT)
         [ 7 ]    - Present (Valid)
[48:63] - addr[16:31]
[64:95] - addr[32:63]

Fields§

§offset_1: u16§selector: u16§ist: u8§attrs: u8§offset_2: u16§offset_3: u32§res0: u32

Implementations§

Source§

impl GateDescriptor64

Source

fn set_offset(&mut self, offset: u64)

Source

fn set_default_interrupt(&mut self, offset: u64)

selector = 0; present; type = interrupt;

Auto Trait Implementations§

§

impl Freeze for GateDescriptor64

§

impl RefUnwindSafe for GateDescriptor64

§

impl Send for GateDescriptor64

§

impl Sync for GateDescriptor64

§

impl Unpin for GateDescriptor64

§

impl UnwindSafe for GateDescriptor64

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.