[Skiboot] [PATCH 3/3] fsp/console: Always establish OPAL console API backend

Benjamin Herrenschmidt benh at kernel.crashing.org
Fri May 11 16:41:21 AEST 2018


Currently we only call set_opal_console() to establish the backend
used by the OPAL console API if we find at least one FSP serial
port in HDAT.

On systems where there is none (IPMI only), we fail to set it,
causing the console code to try to use the dummy console causing
an assertion failure during boot due to clashing on the device-tree
node names.

So always set it if an FSP is present

Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
---
 hw/fsp/fsp-console.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/hw/fsp/fsp-console.c b/hw/fsp/fsp-console.c
index ece9400e..c6e886f7 100644
--- a/hw/fsp/fsp-console.c
+++ b/hw/fsp/fsp-console.c
@@ -850,6 +850,9 @@ void fsp_console_init(void)
 	/* Register poller */
 	opal_add_poller(fsp_console_poll, NULL);
 
+	/* Register OPAL console backend */
+	set_opal_console(&fsp_opal_con);
+
 	/* Parse serial port data */
 	serials = dt_find_by_path(dt_root, "ipl-params/fsp-serial");
 	if (!serials) {
@@ -869,8 +872,6 @@ void fsp_console_init(void)
 	}
 
 	op_display(OP_LOG, OP_MOD_FSPCON, 0x0005);
-
-	set_opal_console(&fsp_opal_con);
 }
 
 static int64_t fsp_console_flush(int64_t terminal __unused)
-- 
2.17.0



More information about the Skiboot mailing list