#[cfg_attr(target_arch = "x86", path = "arch/i686/layout.rs")]
#[cfg_attr(
all(target_arch = "x86_64", not(feature = "nanvix-unstable")),
path = "arch/amd64/layout.rs"
)]
#[cfg_attr(
all(target_arch = "x86_64", feature = "nanvix-unstable"),
path = "arch/i686/layout.rs"
)]
#[cfg_attr(target_arch = "aarch64", path = "arch/aarch64/layout.rs")]
mod arch;
pub use arch::{MAX_GPA, MAX_GVA};
#[cfg(any(
all(target_arch = "x86_64", not(feature = "nanvix-unstable")),
target_arch = "aarch64"
))]
pub use arch::{SNAPSHOT_PT_GVA_MAX, SNAPSHOT_PT_GVA_MIN};
pub const SCRATCH_TOP_SIZE_OFFSET: u64 = 0x08;
pub const SCRATCH_TOP_ALLOCATOR_OFFSET: u64 = 0x10;
pub const SCRATCH_TOP_SNAPSHOT_PT_GPA_BASE_OFFSET: u64 = 0x18;
pub const SCRATCH_TOP_EXN_STACK_OFFSET: u64 = 0x20;
#[cfg(feature = "nanvix-unstable")]
pub const SCRATCH_TOP_GUEST_COUNTER_OFFSET: u64 = 0x1008;
pub fn scratch_base_gpa(size: usize) -> u64 {
(MAX_GPA - size + 1) as u64
}
pub fn scratch_base_gva(size: usize) -> u64 {
(MAX_GVA - size + 1) as u64
}
pub use arch::min_scratch_size;