Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
John Hodge
rust_os
Commits
fdf1dfb2
Commit
fdf1dfb2
authored
Mar 17, 2019
by
John Hodge
Browse files
Kernel - Minor tweaks for a potential xargo build
parent
2a5b0409
Changes
5
Hide whitespace changes
Inline
Side-by-side
Kernel/Core/arch/amd64/target.json
View file @
fdf1dfb2
...
...
@@ -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"
,
...
...
Kernel/Core/arch/mod.rs
View file @
fdf1dfb2
...
...
@@ -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
;
...
...
Kernel/Core/main.rs
View file @
fdf1dfb2
...
...
@@ -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
;
...
...
Kernel/Modules/virtio/devices/mod.rs
View file @
fdf1dfb2
...
...
@@ -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
)
...
...
Kernel/main/main.rs
View file @
fdf1dfb2
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment