summaryrefslogtreecommitdiffstats
path: root/src/usr/pnor
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/pnor
parent30bd2ff53aa13e2d01bf02405f3e6eed3e576454 (diff)
downloadtalos-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/pnor')
-rw-r--r--src/usr/pnor/ast_mboxdd.C5
-rw-r--r--src/usr/pnor/sfc_ast2400.C7
-rw-r--r--src/usr/pnor/sfc_ast2500.C5
3 files changed, 16 insertions, 1 deletions
diff --git a/src/usr/pnor/ast_mboxdd.C b/src/usr/pnor/ast_mboxdd.C
index b7504e934..5b6e58300 100644
--- a/src/usr/pnor/ast_mboxdd.C
+++ b/src/usr/pnor/ast_mboxdd.C
@@ -365,6 +365,11 @@ errlHndl_t astMbox::initializeMbox(void)
do
{
+ // The BMC may have disabled SIO access, but there's not much point in
+ // testing whether it's available as there's no alternative action if
+ // it is not. Instead, just try the SIO accesses and bail out with the
+ // errl if they fail.
+
//First disable SIO Mailbox engine to configure it
// 0x30 - Enable/Disable Reg
l_data = SIO::DISABLE_DEVICE;
diff --git a/src/usr/pnor/sfc_ast2400.C b/src/usr/pnor/sfc_ast2400.C
index e8e612efa..aa0e2bb07 100644
--- a/src/usr/pnor/sfc_ast2400.C
+++ b/src/usr/pnor/sfc_ast2400.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2014,2016 */
+/* Contributors Listed Below - COPYRIGHT 2014,2018 */
/* [+] Google Inc. */
/* [+] International Business Machines Corp. */
/* */
@@ -95,6 +95,11 @@ errlHndl_t SfcAST2400::hwInit( )
uint32_t l_lpc_addr;
do
{
+ // The BMC may have disabled SIO access, but there's not much point in
+ // testing whether it's available as there's no alternative action if
+ // it is not. Instead, just try the SIO accesses and bail out with the
+ // errl if they fail.
+
/* Enable device 0x0D*/
uint8_t l_data = SIO::ENABLE_DEVICE;
size_t l_len = sizeof(l_data);
diff --git a/src/usr/pnor/sfc_ast2500.C b/src/usr/pnor/sfc_ast2500.C
index 39465f9b2..9f4d88ae1 100644
--- a/src/usr/pnor/sfc_ast2500.C
+++ b/src/usr/pnor/sfc_ast2500.C
@@ -94,6 +94,11 @@ errlHndl_t SfcAST2500::hwInit( )
uint32_t l_lpc_addr;
do
{
+ // The BMC may have disabled SIO access, but there's not much point in
+ // testing whether it's available as there's no alternative action if
+ // it is not. Instead, just try the SIO accesses and bail out with the
+ // errl if they fail.
+
/* Enable device 0x0D*/
uint8_t l_data = SIO::ENABLE_DEVICE;
size_t l_len = sizeof(l_data);
OpenPOWER on IntegriCloud