ostd/arch/x86/boot/
mod.rs

1// SPDX-License-Identifier: MPL-2.0
2
3//! The x86 boot module defines the entrypoints of Asterinas and
4//! the corresponding headers for different x86 boot protocols.
5//!
6//! We directly support
7//!
8//!  - Multiboot
9//!  - Multiboot2
10//!  - Linux x86 Boot Protocol
11//!
12//! without any additional configurations.
13//!
14//! Asterinas diffrentiates the boot protocol by the entry point
15//! chosen by the boot loader. In each entry point function,
16//! the universal callback registration method from
17//! `crate::boot` will be called. Thus the initialization of
18//! boot information is transparent for the upper level kernel.
19//!
20
21mod linux_boot;
22mod multiboot;
23mod multiboot2;
24
25pub(crate) mod smp;
26
27use core::arch::global_asm;
28
29global_asm!(
30    include_str!("bsp_boot.S"),
31    KCODE64 = const super::trap::gdt::KCODE64,
32    KDATA = const super::trap::gdt::KDATA,
33    KCODE32 = const super::trap::gdt::KCODE32,
34);
35global_asm!(include_str!("ap_boot.S"));