mod.rs 2.69 KB
Newer Older
1
// Copyright (c) 2017 Stefan Lankes, RWTH Aachen University
2
//                    Colin Finck, RWTH Aachen University
3
//
Stefan Lankes's avatar
Stefan Lankes committed
4
5
6
7
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.
8

9
// Platform-specific implementations
10
#[cfg(target_arch = "aarch64")]
11
12
pub mod aarch64;

13
#[cfg(target_arch = "x86_64")]
14
15
pub mod x86_64;

Stefan Lankes's avatar
Stefan Lankes committed
16
// Export our platform-specific modules.
17
#[cfg(target_arch = "aarch64")]
18
pub use crate::arch::aarch64::*;
19

20
#[cfg(target_arch = "aarch64")]
21
22
23
pub use crate::arch::aarch64::kernel::stubs::{
	set_oneshot_timer, switch_to_fpu_owner, switch_to_task, wakeup_core,
};
Stefan Lankes's avatar
Stefan Lankes committed
24

25
#[cfg(target_arch = "aarch64")]
26
pub use crate::arch::aarch64::kernel::{
27
	application_processor_init, boot_application_processors, boot_processor_init,
28
	get_processor_count, message_output_init, output_message_buf, output_message_byte,
29
};
30

31
#[cfg(target_arch = "aarch64")]
32
use crate::arch::aarch64::kernel::percore::core_scheduler;
33

34
#[cfg(target_arch = "aarch64")]
35
pub use crate::arch::aarch64::kernel::percore;
36

37
#[cfg(target_arch = "aarch64")]
38
pub use crate::arch::aarch64::kernel::scheduler;
39

40
#[cfg(target_arch = "aarch64")]
41
pub use crate::arch::aarch64::kernel::processor;
42

43
#[cfg(target_arch = "aarch64")]
44
pub use crate::arch::aarch64::kernel::irq;
45

46
#[cfg(target_arch = "aarch64")]
47
pub use crate::arch::aarch64::kernel::systemtime::get_boot_time;
48

49
#[cfg(target_arch = "x86_64")]
50
pub use crate::arch::x86_64::*;
51

52
#[cfg(target_arch = "x86_64")]
53
pub use crate::arch::x86_64::kernel::apic::{set_oneshot_timer, wakeup_core};
54
#[cfg(all(target_arch = "x86_64", target_os = "hermit", feature = "smp"))]
55
pub use crate::arch::x86_64::kernel::application_processor_init;
56
#[cfg(target_arch = "x86_64")]
57
pub use crate::arch::x86_64::kernel::gdt::set_current_kernel_stack;
58
#[cfg(target_arch = "x86_64")]
59
pub use crate::arch::x86_64::kernel::irq;
60
#[cfg(target_arch = "x86_64")]
61
pub use crate::arch::x86_64::kernel::percore;
62
#[cfg(target_arch = "x86_64")]
63
pub use crate::arch::x86_64::kernel::processor;
64
#[cfg(target_arch = "x86_64")]
65
pub use crate::arch::x86_64::kernel::scheduler;
66
#[cfg(target_arch = "x86_64")]
67
68
pub use crate::arch::x86_64::kernel::switch;
#[cfg(target_arch = "x86_64")]
69
pub use crate::arch::x86_64::kernel::systemtime::get_boot_time;
70
71
#[cfg(all(target_arch = "x86_64", target_os = "hermit"))]
pub use crate::arch::x86_64::kernel::{boot_application_processors, boot_processor_init};
72
#[cfg(target_arch = "x86_64")]
73
pub use crate::arch::x86_64::kernel::{
jschwe's avatar
jschwe committed
74
	get_processor_count, message_output_init, output_message_buf, output_message_byte,
75
};