Expand description
ArceOS hardware abstraction layer, provides unified APIs for platform-specific operations.
It does the bootstrapping and initialization process for the specified platform, and provides useful operations on the hardware.
Currently supported platforms (specify by cargo features):
x86-pc: Standard PC with x86_64 ISA.riscv64-qemu-virt: QEMU virt machine with RISC-V ISA.aarch64-qemu-virt: QEMU virt machine with AArch64 ISA.aarch64-raspi: Raspberry Pi with AArch64 ISA.dummy: If none of the above platform is selected, the dummy platform will be used. In this platform, most of the operations are no-op orunimplemented!(). This platform is mainly used for cargo test.
§Cargo Features
smp: Enable SMP (symmetric multiprocessing) support.fp-simd: Enable floating-point and SIMD support.paging: Enable page table manipulation.irq: Enable interrupt handling support.tls: Enable kernel space thread-local storage support.rtc: Enable real-time clock support.uspace: Enable user space support.
Modules§
- asm
- Wrapper functions for assembly instructions.
- console
- Console input and output.
- context
- CPU register states for context switching.
- irq
irq - Interrupt management.
- mem
- Physical memory management.
- paging
paging - Page table manipulation.
- percpu
- CPU-local data structures.
- power
- CPU power management.
- time
- Time-related operations.
- tls
tls - Thread Local Storage (TLS) support.
- trap
- Trap handling.
Functions§
- get_
bootarg - Returns the boot argument. This is typically the device tree blob address passed from the bootloader.
- init_
early - Initializes the platform and boot argument. This function should be called as early as possible.
- init_
early_ secondary smp - Initializes the platform at the early stage for secondary cores.
- init_
later - Initializes the platform at the later stage for the primary core.
- init_
later_ secondary smp - Initializes the platform at the later stage for secondary cores.
- init_
percpu - Initializes CPU-local data structures for the primary core.
- init_
percpu_ secondary smp - Initializes CPU-local data structures for secondary cores.