summaryrefslogtreecommitdiffstats
path: root/src/usr/scom
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2017-03-14 09:36:57 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-03-29 11:17:15 -0400
commitc93fdde6061cd2b10ccd556f174d095de8341ea2 (patch)
treec25b8f485b7e77e554d8675be2b65eb286eda725 /src/usr/scom
parent5916e97c7d3407f8656549e2c1095d2af610efc1 (diff)
downloadtalos-hostboot-c93fdde6061cd2b10ccd556f174d095de8341ea2.tar.gz
talos-hostboot-c93fdde6061cd2b10ccd556f174d095de8341ea2.zip
Enable indirect scom logic for HBRT under PHYP
PHYP is fine with HBRT handling the indirect scom logic, including the polling events. Change-Id: Ic2994065615a24121eccfaa7f6b78bb5be803319 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/37903 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-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: Matthew A. Ploetz <maploetz@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/scom')
-rw-r--r--src/usr/scom/scom.C25
1 files changed, 21 insertions, 4 deletions
diff --git a/src/usr/scom/scom.C b/src/usr/scom/scom.C
index cca8b45d6..0df0c44b0 100644
--- a/src/usr/scom/scom.C
+++ b/src/usr/scom/scom.C
@@ -173,12 +173,27 @@ errlHndl_t checkIndirectAndDoScom(DeviceFW::OperationType i_opType,
errlHndl_t l_err = NULL;
do {
- // In HOSTBOOT_RUNTIME we always defer indirect scoms to Sapphire.
-#ifndef __HOSTBOOT_RUNTIME
+ // Do we need to do the indirect logic or not?
+ bool l_runIndirectLogic = true;
+
// If the indirect scom bit is 0, then doing a regular scom
if( (i_addr & 0x8000000000000000) == 0)
{
+ l_runIndirectLogic = false;
+ }
+
+ // In HOSTBOOT_RUNTIME we always defer indirect scoms to
+ // Sapphire, but PHYP wants us to do it ourselves
+#ifdef __HOSTBOOT_RUNTIME
+ if( TARGETING::is_sapphire_load() )
+ {
+ l_runIndirectLogic = false;
+ }
#endif // __HOSTBOOT_RUNTIME
+
+ // Not indirect (or skipping that) so just do regular scom
+ if( l_runIndirectLogic == false )
+ {
l_err = doScomOp(i_opType,
i_target,
io_buffer,
@@ -187,8 +202,11 @@ errlHndl_t checkIndirectAndDoScom(DeviceFW::OperationType i_opType,
i_addr);
//all done
break;
-#ifndef __HOSTBOOT_RUNTIME
}
+
+ //----------------------------------------------
+ //--- Below here is the indirect scom logic ---
+
uint64_t l_io_buffer = 0;
uint64_t temp_scomAddr = 0;
uint8_t form = 0;
@@ -263,7 +281,6 @@ errlHndl_t checkIndirectAndDoScom(DeviceFW::OperationType i_opType,
break;
}
-#endif // __HOSTBOOT_RUNTIME
} while(0);
return l_err;
OpenPOWER on IntegriCloud