Skip to content

Commit e9f36ad

Browse files
svenpeter42marcan
authored andcommitted
kboot: disable phys nodes as well
Signed-off-by: Sven Peter <[email protected]>
1 parent 28103d9 commit e9f36ad

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/kboot.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -851,6 +851,17 @@ static int dt_disable_missing_devs(const char *adt_prefix, const char *dt_prefix
851851
}
852852
}
853853

854+
int phys_size;
855+
const fdt32_t *phys = fdt_getprop(dt, node, "phys", &phys_size);
856+
if (phys) {
857+
if (phys_size & 7 || phys_size > 4 * 8) {
858+
printf("FDT: bad phys property for /soc/%s\n", name);
859+
} else {
860+
for (int i = 0; i < phys_size / 8; i++)
861+
phandles[phcnt++] = fdt32_ld(&phys[i * 2]);
862+
}
863+
}
864+
854865
const char *status = fdt_getprop(dt, node, "status", NULL);
855866
if (!status || strcmp(status, "disabled")) {
856867
printf("FDT: Disabling missing device /soc/%s\n", name);

0 commit comments

Comments
 (0)