diff options
author | Nathan Ringo <nathan@remexre.com> | 2024-09-04 02:19:32 -0500 |
---|---|---|
committer | Nathan Ringo <nathan@remexre.com> | 2024-09-04 02:19:32 -0500 |
commit | cbee8b7dde708164081fdb979e2b96740ba516a6 (patch) | |
tree | f18bcf8da431d85fb09c4f3884de85a739edc860 /crates/kernel/src/arch/riscv64/mod.rs | |
parent | c27e5ca6bf2b4040abd628ef59f8a3bc9326749c (diff) |
Enables paging.
Diffstat (limited to 'crates/kernel/src/arch/riscv64/mod.rs')
-rw-r--r-- | crates/kernel/src/arch/riscv64/mod.rs | 9 |
1 files changed, 5 insertions, 4 deletions
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 { |