1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//! Hardware- and architecture-dependent abstractions.

#![allow(unused)]
#![warn(unused_imports)]

pub mod acpi;
pub mod context;
pub mod cpu;
pub mod gdt;
#[macro_use]
pub mod int;
pub mod io;
pub mod paging;
pub mod pit;
pub mod regs;
#[cfg(feature = "smp")]
pub mod smp;
pub mod tss;

/// A pointer to a discriptor table, that can be loaded with `lgdt` or `lidt`.
///
/// It is used for the [int::idt::InterruptDescriptorTable] and [gdt::GlobalDescriptorTable].
#[derive(Debug, Clone, Copy)]
#[repr(C, packed)]
pub struct DescriptorTablePointer {
    /// Size of the DT.
    pub limit: u16,
    /// Pointer to the memory region containing the DT.
    pub base: *mut u64,
}
unsafe impl Sync for DescriptorTablePointer {}