From cbee8b7dde708164081fdb979e2b96740ba516a6 Mon Sep 17 00:00:00 2001 From: Nathan Ringo Date: Wed, 4 Sep 2024 02:19:32 -0500 Subject: Enables paging. --- crates/kernel/src/arch/riscv64/mod.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'crates/kernel/src/arch/riscv64/mod.rs') diff --git a/crates/kernel/src/arch/riscv64/mod.rs b/crates/kernel/src/arch/riscv64/mod.rs index 216a90c..15f44c7 100644 --- a/crates/kernel/src/arch/riscv64/mod.rs +++ b/crates/kernel/src/arch/riscv64/mod.rs @@ -1,11 +1,12 @@ pub mod interrupts; +pub mod paging; -/// The size of a page of memory. -pub const PAGE_SIZE: usize = 4096; - -/// The number of bits in the size of a page of memory. +/// The number of bits in the size of a regular-sized page of memory. pub const PAGE_SIZE_BITS: usize = 12; +/// The number of bits in the size of the largest huge page. +pub const MAX_PAGE_SIZE_BITS: usize = 30; + /// Halts the hart. pub fn sleep_forever() -> ! { loop { -- cgit v1.2.3