Skip to content

Commit

Permalink
Enable indirect scom logic for HBRT under PHYP
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
dcrowell77 committed Mar 29, 2017
1 parent 5916e97 commit c93fdde
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions src/usr/scom/scom.C
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
Expand Down Expand Up @@ -263,7 +281,6 @@ errlHndl_t checkIndirectAndDoScom(DeviceFW::OperationType i_opType,
break;
}

#endif // __HOSTBOOT_RUNTIME
} while(0);

return l_err;
Expand Down

0 comments on commit c93fdde

Please sign in to comment.