Fix compilation of acpi feature
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use alloc::boxed::Box;
|
||||
use alloc::string::String;
|
||||
use alloc::btree_map::BTreeMap;
|
||||
use alloc::collections::BTreeMap;
|
||||
|
||||
use super::AmlError;
|
||||
use super::parser::{ AmlParseType, ParseResult, AmlParseTypeGeneric, AmlExecutionContext, ExecutionState };
|
||||
|
||||
@@ -2,7 +2,7 @@ use alloc::boxed::Box;
|
||||
use alloc::string::String;
|
||||
use alloc::string::ToString;
|
||||
use alloc::vec::Vec;
|
||||
use alloc::btree_map::BTreeMap;
|
||||
use alloc::collections::BTreeMap;
|
||||
|
||||
use core::fmt::{Debug, Formatter, Error};
|
||||
use core::str::FromStr;
|
||||
@@ -12,7 +12,7 @@ use super::namedobj::{ RegionSpace, FieldFlags };
|
||||
use super::parser::{AmlExecutionContext, ExecutionState};
|
||||
use super::AmlError;
|
||||
|
||||
use acpi::{SdtSignature, get_signature_from_index, get_index_from_signature};
|
||||
use crate::acpi::{SdtSignature, get_signature_from_index, get_index_from_signature};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub enum FieldSelector {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use alloc::string::String;
|
||||
use alloc::btree_map::BTreeMap;
|
||||
use alloc::collections::BTreeMap;
|
||||
use alloc::vec::Vec;
|
||||
use alloc::boxed::Box;
|
||||
|
||||
@@ -8,7 +8,7 @@ use spin::RwLockWriteGuard;
|
||||
use super::namespace::{ AmlValue, ObjectReference };
|
||||
use super::AmlError;
|
||||
|
||||
use acpi::ACPI_TABLE;
|
||||
use crate::acpi::ACPI_TABLE;
|
||||
|
||||
pub type ParseResult = Result<AmlParseType, AmlError>;
|
||||
pub type AmlParseType = AmlParseTypeGeneric<AmlValue>;
|
||||
|
||||
@@ -5,9 +5,9 @@ use super::pkglength::parse_pkg_length;
|
||||
use super::termlist::{parse_term_arg, parse_term_list};
|
||||
use super::namestring::{parse_name_string, parse_super_name};
|
||||
|
||||
use time::monotonic;
|
||||
use crate::time::monotonic;
|
||||
|
||||
use acpi::{Sdt, load_table, get_sdt_signature};
|
||||
use crate::acpi::{Sdt, load_table, get_sdt_signature};
|
||||
use super::{parse_aml_table, is_aml_table};
|
||||
|
||||
pub fn parse_type1_opcode(data: &[u8],
|
||||
|
||||
@@ -10,8 +10,8 @@ use super::termlist::{parse_term_arg, parse_method_invocation};
|
||||
use super::namestring::{parse_super_name, parse_target, parse_name_string, parse_simple_name};
|
||||
use super::dataobj::parse_data_ref_obj;
|
||||
|
||||
use time::monotonic;
|
||||
use acpi::SDT_POINTERS;
|
||||
use crate::time::monotonic;
|
||||
use crate::acpi::SDT_POINTERS;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum MatchOpcode {
|
||||
|
||||
@@ -2,9 +2,9 @@ use core::mem;
|
||||
|
||||
use super::sdt::Sdt;
|
||||
use self::drhd::Drhd;
|
||||
use memory::Frame;
|
||||
use paging::{ActivePageTable, PhysicalAddress};
|
||||
use paging::entry::EntryFlags;
|
||||
use crate::memory::Frame;
|
||||
use crate::paging::{ActivePageTable, PhysicalAddress};
|
||||
use crate::paging::entry::EntryFlags;
|
||||
|
||||
use super::{find_sdt, load_table, get_sdt_signature};
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ use core::{mem, ptr};
|
||||
use super::sdt::Sdt;
|
||||
use super::{ACPI_TABLE, SDT_POINTERS, get_sdt, find_sdt, get_sdt_signature, load_table};
|
||||
|
||||
use paging::ActivePageTable;
|
||||
use crate::paging::ActivePageTable;
|
||||
|
||||
#[repr(packed)]
|
||||
#[derive(Debug)]
|
||||
|
||||
@@ -2,9 +2,9 @@ use core::{mem, ptr};
|
||||
|
||||
use core::intrinsics::{volatile_load, volatile_store};
|
||||
|
||||
use memory::Frame;
|
||||
use paging::{ActivePageTable, PhysicalAddress, Page, VirtualAddress};
|
||||
use paging::entry::EntryFlags;
|
||||
use crate::memory::Frame;
|
||||
use crate::paging::{ActivePageTable, PhysicalAddress, Page, VirtualAddress};
|
||||
use crate::paging::entry::EntryFlags;
|
||||
|
||||
use super::sdt::Sdt;
|
||||
use super::{ACPI_TABLE, find_sdt, load_table, get_sdt_signature};
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use core::mem;
|
||||
|
||||
use memory::{allocate_frames, Frame};
|
||||
use paging::{ActivePageTable, Page, PhysicalAddress, VirtualAddress};
|
||||
use paging::entry::EntryFlags;
|
||||
use crate::memory::{allocate_frames, Frame};
|
||||
use crate::paging::{ActivePageTable, Page, PhysicalAddress, VirtualAddress};
|
||||
use crate::paging::entry::EntryFlags;
|
||||
|
||||
use super::sdt::Sdt;
|
||||
use super::{AP_STARTUP, TRAMPOLINE, find_sdt, load_table, get_sdt_signature};
|
||||
@@ -10,9 +10,9 @@ use super::{AP_STARTUP, TRAMPOLINE, find_sdt, load_table, get_sdt_signature};
|
||||
use core::intrinsics::{atomic_load, atomic_store};
|
||||
use core::sync::atomic::Ordering;
|
||||
|
||||
use device::local_apic::LOCAL_APIC;
|
||||
use interrupt;
|
||||
use start::{kstart_ap, CPU_COUNT, AP_READY};
|
||||
use crate::device::local_apic::LOCAL_APIC;
|
||||
use crate::interrupt;
|
||||
use crate::start::{kstart_ap, CPU_COUNT, AP_READY};
|
||||
|
||||
/// The Multiple APIC Descriptor Table
|
||||
#[derive(Debug)]
|
||||
@@ -64,7 +64,7 @@ impl Madt {
|
||||
CPU_COUNT.fetch_add(1, Ordering::SeqCst);
|
||||
|
||||
// Allocate a stack
|
||||
let stack_start = allocate_frames(64).expect("no more frames in acpi stack_start").start_address().get() + ::KERNEL_OFFSET;
|
||||
let stack_start = allocate_frames(64).expect("no more frames in acpi stack_start").start_address().get() + crate::KERNEL_OFFSET;
|
||||
let stack_end = stack_start + 64 * 4096;
|
||||
|
||||
let ap_ready = TRAMPOLINE as *mut u64;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//! # ACPI
|
||||
//! Code to parse the ACPI tables
|
||||
|
||||
use alloc::btree_map::BTreeMap;
|
||||
use alloc::collections::BTreeMap;
|
||||
use alloc::string::String;
|
||||
use alloc::vec::Vec;
|
||||
use alloc::boxed::Box;
|
||||
@@ -10,11 +10,11 @@ use syscall::io::{Io, Pio};
|
||||
|
||||
use spin::RwLock;
|
||||
|
||||
use stop::kstop;
|
||||
use crate::stop::kstop;
|
||||
|
||||
use memory::Frame;
|
||||
use paging::{ActivePageTable, Page, PhysicalAddress, VirtualAddress};
|
||||
use paging::entry::EntryFlags;
|
||||
use crate::memory::Frame;
|
||||
use crate::paging::{ActivePageTable, Page, PhysicalAddress, VirtualAddress};
|
||||
use crate::paging::entry::EntryFlags;
|
||||
|
||||
use self::dmar::Dmar;
|
||||
use self::fadt::Fadt;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use memory::Frame;
|
||||
use paging::{ActivePageTable, Page, PhysicalAddress, VirtualAddress};
|
||||
use paging::entry::EntryFlags;
|
||||
use crate::memory::Frame;
|
||||
use crate::paging::{ActivePageTable, Page, PhysicalAddress, VirtualAddress};
|
||||
use crate::paging::entry::EntryFlags;
|
||||
|
||||
/// RSDP
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use alloc::boxed::Box;
|
||||
|
||||
use paging::ActivePageTable;
|
||||
use crate::paging::ActivePageTable;
|
||||
|
||||
use super::sdt::Sdt;
|
||||
use super::get_sdt;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use acpi::hpet::Hpet;
|
||||
use crate::acpi::hpet::Hpet;
|
||||
|
||||
static LEG_RT_CNF: u64 = 2;
|
||||
static ENABLE_CNF: u64 = 1;
|
||||
|
||||
@@ -16,7 +16,7 @@ pub unsafe fn init(active_table: &mut ActivePageTable){
|
||||
|
||||
#[cfg(feature = "acpi")]
|
||||
unsafe fn init_hpet() -> bool {
|
||||
use acpi::ACPI_TABLE;
|
||||
use crate::acpi::ACPI_TABLE;
|
||||
if let Some(ref mut hpet) = *ACPI_TABLE.hpet.write() {
|
||||
hpet::init(hpet)
|
||||
} else {
|
||||
|
||||
@@ -22,7 +22,7 @@ pub fn ipi(_kind: IpiKind, _target: IpiTarget) {}
|
||||
#[cfg(feature = "multi_core")]
|
||||
#[inline(always)]
|
||||
pub fn ipi(kind: IpiKind, target: IpiTarget) {
|
||||
use device::local_apic::LOCAL_APIC;
|
||||
use crate::device::local_apic::LOCAL_APIC;
|
||||
|
||||
let icr = (target as u64) << 18 | 1 << 14 | (kind as u64);
|
||||
unsafe { LOCAL_APIC.set_icr(icr) };
|
||||
|
||||
@@ -8,7 +8,7 @@ use core::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
|
||||
|
||||
use crate::allocator;
|
||||
#[cfg(feature = "acpi")]
|
||||
use acpi;
|
||||
use crate::acpi;
|
||||
#[cfg(feature = "graphical_debug")]
|
||||
use arch::x86_64::graphical_debug;
|
||||
use crate::arch::x86_64::pti;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#[cfg(feature = "acpi")]
|
||||
use acpi;
|
||||
use crate::acpi;
|
||||
use crate::syscall::io::{Io, Pio};
|
||||
|
||||
#[no_mangle]
|
||||
|
||||
Reference in New Issue
Block a user