Skip to main content

ArchTrait

Trait ArchTrait 

Source
pub trait ArchTrait {
    type P: TableMeta;
    type Console: ArchConsoleOps;

Show 31 methods // Required methods fn _va(paddr: usize) -> *mut u8; fn cpu_current_hartid() -> usize; fn jump_to(entry: usize, sp: usize) -> !; fn post_allocator(); fn per_cpu_trap_init(is_primary: bool); fn trap_addr() -> usize; fn virt_to_phys(vaddr: *const u8) -> usize; fn kernel_space() -> Range<usize>; fn kernel_page_table() -> PageTableInfo; fn set_kernel_page_table(val: PageTableInfo); fn shutdown() -> !; fn secondary_entry_fn_address() -> *const (); fn cpu_on(hartid: usize, entry: usize, arg: usize) -> Result<(), CpuOnError>; fn systimer_enable(); fn systimer_irq_enable(); fn systimer_irq_disable(); fn systimer_irq_is_enabled() -> bool; fn systimer_set_interval(ticks: usize); fn systimer_ack(); fn systimer_freq() -> usize; fn systimer_tick() -> usize; fn irq_all_is_enabled() -> bool; fn irq_all_set_enable(enable: bool); fn irq_is_enabled(irq: IrqId) -> bool; fn irq_set_enable(irq: IrqId, enable: bool); fn dcache_range(op: DCacheOp, addr: usize, size: usize); unsafe fn efi_enter_kernel(system_table: *const c_void) -> bool; // Provided methods fn _io(paddr: usize) -> *mut u8 { ... } fn _percpu(paddr: usize) -> *mut u8 { ... } fn init_boot_tls() { ... } fn init_runtime_percpu_reg(_cpu_idx: usize) { ... }
}

Required Associated Types§

Required Methods§

Source

fn _va(paddr: usize) -> *mut u8

Source

fn cpu_current_hartid() -> usize

Source

fn jump_to(entry: usize, sp: usize) -> !

Source

fn post_allocator()

Source

fn per_cpu_trap_init(is_primary: bool)

Source

fn trap_addr() -> usize

Source

fn virt_to_phys(vaddr: *const u8) -> usize

Source

fn kernel_space() -> Range<usize>

Source

fn kernel_page_table() -> PageTableInfo

Source

fn set_kernel_page_table(val: PageTableInfo)

Source

fn shutdown() -> !

Source

fn secondary_entry_fn_address() -> *const ()

Source

fn cpu_on(hartid: usize, entry: usize, arg: usize) -> Result<(), CpuOnError>

Source

fn systimer_enable()

Source

fn systimer_irq_enable()

Source

fn systimer_irq_disable()

Source

fn systimer_irq_is_enabled() -> bool

Source

fn systimer_set_interval(ticks: usize)

Set the timer interval in ticks

Source

fn systimer_ack()

Acknowledge and clear the timer interrupt

Source

fn systimer_freq() -> usize

Get the timer frequency in Hz

Source

fn systimer_tick() -> usize

Get the current timer tick count

Source

fn irq_all_is_enabled() -> bool

Source

fn irq_all_set_enable(enable: bool)

Source

fn irq_is_enabled(irq: IrqId) -> bool

Source

fn irq_set_enable(irq: IrqId, enable: bool)

Source

fn dcache_range(op: DCacheOp, addr: usize, size: usize)

Source

unsafe fn efi_enter_kernel(system_table: *const c_void) -> bool

EFI 入口点 - 从 EFI PE 入口跳转到内核

§Safety

system_table 必须是当前 EFI 固件提供的有效 EFI_SYSTEM_TABLE 指针, 并且调用者必须保证此调用符合对应架构的启动约定。

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl ArchTrait for Arch

Source§

type P = Generic

Source§

type Console = Console