You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
952 B
Rust
34 lines
952 B
Rust
3 years ago
|
// SPDX-License-Identifier: MIT OR Apache-2.0
|
||
|
//
|
||
|
// Copyright (c) 2021 Andre Richter <andre.o.richter@gmail.com>
|
||
|
|
||
|
//! 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
|
||
|
|
||
3 years ago
|
use crate::runtime_init;
|
||
|
|
||
|
// Assembly counterpart to this file.
|
||
|
global_asm!(include_str!("boot.s"));
|
||
3 years ago
|
|
||
|
//--------------------------------------------------------------------------------------------------
|
||
|
// Public Code
|
||
|
//--------------------------------------------------------------------------------------------------
|
||
|
|
||
3 years ago
|
/// The Rust entry of the `kernel` binary.
|
||
3 years ago
|
///
|
||
3 years ago
|
/// The function is called from the assembly `_start` function.
|
||
3 years ago
|
///
|
||
|
/// # Safety
|
||
|
///
|
||
3 years ago
|
/// - The `bss` section is not initialized yet. The code must not use or reference it in any way.
|
||
3 years ago
|
#[no_mangle]
|
||
3 years ago
|
pub unsafe fn _start_rust() -> ! {
|
||
|
runtime_init::runtime_init()
|
||
3 years ago
|
}
|