pub trait Hal {
// Required methods
fn init();
fn setup_paging();
fn init_interrupt_controller();
fn enable_interrupts();
fn disable_interrupts();
fn halt();
fn current_cpu_id() -> u32;
fn kernel_text_start() -> u64;
fn kernel_text_end() -> u64;
}Expand description
Hardware Abstraction Layer trait.
Each architecture must implement this trait to provide architecture-specific operations.
Required Methods§
Sourcefn setup_paging()
fn setup_paging()
Set up virtual memory paging.
Sourcefn init_interrupt_controller()
fn init_interrupt_controller()
Initialize the interrupt controller.
Sourcefn enable_interrupts()
fn enable_interrupts()
Enable interrupts.
Sourcefn disable_interrupts()
fn disable_interrupts()
Disable interrupts.
Sourcefn current_cpu_id() -> u32
fn current_cpu_id() -> u32
Get the current CPU ID (for SMP).
Sourcefn kernel_text_start() -> u64
fn kernel_text_start() -> u64
Get the physical address of the kernel text section start.
Sourcefn kernel_text_end() -> u64
fn kernel_text_end() -> u64
Get the physical address of the kernel text section end.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".