30 lines
667 B
Rust
30 lines
667 B
Rust
// Copyright (c) 2025 shibedrill
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#[cfg(feature = "acpi")]
|
|
mod acpi;
|
|
#[cfg(feature = "dtb")]
|
|
mod devtree;
|
|
|
|
use crate::log::{LOGGER, LogLevel};
|
|
use crate::{format, log_error};
|
|
|
|
// Just to check
|
|
pub fn init_statics() {
|
|
let dtb = {
|
|
#[cfg(feature = "dtb")]
|
|
{ devtree::DTB.is_some() }
|
|
#[cfg(not(feature = "dtb"))]
|
|
false
|
|
};
|
|
let rdsp = {
|
|
#[cfg(feature = "acpi")]
|
|
{ acpi::RSDP.is_some() }
|
|
#[cfg(not(feature = "acpi"))]
|
|
false
|
|
};
|
|
if !dtb & !rdsp {
|
|
log_error!("Device: Neither DTB nor ACPI available, booted system will be useless")
|
|
}
|
|
}
|