#![cfg_attr(not(feature = "builder"), no_std)]
#![feature(asm)]
#![feature(unsafe_block_in_unsafe_fn)]
#![feature(maybe_uninit_extra)]
#![feature(maybe_uninit_slice)]
#![deny(unsafe_op_in_unsafe_fn)]
#![warn(missing_docs)]
pub use crate::boot_info::BootInfo;
pub mod config;
pub mod boot_info;
pub mod memory_region;
#[cfg(feature = "binary")]
pub mod binary;
#[cfg(feature = "builder")]
pub mod disk_image;
#[cfg(target_arch = "x86")]
compile_error!(
"This crate currently does not support 32-bit protected mode. \
See https://github.com/rust-osdev/bootloader/issues/70 for more information."
);
#[cfg(not(any(target_arch = "x86_64", target_arch = "x86")))]
compile_error!("This crate only supports the x86_64 architecture.");
#[macro_export]
macro_rules! entry_point {
($path:path) => {
#[export_name = "_start"]
pub extern "C" fn __impl_start(boot_info: &'static mut $crate::boot_info::BootInfo) -> ! {
let f: fn(&'static mut $crate::boot_info::BootInfo) -> ! = $path;
f(boot_info)
}
};
}