Skip to content

Commit abac379

Browse files
committed
wip: additional memory regions steps
1 parent ed2b6de commit abac379

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

nucleus/src/main.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -194,19 +194,23 @@ pub fn kmain(dtb: u32) -> ! {
194194
println!("Memory: {} KiB at offset {}", mem_size / 1024, mem_addr);
195195
}
196196

197-
// List unusable memory, and remove it from the memory regions for the allocator.
197+
// 4. List unusable memory, and remove it from the memory regions for the allocator.
198198
for entry in device_tree.fdt().reserved_entries() {
199199
let size: u64 = entry.size.into();
200200
let address: u64 = entry.address.into();
201201
println!("Reserved memory: {:?} bytes at {:?}", size, address);
202202
}
203203

204+
// 5. Also list memreserve entries, and remove then from allocator regions?
205+
// From FDT dump:
206+
// memreserve = <0x3b400000 0x04c00000 >;
207+
204208
// Iterate compatible nodes (example):
205209
// for entry in device_tree.compatible_nodes("arm,pl011") {
206210
// println!("reserved: {:?} (bytes at ?)", entry.name()/*, entry.address*/);
207211
// }
208212

209-
// Also, remove the DTB memory region + index
213+
// 6. Also, remove the DTB memory region + index
210214
println!(
211215
"DTB region: {} bytes at {:x}",
212216
device_tree.fdt().totalsize(),

0 commit comments

Comments
 (0)