aboutsummaryrefslogtreecommitdiff
path: root/hw/fsp/fsp-console.c
diff options
context:
space:
mode:
authorOliver O'Halloran <oohall@gmail.com>2016-12-21 15:52:30 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-01-04 17:15:57 +1100
commitf332fb40baa5da03ee7db4deaa1eb589f21272f0 (patch)
treec337dec7aa71590122c6f5abe2f1e51a157e7bee /hw/fsp/fsp-console.c
parent6f7bd78463e051dad239b349caf5dd641e2a4dd7 (diff)
downloadskiboot-f332fb40baa5da03ee7db4deaa1eb589f21272f0.zip
skiboot-f332fb40baa5da03ee7db4deaa1eb589f21272f0.tar.gz
skiboot-f332fb40baa5da03ee7db4deaa1eb589f21272f0.tar.bz2
console: use opal_con_ops API
Adds a new structure that contains the implementations of the various OPAL console handlers. This is intended to replace the existing ad-hoc mechanism where the OPAL call handlers are overwritten in the OPAL console driver's init function. Currently this just moves the site where the OPAL call handlers are overwritten to inside of console.c, but it is intended to give us a mechanism for implementing features such as pointer validation for the OPAL console calls without having to manually update each driver. This also helps to clarify differences between the internal (skiboot) console and the external (OPAL) console. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/fsp/fsp-console.c')
-rw-r--r--hw/fsp/fsp-console.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/hw/fsp/fsp-console.c b/hw/fsp/fsp-console.c
index 8589e8c..6683679 100644
--- a/hw/fsp/fsp-console.c
+++ b/hw/fsp/fsp-console.c
@@ -384,7 +384,7 @@ static void fsp_close_vserial(struct fsp_msg *msg)
set_console(NULL);
}
#endif
-
+
lock(&fsp_con_lock);
if (fs->open) {
fs->open = false;
@@ -783,11 +783,6 @@ void fsp_console_init(void)
if (!fsp_present())
return;
- opal_register(OPAL_CONSOLE_READ, fsp_console_read, 3);
- opal_register(OPAL_CONSOLE_WRITE_BUFFER_SPACE,
- fsp_console_write_buffer_space, 2);
- opal_register(OPAL_CONSOLE_WRITE, fsp_console_write, 3);
-
/* Wait until we got the intf query before moving on */
while (!got_intf_query)
opal_run_pollers();
@@ -816,6 +811,8 @@ 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)