summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
diff options
context:
space:
mode:
authorkevans <kevans@FreeBSD.org>2018-03-14 03:45:33 +0000
committerkevans <kevans@FreeBSD.org>2018-03-14 03:45:33 +0000
commit42b16bb95ea99f24f9145c51b9689cc0cbee5e5f (patch)
tree8149b31309a01fdc8280984e667c17bad372a2f7 /sys/powerpc
parente6a4e40b9d0f79c714ddb49d5727bc37c0d5cccf (diff)
downloadFreeBSD-src-42b16bb95ea99f24f9145c51b9689cc0cbee5e5f.zip
FreeBSD-src-42b16bb95ea99f24f9145c51b9689cc0cbee5e5f.tar.gz
MFC r326310: Back out OF module installation in the event of failure.
PS3 firmware gives some ancient FDT version (2) that fails the init check in OFW_FDT. It is still possible to make progress, but not while the OF layer is going crazy.
Diffstat (limited to 'sys/powerpc')
-rw-r--r--sys/powerpc/ofw/ofw_machdep.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/powerpc/ofw/ofw_machdep.c b/sys/powerpc/ofw/ofw_machdep.c
index 089f75e..e5f3bdf 100644
--- a/sys/powerpc/ofw/ofw_machdep.c
+++ b/sys/powerpc/ofw/ofw_machdep.c
@@ -389,6 +389,7 @@ boolean_t
OF_bootstrap()
{
boolean_t status = FALSE;
+ int err = 0;
#ifdef AIM
if (openfirmware_entry != NULL) {
@@ -405,7 +406,7 @@ OF_bootstrap()
if (status != TRUE)
return status;
- OF_init(openfirmware);
+ err = OF_init(openfirmware);
} else
#endif
if (fdt != NULL) {
@@ -414,10 +415,16 @@ OF_bootstrap()
if (status != TRUE)
return status;
- OF_init(fdt);
- OF_interpret("perform-fixup", 0);
+ err = OF_init(fdt);
+ if (err == 0)
+ OF_interpret("perform-fixup", 0);
}
+ if (err != 0) {
+ OF_install(NULL, 0);
+ status = FALSE;
+ }
+
return (status);
}
OpenPOWER on IntegriCloud