Skip to main content

strat9_kernel/arch/
mod.rs

1// The x86_64 backend must only be compiled when targeting x86_64: the
2// `x86_64` crate and its inline asm do not exist on other architectures.
3#[cfg(target_arch = "x86_64")]
4pub mod x86_64;
5
6#[cfg(target_arch = "riscv64")]
7pub mod riscv64;
8
9#[cfg(target_arch = "x86_64")]
10pub mod facade;
11
12#[cfg(target_arch = "x86_64")]
13pub use facade::*;
14
15#[cfg(target_arch = "riscv64")]
16pub mod facade_riscv;
17
18#[cfg(target_arch = "riscv64")]
19pub use crate::arch::facade_riscv::*;
20
21/// riscv64 stub of the `x86_64` crate surface (runtime-panicking).
22/// Aliased as `crate::arch::x86_64` so call-sites not yet migrated keep
23/// resolving; every item traps at runtime until its jalon lands.
24#[cfg(target_arch = "riscv64")]
25pub mod x86_64_stub {
26    include!("xshim_riscv_stub.rs");
27}
28
29#[cfg(target_arch = "riscv64")]
30pub use x86_64_stub as x86_64;
31
32/// Neutral shim mirroring the used subset of the `x86_64` crate
33/// (address types, page sizes, paging flags). Available on all arches:
34/// on x86_64 it re-exports the real crate types, elsewhere it provides
35/// neutral equivalents.
36pub mod xshim;