aboutsummaryrefslogtreecommitdiff
path: root/libpore/p9_stop_util.C
diff options
context:
space:
mode:
authorPrem Shanker Jha <premjha2@in.ibm.com>2018-07-11 18:12:28 +0530
committerStewart Smith <stewart@linux.ibm.com>2018-07-19 17:53:37 +1000
commit1a4aa1cb03498de236989ab8be797f0e84011fd8 (patch)
tree38d9940587911f5efe0fe7bfad321532358bb5ff /libpore/p9_stop_util.C
parent68518e542e6f7adfe4e97ac22024970ac2400872 (diff)
downloadskiboot-1a4aa1cb03498de236989ab8be797f0e84011fd8.zip
skiboot-1a4aa1cb03498de236989ab8be797f0e84011fd8.tar.gz
skiboot-1a4aa1cb03498de236989ab8be797f0e84011fd8.tar.bz2
STOP API: API conditionally supports 255 SCOM restore entries for each quad.
This is first of the series of commits intended for incorporating new mechanisms for SCOM restore. STOP API looks for a specific version in QPMR header of HOMER. If version is greater than 2, it allows - 255 SCOM Restore entries per quad - doesn't divide quad restore region in to L2, L3 and EQ sub-region If version is less than or equal to 2, API provideis legacy functionality. Key_Cronus_Test=PM_REGRESS RTC: 188827 Change-Id: Iac6ee94619302f745fee0c77acc168eaba04c3da Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/56385 Tested-by: Cronus HW CI <cronushw-ci+hostboot@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Gregory S. Still <stillgs@us.ibm.com> Reviewed-by: AMIT J. TENDOLKAR <amit.tendolkar@in.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/56390 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: Christian R. Geddes <crgeddes@us.ibm.com> [stewart: Assume 15 entries if 0 are reported, maintains compat with old f/w] Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'libpore/p9_stop_util.C')
-rw-r--r--libpore/p9_stop_util.C19
1 files changed, 12 insertions, 7 deletions
diff --git a/libpore/p9_stop_util.C b/libpore/p9_stop_util.C
index c351b58..979455a 100644
--- a/libpore/p9_stop_util.C
+++ b/libpore/p9_stop_util.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015,2017 */
+/* Contributors Listed Below - COPYRIGHT 2015,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -32,6 +32,9 @@
// *HWP Team : PM
// *HWP Level : 2
// *HWP Consumed by : HB:HYP
+#ifdef PPC_HYP
+ #include <HvPlicModule.H>
+#endif
#include "p9_stop_api.H"
#include "p9_stop_util.H"
@@ -42,22 +45,24 @@ namespace stopImageSection
{
#endif
+//-----------------------------------------------------------------------
+
/**
* @brief Returns proc chip's fuse mode status.
* @param i_pImage points to start of chip's HOMER image.
* @param o_fusedMode points to fuse mode information.
* @return STOP_SAVE_SUCCESS if functions succeeds, error code otherwise.
*/
-static StopReturnCode_t isFusedMode( void* const i_pImage, bool* o_fusedMode )
+STATIC StopReturnCode_t isFusedMode( void* const i_pImage, bool* o_fusedMode )
{
- uint64_t cpmrCheckWord;
- StopReturnCode_t l_rc = STOP_SAVE_SUCCESS;
+ StopReturnCode_t l_rc = STOP_SAVE_SUCCESS;
+ uint64_t cpmrCheckWord = 0;
*o_fusedMode = false;
do
{
- HomerSection_t* pHomerDesc = ( HomerSection_t* ) i_pImage;
- HomerImgDesc_t* pHomer = (HomerImgDesc_t*)( pHomerDesc->interrruptHandler );
+ HomerSection_t* pHomerDesc = ( HomerSection_t* ) i_pImage;
+ HomerImgDesc_t* pHomer = (HomerImgDesc_t*)( pHomerDesc->interrruptHandler );
if( !i_pImage )
{
@@ -90,7 +95,7 @@ static StopReturnCode_t isFusedMode( void* const i_pImage, bool* o_fusedMode )
}
MY_ERR("Unexpected value 0x%08x for fused mode. Bad or corrupt "
- "HOMER location", pHomer->fuseModeStatus );
+ "HOMER location", pHomer->fusedModeStatus );
l_rc = STOP_SAVE_INVALID_FUSED_CORE_STATUS ;
}