Struct x86::irq::IdtEntry
[−]
[src]
pub struct IdtEntry { pub base_lo: u16, pub sel: u16, pub res0: u8, pub flags: u8, pub base_hi: u64, pub res1: u16, }
A struct describing an interrupt gate. See the Intel manual mentioned above for details, specifically, the section "6.14.1 64-Bit Mode IDT" and "Table 3-2. System-Segment and Gate-Descriptor Types".
Fields
base_lo: u16
Lower 16 bits of ISR.
sel: u16
Segment selector.
res0: u8
This must always be zero.
flags: u8
Flags.
base_hi: u64
The upper 48 bits of ISR (the last 16 bits must be zero).
res1: u16
Must be zero.
Methods
impl IdtEntry
[src]
const fn missing() -> IdtEntry
Create a "missing" IdtEntry. This is a const
function, so we can
call it at compile time to initialize static variables.
If the CPU tries to invoke a missing interrupt, it will instead send a General Protection fault (13), with the interrupt number and some other data stored in the error code.
fn interrupt_gate(gdt_code_selector: u16, handler: *const u8) -> IdtEntry
Create a new IdtEntry pointing at handler
, which must be a
function with interrupt calling conventions. (This must be
currently defined in assembly language.) The gdt_code_selector
value must be the offset of code segment entry in the GDT.
Create an interrupt gate with the "Present" flag set, which is the most common case. If you need something else, you can construct it manually.
Trait Implementations
impl Copy for IdtEntry
[src]
impl Clone for IdtEntry
[src]
fn clone(&self) -> IdtEntry
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more