macro_rules! define_bootstrap_stages {
($print_fn:ident) => { ... };
}Expand description
Macro to generate the 12 bootstrap stage tracking functions.
Each architecture provides its own $print_fn macro that accepts a single
string literal and outputs it (with a trailing newline) to the
architecture’s early console. This eliminates the otherwise-identical
stage function bodies duplicated across x86_64, AArch64, and RISC-V.
§Usage
ⓘ
// In arch/<arch>/bootstrap.rs:
macro_rules! arch_boot_print {
($s:expr) => { /* arch-specific print */ };
}
crate::bootstrap::define_bootstrap_stages!(arch_boot_print);