summaryrefslogtreecommitdiff
path: root/crates/kernel/src/lib.rs
diff options
context:
space:
mode:
authorNathan Ringo <nathan@remexre.com>2024-09-14 23:04:03 -0500
committerNathan Ringo <nathan@remexre.com>2024-09-14 23:04:03 -0500
commit22231ec036268ca2adb1f0b0feed0a91ea68728f (patch)
tree79dc49db7bd7758a7eb40a64828628461930b228 /crates/kernel/src/lib.rs
parent0392b41e7081c11caa9d04aa738bdac97062e9dd (diff)
Start of virtual memory allocator; got an ICE, though!
Diffstat (limited to 'crates/kernel/src/lib.rs')
-rw-r--r--crates/kernel/src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/kernel/src/lib.rs b/crates/kernel/src/lib.rs
index 0ca535a..7421649 100644
--- a/crates/kernel/src/lib.rs
+++ b/crates/kernel/src/lib.rs
@@ -43,7 +43,7 @@ impl EarlyBootAddrs {
/// Looks for a DeviceTree at address in the `EarlyBootAddrs`, and returns it if it looks
/// valid. Panics if the DeviceTree is invalid.
///
- /// ## Safety
+ /// # Safety
///
/// - The `EarlyBootAddrs` must be accurate.
/// - The `device_tree` pointer must be a valid pointer into physical memory. See
@@ -194,7 +194,7 @@ pub unsafe extern "C" fn hart0_early_boot(early_boot_addrs: &mut EarlyBootAddrs)
let new_stack_start = new_stack_end - STACK_SIZE;
vaddr_bump = new_stack_start;
for i in 0..((STACK_SIZE >> PAGE_SIZE_BITS) - 1) {
- let vaddr = new_kernel_start + (i << PAGE_SIZE_BITS);
+ let vaddr = new_stack_start + (i << PAGE_SIZE_BITS);
let paddr =
alloc_page(PAGE_SIZE).expect("failed to allocate memory for a hart0 stack page");
kernel_map(