From 63e556a858f4d66809b9b3f5705e719c5fe7afe3 Mon Sep 17 00:00:00 2001 From: zhangxinyu <840317537@qq.com> Date: Wed, 24 May 2023 16:08:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=80=E4=B8=AA=E9=85=8D?= =?UTF-8?q?=E7=BD=AE,=20=E7=94=A8=E6=9D=A5=E8=A1=A8=E7=A4=BAqemu=E7=9A=84c?= =?UTF-8?q?pu=E9=A2=91=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ch3/os/src/boards/qemu.rs | 3 +++ ch3/os/src/config.rs | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 ch3/os/src/boards/qemu.rs 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