summaryrefslogtreecommitdiffstats
path: root/src/usr/initservice
diff options
context:
space:
mode:
authorAndrew Jeffery <andrewrj@au1.ibm.com>2018-10-15 15:35:07 +1030
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-10-15 16:11:08 -0500
commit55ff29accb8313232e5a1a6cf5d7a54681579073 (patch)
treef8c20018033b639d1864df3f7a5d33bb3512977b /src/usr/initservice
parent95165ec1e1116f5675c8410f230ecce95af86c6d (diff)
downloadtalos-hostboot-55ff29accb8313232e5a1a6cf5d7a54681579073.tar.gz
talos-hostboot-55ff29accb8313232e5a1a6cf5d7a54681579073.zip
sio: Add test for availability
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. For the moment *all* errors produced by the SIO::isAvailable() LPC bus access will result in the SIO code assuming the device is absent. We should be more precise about this, but the hardware behaviour seen under hostboot currently prevents us from being more specific. This problem is highlighted by a FIXME block in the implementation of SIO::isAvailable(). Change-Id: Id30a09b48586d2054e0cdae625ee23df68ac2aa3 Signed-off-by: Andrew Jeffery <andrewrj@au1.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/67460 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.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: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/initservice')
-rw-r--r--src/usr/initservice/bootconfig/bootconfig_ast2400.C15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/usr/initservice/bootconfig/bootconfig_ast2400.C b/src/usr/initservice/bootconfig/bootconfig_ast2400.C
index c7e0a3d8b..87caa32a5 100644
--- a/src/usr/initservice/bootconfig/bootconfig_ast2400.C
+++ b/src/usr/initservice/bootconfig/bootconfig_ast2400.C
@@ -212,6 +212,21 @@ errlHndl_t AST2400BootConfig::readAndProcessBootConfig()
size_t l_len = sizeof(uint8_t);
do
{
+ // The BMC may have disabled SIO, in which case we use a default set of
+ // boot flags
+ bool haveSio;
+ l_err = SIO::isAvailable(haveSio);
+ if (l_err)
+ {
+ break;
+ }
+
+ if (!haveSio)
+ {
+ processBootFlagsV1(0);
+ break;
+ }
+
// read the register holding the agreed upon magic
// number to indicate registers have been configured
OpenPOWER on IntegriCloud