From 2bfca5775baf9484bc87f92fc2f75147ba6bda70 Mon Sep 17 00:00:00 2001 From: Nathan Whitehorn Date: Tue, 28 Nov 2017 06:31:39 +0000 Subject: 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. --- sys/dev/ofw/openfirm.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sys/dev/ofw') diff --git a/sys/dev/ofw/openfirm.c b/sys/dev/ofw/openfirm.c index 45545ac34647..dc781d42ad8c 100644 --- a/sys/dev/ofw/openfirm.c +++ b/sys/dev/ofw/openfirm.c @@ -201,6 +201,12 @@ OF_install(char *name, int prio) ofw_def_t *ofwp, **ofwpp; static int curr_prio = 0; + /* Allow OF layer to be uninstalled */ + if (name == NULL) { + ofw_def_impl = NULL; + return (FALSE); + } + /* * Try and locate the OFW kobj corresponding to the name. */ -- cgit v1.2.3