Skip to content

Commit b3c5562

Browse files
committed
debug(mm): enable ONLY heap init, skip page tables
- Test if crash is in heap::init vs init_our_page_tables - Heap at 32MB (0x2000000), 16MB size
1 parent 9648228 commit b3c5562

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/mm/mod.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,18 @@ pub fn init(_st: &SystemTable<Boot>) -> (u64, ()) {
1212
#[cfg(target_arch = "x86_64")]
1313
{
1414
// ============================================================
15-
// ULTRA-MINIMAL DEBUG: Do absolutely NOTHING.
16-
// Just return defaults to see if we can pass this point.
15+
// DEBUG: Enable ONLY heap init, skip page tables
1716
// ============================================================
1817

19-
// Use default allocator addresses (set at compile time in paging.rs)
20-
// Don't call init_allocator, don't call init_our_page_tables
21-
// This should let us boot past this point.
18+
let heap_start: u64 = 0x2000000; // 32MB
19+
let heap_size: u64 = 0x1000000; // 16MB
20+
21+
// B. Init Global Heap (for Vec/Box)
22+
unsafe {
23+
crate::mm::heap::init(heap_start as usize, heap_size as usize);
24+
}
25+
26+
// Skip: crate::mm::paging::init_our_page_tables();
2227

2328
(paging::PHYS_OFFSET, ())
2429
}

0 commit comments

Comments
 (0)