mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 23:41:23 +01:00
lib: utils: check if CPU node is enabled
Ignore CPU nodes in FDT that are not enabled. Signed-off-by: Jan Remes <jan.remes@codasip.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
@@ -283,6 +283,9 @@ int fdt_parse_max_hart_id(void *fdt, u32 *max_hartid)
|
||||
if (err)
|
||||
continue;
|
||||
|
||||
if (!fdt_node_is_enabled(fdt, cpu_offset))
|
||||
continue;
|
||||
|
||||
if (hartid > *max_hartid)
|
||||
*max_hartid = hartid;
|
||||
}
|
||||
|
Reference in New Issue
Block a user