kernel/arch/mod.rs
1// SPDX-License-Identifier: GPL-3.0-only
2//! Architecture-specific code
3//! Each arch's top level `mod.rs` should provide a public `boot` function to make initializing
4//! that arch easier
5//!
6//! Authors: MarioS271
7
8#[cfg(target_arch = "x86_64")] pub(crate) mod x86_64;
9
10#[cfg(target_arch = "aarch64")] pub(crate) mod aarch64;
11
12#[inline(always)]
13pub(crate) unsafe fn init(boot_info: &crate::lib::types::boot_info::BootInfo) {
14 unsafe {
15 #[cfg(target_arch = "x86_64")] x86_64::boot::init(boot_info);
16 #[cfg(target_arch = "aarch64")] aarch64::boot::init(boot_info);
17 }
18}