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

Lower 16 bits of ISR.

Segment selector.

This must always be zero.

Flags.

The upper 48 bits of ISR (the last 16 bits must be zero).

Must be zero.

Methods

impl IdtEntry
[src]

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.

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]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for IdtEntry
[src]

Formats the value using the given formatter.