summaryrefslogtreecommitdiffstats
path: root/src/usr/console
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2018-10-11 09:22:47 -0500
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2018-10-11 17:53:08 -0500
commit627379aeaa27e30d66ebb0aecf218708d465162c (patch)
tree14782327cf978a2f05efdc74339990a8f8fceb37 /src/usr/console
parent30bd2ff53aa13e2d01bf02405f3e6eed3e576454 (diff)
downloadblackbird-hostboot-627379aeaa27e30d66ebb0aecf218708d465162c.tar.gz
blackbird-hostboot-627379aeaa27e30d66ebb0aecf218708d465162c.zip
sio: Add test for availability - LPC error tweak
Some components can continue to operate in the face of the SuperIO controller being unavailable on the LPC bus (specifically, the UART and boot flag processing). Other components require it present (AST-based SFC implementations and the AST mailbox). Components in the latter category can just fail with an errl when they attempt to access the controller, but for those in the former category we add an isAvailable() function in the SIO namespace to sidestep dealing with errors. Specifically, isAvailable() tests for the expected error when the SuperIO controller is disabled, and returns an errlHndl_t if any other error occurs. This way true LPC errors are propagated to the caller to commit as desired. Change-Id: Ib94ceabfd4f4e9c63c114cfe3db3c954dbb6d6e5 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/67315 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: ANDREW R. JEFFERY <andrewrj@au1.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Corey V. Swenson <cswenson@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/usr/console')
-rw-r--r--src/usr/console/ast2400.C13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/usr/console/ast2400.C b/src/usr/console/ast2400.C
index 1990baf49..213ae789e 100644
--- a/src/usr/console/ast2400.C
+++ b/src/usr/console/ast2400.C
@@ -297,6 +297,18 @@ namespace CONSOLE
do
{
+ bool haveSio;
+ l_err = SIO::isAvailable(haveSio);
+ if (l_err) { break; }
+
+ if (!haveSio)
+ {
+ // SIO may have been disabled by the BMC, in which case
+ // assume the UART is already set up.
+ Uart::initialize();
+ break;
+ }
+
// verify the boot flags version from register 0x28
l_err = deviceOp( DeviceFW::READ,
TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL,
@@ -304,6 +316,7 @@ namespace CONSOLE
l_len,
DEVICE_SIO_ADDRESS(SIO::SUART1, 0x28));
if (l_err) { break; }
+
// is it the version we expected?
if( expected_version == this_version )
{
OpenPOWER on IntegriCloud