[Skiboot] [PATCH] abort if device tree parsing fails
Anton Blanchard
anton at samba.org
Wed Nov 26 11:11:57 AEDT 2014
I debugged a checkstop with a BML boot which turned out to be device
tree issues. A corrupt device tree is very likely to result in a
later checkstop, so abort in dt_expand to make debugging much easier.
Signed-off-by: Anton Blanchard <anton at samba.org>
---
core/device.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/core/device.c b/core/device.c
index 28cccb7..ffc38f8 100644
--- a/core/device.c
+++ b/core/device.c
@@ -691,7 +691,8 @@ void dt_expand(const void *fdt)
dt_root = dt_new_root("");
- dt_expand_node(dt_root, fdt, 0);
+ if (dt_expand_node(dt_root, fdt, 0) < 0)
+ abort();
}
u64 dt_get_number(const void *pdata, unsigned int cells)
--
2.1.0
More information about the Skiboot
mailing list