Skip to content

Commit

Permalink
fix(x86_64/phys_mem): don't panic on empty FDT memory map
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
  • Loading branch information
mkroening committed Sep 21, 2024
1 parent 0245c53 commit b3ca333
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/arch/x86_64/mm/physicalmem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,11 @@ fn detect_from_fdt() -> Result<(), ()> {
}
}

assert!(
found_ram,
"Could not find any available RAM in the Devicetree Memory Map"
);

Ok(())
if found_ram {
Ok(())
} else {
Err(())
}
}

fn detect_from_multiboot_info() -> Result<(), ()> {
Expand Down

0 comments on commit b3ca333

Please sign in to comment.