diff options
author | Dan Crowell <dcrowell@us.ibm.com> | 2018-10-11 09:22:47 -0500 |
---|---|---|
committer | William G. Hoffa <wghoffa@us.ibm.com> | 2018-10-11 17:53:08 -0500 |
commit | 627379aeaa27e30d66ebb0aecf218708d465162c (patch) | |
tree | 14782327cf978a2f05efdc74339990a8f8fceb37 /src/usr/initservice | |
parent | 30bd2ff53aa13e2d01bf02405f3e6eed3e576454 (diff) | |
download | talos-hostboot-627379aeaa27e30d66ebb0aecf218708d465162c.tar.gz talos-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/initservice')
-rw-r--r-- | src/usr/initservice/bootconfig/bootconfig_ast2400.C | 15 |
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 |