diff --git a/ch3/os/src/boards/qemu.rs b/ch3/os/src/boards/qemu.rs new file mode 100644 index 0000000..c2f609a --- /dev/null +++ b/ch3/os/src/boards/qemu.rs @@ -0,0 +1,3 @@ +//! Constants used in rCore for qemu + +pub const CLOCK_FREQ: usize = 12500000; diff --git a/ch3/os/src/config.rs b/ch3/os/src/config.rs index 4fa0a12..aad4690 100644 --- a/ch3/os/src/config.rs +++ b/ch3/os/src/config.rs @@ -3,4 +3,6 @@ pub const APP_SIZE_LIMIT: usize = 0x20000; // app的最大的二进制文件能 pub const MAX_APP_NUM: usize = 4; // 支持最大的用户应用数量 pub const USER_STACK_SIZE: usize = 4096 * 2; // 栈大小为8kb -pub const KERNEL_STACK_SIZE: usize = 4096 * 2; \ No newline at end of file +pub const KERNEL_STACK_SIZE: usize = 4096 * 2; + +pub use crate::board::*; \ No newline at end of file