diff --git a/os/src/boards/qemu.rs b/os/src/boards/qemu.rs index 05527add4..f1f4e5638 100644 --- a/os/src/boards/qemu.rs +++ b/os/src/boards/qemu.rs @@ -1,6 +1,7 @@ //! Constants used in rCore for qemu pub const CLOCK_FREQ: usize = 12500000; +pub const MEMORY_END: usize = 0x8800_0000; pub const MMIO: &[(usize, usize)] = &[ (0x0010_0000, 0x00_2000), // VIRT_TEST/RTC in virt machine diff --git a/os/src/config.rs b/os/src/config.rs index e7dcee332..8c3c88fe5 100644 --- a/os/src/config.rs +++ b/os/src/config.rs @@ -3,7 +3,6 @@ pub const USER_STACK_SIZE: usize = 4096 * 2; pub const KERNEL_STACK_SIZE: usize = 4096 * 2; pub const KERNEL_HEAP_SIZE: usize = 0x30_0000; -pub const MEMORY_END: usize = 0x80800000; pub const PAGE_SIZE: usize = 0x1000; pub const PAGE_SIZE_BITS: usize = 0xc; @@ -16,4 +15,4 @@ pub fn kernel_stack_position(app_id: usize) -> (usize, usize) { (bottom, top) } -pub use crate::board::{CLOCK_FREQ, MMIO}; +pub use crate::board::{CLOCK_FREQ, MEMORY_END, MMIO};