1
0
Fork 0
forked from koniifer/ableos
ableos-framebuffer/ableos/src/scratchpad.rs
2022-03-26 06:35:33 -05:00

59 lines
1.2 KiB
Rust

use acpi::AcpiTables;
use kernel::device_interface::character::CharacterDevice;
use crate::devices::DEVICE_TABLE;
use crate::rhai_shell::shell;
use crate::stdio::StdIO;
use crate::devices::Device::Vterm;
/// Experimental scratchpad for testing.
pub fn scratchpad() {
let axel_raw = "
kernel{
vals=
time: 123
fn|
print: (None) -> (None);
foo: (None) -> (Num);
}
";
let axel = axel::parse(axel_raw.to_string());
for node in axel {
info!("{:?}", node);
}
shell();
}
use core::fmt::Write;
pub fn pci_fun() {}
pub fn acpi() {
let acpi_handler = AcpiStruct {};
let _table;
unsafe {
_table = AcpiTables::search_for_rsdp_bios(acpi_handler);
}
}
// TODO: move to a better place
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct AcpiStruct {}
impl acpi::AcpiHandler for AcpiStruct {
unsafe fn map_physical_region<T>(
&self,
physical_address: usize,
size: usize,
) -> acpi::PhysicalMapping<Self, T> {
info!("PHYS ADDR: {:?}", physical_address);
info!("Size: {:?}", size);
todo!("map_physical_region");
}
fn unmap_physical_region<T>(_region: &acpi::PhysicalMapping<Self, T>) {
todo!("unmap_physical_region");
}
}