From e100dd5a719b05b7102c73d8bf99d860b16d1721 Mon Sep 17 00:00:00 2001 From: Wildan M Date: Thu, 16 Jul 2026 16:04:31 +0700 Subject: [PATCH] Fix RISCV init memory --- src/arch/riscv64/start.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/arch/riscv64/start.rs b/src/arch/riscv64/start.rs index 2551968f05..3fca90f023 100644 --- a/src/arch/riscv64/start.rs +++ b/src/arch/riscv64/start.rs @@ -105,7 +105,7 @@ unsafe extern "C" fn start(args_ptr: *const KernelArgs) -> ! { } // Initialize RMM - crate::startup::memory::init(&args, None, None); + let bump_allocator = crate::startup::memory::init(&args, None, None); let boot_hart_id = get_boot_hart_id(args.env()).expect("Didn't get boot HART id from bootloader"); @@ -114,6 +114,8 @@ unsafe extern "C" fn start(args_ptr: *const KernelArgs) -> ! { paging::init(); + crate::memory::init_mm(bump_allocator); + crate::arch::misc::init(crate::cpu_set::LogicalCpuId::new(0)); // Setup kernel heap