kernel/_arch/aarch64/cpu/
boot.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//! Architectural boot code.
//!
//! # Orientation
//!
//! Since arch modules are imported into generic modules using the path attribute, the path of this file is:
//!
//! crate::cpu::boot::arch_boot;

use core::arch::global_asm;

// Assembly counterpart to this file
global_asm!(
  include_str!("boot.s"),
  CONST_CORE_ID_MASK = const 0b11
);

// ========================
// Public code
// ========================

/// The Rust entry of the `kernel` binary.
///
/// The function is called from the assembly `_start` function.
#[no_mangle]
pub unsafe fn _start_rust() -> ! {
    crate::kernel_init()
}