hardware 0.0.7

A no_std bare-metal hardware abstraction layer — all port I/O, memory and swap allocations are guarded at runtime. Do not consider this dependency stable before x.1.x
Documentation
#[derive(Copy, Clone)]
pub struct RamInfo {
    pub total_bytes: usize,
    pub modules: u8,
    pub ecc_enabled: bool,
}

pub fn detect_ram(info: &mut RamInfo) -> bool {
    if let Some((start, end)) = crate::memory::phys::allocator::PhysAllocator::region() {
        info.total_bytes = end.saturating_sub(start);
        info.modules = 1;
        info.ecc_enabled = false;
        true
    } else {
        let total = crate::boot::total_usable_ram();
        info.total_bytes = total;
        info.modules = 1;
        info.ecc_enabled = false;
        true
    }
}