akern-gkgoat-fork/ableos/src/scratchpad.rs

39 lines
914 B
Rust
Raw Normal View History

use acpi::AcpiTables;
2022-03-11 15:14:35 -06:00
use crate::{kprintln, rhai_shell::rhai_shell, serial_println};
2022-02-08 03:01:29 -06:00
/// Experimental scratchpad for testing.
pub fn scratchpad() {
2022-03-11 15:14:35 -06:00
// pci_fun();
rhai_shell();
2022-02-08 04:13:53 -06:00
}
2022-02-12 03:25:02 -06:00
pub fn pci_fun() {}
2022-02-12 03:25:02 -06:00
pub fn acpi() {
let acpi_handler = AcpiStruct {};
let _table;
unsafe {
_table = AcpiTables::search_for_rsdp_bios(acpi_handler);
2022-02-12 03:25:02 -06:00
}
}
2022-03-11 14:16:15 -06:00
// 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");
2022-02-12 03:25:02 -06:00
}
}