Crate kernel_hal[][src]

Hardware Abstraction Layer

Re-exports

pub use self::defs::*;

Modules

defs
user
vdso

Structs

GeneralRegs

General registers

HalError

The error type which is returned from HAL functions.

InterruptManager
PageTable

Page Table

PhysFrame
SerialFuture
SleepFuture
Thread
U128
UserContext

User space context

VectorRegs

Traits

PageTableTrait

Functions

apic_local_id

Get local APIC ID

context_run
fetch_fault_vaddr

Get fault address of the last page fault.

fill_random

Fill random bytes to the buffer

frame_copy

Copy content of src frame to target frame.

frame_flush

Flush the physical frame.

get_acpi_table

Get ACPI Table

inpd
outpd

IO Ports access on x86 platform

pc_firmware_tables

Get physical address of acpi_rsdp and smbios on x86_64.

pmem_read

Read physical memory from paddr to buf.

pmem_write

Write physical memory to paddr from buf.

pmem_zero

Zero physical memory at [paddr, paddr + len)

serial_getchar

Get a char from serial.

serial_read

Read a string from console.

serial_set_callback

Register a callback of serial readable event.

serial_write

Output a string to console.

sleep_until

Sleeps until the specified of time.

timer_now

Get current time.

timer_set

Set a new timer. After deadline, the callback will be called.

timer_tick

Check timers, call when timer interrupt happened.

vdso_constants

Get platform specific information.

yield_now

Yields execution back to the async runtime.

Type Definitions

Result

The result type returned by HAL functions.