File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -194,19 +194,23 @@ pub fn kernel_main(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( ) ,
You can’t perform that action at this time.
0 commit comments