Move x86_64 specific external crate to arch mod

master
WangRunji 6 years ago
parent 89bcd5f660
commit 02586cdb98

@ -4,7 +4,7 @@
/// http://www.intel.com/design/chipsets/datashts/29056601.pdf
/// See also picirq.c.
use redox_syscall::io::{Io, Mmio};
use super::super::redox_syscall::io::{Io, Mmio};
use bit_field::BitField;
use arch::interrupt::consts::T_IRQ0;
use spin::Mutex;

@ -1,3 +1,5 @@
extern crate syscall as redox_syscall;
pub mod vga;
pub mod acpi;
pub mod apic;

@ -1,6 +1,6 @@
// Copy from Redox
use redox_syscall::io::*;
use super::redox_syscall::io::*;
use spin::Mutex;
static MASTER: Mutex<Pic> = Mutex::new(Pic::new(0x20));

@ -1,4 +1,4 @@
use redox_syscall::io::{Io, Pio};
use super::redox_syscall::io::{Io, Pio};
static mut PIT: Pit = Pit::new(0x40);

@ -1,9 +1,10 @@
// Copy from Redox
extern crate uart_16550;
use core::fmt::{self, Write};
use redox_syscall::io::{Io, Pio};
use super::redox_syscall::io::{Io, Pio};
use spin::Mutex;
use uart_16550::SerialPort;
use self::uart_16550::SerialPort;
pub static COM1: Mutex<SerialPort> = Mutex::new(SerialPort::new(0x3F8));
pub static COM2: Mutex<SerialPort> = Mutex::new(SerialPort::new(0x2F8));

@ -2,8 +2,8 @@ use bit_allocator::{BitAlloc, BitAlloc64K};
use consts::KERNEL_OFFSET;
// Depends on kernel
use memory::{active_table, FRAME_ALLOCATOR, init_heap, MemoryArea, MemoryAttr, MemorySet, Stack};
use multiboot2::{ElfSection, ElfSectionFlags, ElfSectionsTag};
use multiboot2::BootInformation;
use super::multiboot2::{ElfSection, ElfSectionFlags, ElfSectionsTag};
use super::multiboot2::BootInformation;
use ucore_memory::PAGE_SIZE;
use ucore_memory::paging::PageTable;

@ -1,5 +1,6 @@
extern crate multiboot2;
use memory::MemorySet;
use multiboot2;
pub mod driver;
pub mod cpu;

@ -30,18 +30,12 @@ extern crate lazy_static;
extern crate linked_list_allocator;
#[macro_use]
extern crate log;
#[cfg(target_arch = "x86_64")]
extern crate multiboot2;
#[macro_use]
extern crate once;
extern crate rlibc;
#[cfg(target_arch = "x86_64")]
extern crate simple_filesystem;
extern crate spin;
#[cfg(target_arch = "x86_64")]
extern crate syscall as redox_syscall;
#[cfg(target_arch = "x86_64")]
extern crate uart_16550;
extern crate ucore_memory;
extern crate volatile;
#[macro_use]

Loading…
Cancel
Save