Commit fdf1dfb2 authored by John Hodge's avatar John Hodge
Browse files

Kernel - Minor tweaks for a potential xargo build

parent 2a5b0409
......@@ -6,6 +6,7 @@
"target-pointer-width": "64",
"target-word-size": "64",
"target-c-int-width": "32",
"features": "-mmx,-sse,+soft-float",
"os": "tifflin",
"arch": "x86_64",
"linker-flavor": "ld",
......
......@@ -5,6 +5,7 @@
#[macro_use]
#[cfg_attr(arch="amd64", path="amd64/mod.rs")]
#[cfg_attr(target_arch="x86_64", path="amd64/mod.rs")]
#[cfg_attr(arch="armv7", path="armv7/mod.rs")]
#[cfg_attr(arch="armv8", path="armv8/mod.rs")]
#[cfg_attr(test, path="imp-test.rs")]
......@@ -13,7 +14,7 @@
pub mod imp; // Needs to be pub for exports to be avaliable
// If on x86/amd64, import ACPI
#[cfg(arch="amd64")]
#[cfg(any(arch="amd64", target_arch="x86_64"))]
pub use self::imp::acpi;
......
......@@ -45,7 +45,7 @@ pub use arch::memory::PAGE_SIZE;
#[doc(hidden)]
#[macro_use] pub mod macros;
#[doc(hidden)]
#[macro_use] #[cfg(arch="amd64")] #[path="arch/amd64/mod-macros.rs"] pub mod arch_macros;
#[macro_use] #[cfg(any(arch="amd64", target_arch="x86_64"))] #[path="arch/amd64/mod-macros.rs"] pub mod arch_macros;
/// Kernel's version of 'std::prelude'
pub mod prelude;
......
......@@ -22,7 +22,8 @@ pub fn new_boxed<T: Interface+Send+Sync+'static>(dev_id: u32, int: T) -> Box<dev
Box::new(NullDevice)
}
2 => Box::new( block::BlockDevice::new(int) ), // 2 = Block device
16 => Box::new( video::VideoDevice::new(int) ), // 16 = Graphics Adapter
// DISABLED: Changing video modes breaks stuff currently...
//16 => Box::new( video::VideoDevice::new(int) ), // 16 = Graphics Adapter
dev @ _ => {
log_error!("VirtIO device has unknown device ID {:#x}", dev);
Box::new(NullDevice)
......
......@@ -317,8 +317,8 @@ enum ArchValues {
ARMv7 = 3,
ARMv8 = 4,
}
#[cfg(arch="amd64")] const ARCH: ArchValues = ArchValues::AMD64;
#[cfg(arch="amd64")] const LOAD_MAX: usize = 1 << 47;
#[cfg(any(arch="amd64",target_arch="x86_64"))] const ARCH: ArchValues = ArchValues::AMD64;
#[cfg(any(arch="amd64",target_arch="x86_64"))] const LOAD_MAX: usize = 1 << 47;
#[cfg(arch="armv7")] const ARCH: ArchValues = ArchValues::ARMv7;
#[cfg(arch="armv7")] const LOAD_MAX: usize = (1 << 31) - (4 << 20); // Leave 4MB for the kernel to control within the user table
#[cfg(arch="armv8")] const ARCH: ArchValues = ArchValues::ARMv8;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment