Skip to content

Commit c93fdde

Browse files
committed
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>
1 parent 5916e97 commit c93fdde

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

src/usr/scom/scom.C

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,27 @@ errlHndl_t checkIndirectAndDoScom(DeviceFW::OperationType i_opType,
173173
errlHndl_t l_err = NULL;
174174

175175
do {
176-
// In HOSTBOOT_RUNTIME we always defer indirect scoms to Sapphire.
177-
#ifndef __HOSTBOOT_RUNTIME
176+
// Do we need to do the indirect logic or not?
177+
bool l_runIndirectLogic = true;
178+
178179
// If the indirect scom bit is 0, then doing a regular scom
179180
if( (i_addr & 0x8000000000000000) == 0)
180181
{
182+
l_runIndirectLogic = false;
183+
}
184+
185+
// In HOSTBOOT_RUNTIME we always defer indirect scoms to
186+
// Sapphire, but PHYP wants us to do it ourselves
187+
#ifdef __HOSTBOOT_RUNTIME
188+
if( TARGETING::is_sapphire_load() )
189+
{
190+
l_runIndirectLogic = false;
191+
}
181192
#endif // __HOSTBOOT_RUNTIME
193+
194+
// Not indirect (or skipping that) so just do regular scom
195+
if( l_runIndirectLogic == false )
196+
{
182197
l_err = doScomOp(i_opType,
183198
i_target,
184199
io_buffer,
@@ -187,8 +202,11 @@ errlHndl_t checkIndirectAndDoScom(DeviceFW::OperationType i_opType,
187202
i_addr);
188203
//all done
189204
break;
190-
#ifndef __HOSTBOOT_RUNTIME
191205
}
206+
207+
//----------------------------------------------
208+
//--- Below here is the indirect scom logic ---
209+
192210
uint64_t l_io_buffer = 0;
193211
uint64_t temp_scomAddr = 0;
194212
uint8_t form = 0;
@@ -263,7 +281,6 @@ errlHndl_t checkIndirectAndDoScom(DeviceFW::OperationType i_opType,
263281
break;
264282
}
265283

266-
#endif // __HOSTBOOT_RUNTIME
267284
} while(0);
268285

269286
return l_err;

0 commit comments

Comments
 (0)