From b431a6f3eb470edfe3b52eb7b980f97e0a587950 Mon Sep 17 00:00:00 2001 From: Zane Shelley Date: Tue, 30 May 2017 16:47:28 -0500 Subject: [PATCH] fixed compilation errors when ENABLE_CHECKSTOP_ANALYSIS is enabled Change-Id: Ic77f03ca0b4c221eef37581e6791ab8b4398af74 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41180 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Reviewed-by: Prachi Gupta Tested-by: FSP CI Jenkins Reviewed-by: William G. Hoffa Reviewed-by: Caleb N. Palmer Reviewed-by: Daniel M. Crowell --- src/build/buildpnor/defaultPnorLayout.xml | 10 +++++++++- src/build/buildpnor/pnorLayoutFSP.xml | 8 ++++++++ src/build/configs/fsprelease.config | 4 ++++ src/build/mkrules/hbfw/img/makefile | 11 ++++++----- src/usr/diag/HBconfig | 2 +- src/usr/diag/prdf/framework/prdfFileRegisterAccess.C | 6 +++--- src/usr/diag/prdf/framework/prdfFileRegisterAccess.H | 4 ++-- src/usr/isteps/istep06/host_gard.C | 3 --- .../isteps/istep16/call_host_activate_slave_cores.C | 8 ++++++-- src/usr/isteps/pm/pm_common.C | 8 +++----- 10 files changed, 42 insertions(+), 22 deletions(-) diff --git a/src/build/buildpnor/defaultPnorLayout.xml b/src/build/buildpnor/defaultPnorLayout.xml index 4cb289d3420..3ed40176fa3 100644 --- a/src/build/buildpnor/defaultPnorLayout.xml +++ b/src/build/buildpnor/defaultPnorLayout.xml @@ -251,7 +251,7 @@ Layout Description sideless -
+
OCC Lid (1.125M) OCC 0x2AD4000 @@ -271,4 +271,12 @@ Layout Description
+
+ FIRDATA (12K) + FIRDATA + 0x2EF4000 + 0x3000 + sideless + +
diff --git a/src/build/buildpnor/pnorLayoutFSP.xml b/src/build/buildpnor/pnorLayoutFSP.xml index 67fb220ef45..8aa52bdadde 100644 --- a/src/build/buildpnor/pnorLayoutFSP.xml +++ b/src/build/buildpnor/pnorLayoutFSP.xml @@ -259,4 +259,12 @@ Layout Description - Used when building an FSP driver sideless
+
+ FIRDATA (12K) + FIRDATA + 0x2EF4000 + 0x3000 + sideless + +
diff --git a/src/build/configs/fsprelease.config b/src/build/configs/fsprelease.config index 0d204efd332..513799a3e03 100644 --- a/src/build/configs/fsprelease.config +++ b/src/build/configs/fsprelease.config @@ -11,3 +11,7 @@ set START_OCC_DURING_BOOT unset NO_SBE_UPDATES unset BMC_BT_LPC_IPMI unset HTMGT + +# OpenPower checkstop analysis +unset ENABLE_CHECKSTOP_ANALYSIS + diff --git a/src/build/mkrules/hbfw/img/makefile b/src/build/mkrules/hbfw/img/makefile index 5050ac32e7c..a477aaee719 100755 --- a/src/build/mkrules/hbfw/img/makefile +++ b/src/build/mkrules/hbfw/img/makefile @@ -88,12 +88,13 @@ PAYLOAD_FINAL_IMG = PAYLOAD.bin RINGOVD_FINAL_IMG = RINGOVD.bin SBKT_FINAL_IMG = SBKT.bin WOFDATA_FINAL_IMG = WOFDATA.bin +FIRDATA_FINAL_IMG = FIRDATA.bin FINAL_OUTPUT_IMAGES = ${HBBL_FINAL_IMG} ${HBB_FINAL_IMG} ${HBI_FINAL_IMG} \ ${HBRT_FINAL_IMG} ${TEST_FINAL_IMG} ${TESTRO_FINAL_IMG} \ ${HBEL_FINAL_IMG} ${GUARD_FINAL_IMG} ${GLOBAL_FINAL_IMG} \ ${DJVPD_FINAL_IMG} ${MVPD_FINAL_IMG} ${CVPD_FINAL_IMG} \ ${PAYLOAD_FINAL_IMG} ${RINGOVD_FINAL_IMG} ${SBKT_FINAL_IMG} \ - ${WOFDATA_FINAL_IMG} + ${WOFDATA_FINAL_IMG} ${FIRDATA_FINAL_IMG} # Aggregate ALL_DEFAULT_IMAGES = ${DEFAULT_INPUT_IMAGES} ${FINAL_OUTPUT_IMAGES} @@ -119,7 +120,7 @@ PNOR_LAYOUT = ${pnorLayoutFSP.xml:P} # Decide which PNOR to build .if(${FAKEPNOR} == "") # Parameters passed into GEN_PNOR_IMAGE_SCRIPT. - GEN_DEFAULT_BIN_FILES = HBBL=${HBBL_IMG},HBB=${HBB_IMG},HBI=${HBI_IMG},HBRT=${HBRT_IMG},TEST=EMPTY,TESTRO=EMPTY,HBEL=EMPTY,GUARD=EMPTY,GLOBAL=EMPTY,PAYLOAD=EMPTY,CVPD=EMPTY,MVPD=EMPTY,DJVPD=EMPTY,RINGOVD=EMPTY,SBKT=EMPTY,WOFDATA=EMPTY + GEN_DEFAULT_BIN_FILES = HBBL=${HBBL_IMG},HBB=${HBB_IMG},HBI=${HBI_IMG},HBRT=${HBRT_IMG},TEST=EMPTY,TESTRO=EMPTY,HBEL=EMPTY,GUARD=EMPTY,GLOBAL=EMPTY,PAYLOAD=EMPTY,CVPD=EMPTY,MVPD=EMPTY,DJVPD=EMPTY,RINGOVD=EMPTY,SBKT=EMPTY,WOFDATA=EMPTY,FIRDATA=EMPTY DEFAULT_PARAMS = --build-all --emit-eccless ${TARGET_TEST:b--test} ${HB_STANDALONE:b--hb-standalone} \ ${CONFIG_SECUREBOOT:b--secureboot} --systemBinFiles ${GEN_DEFAULT_BIN_FILES} \ --pnorLayout ${PNOR_LAYOUT} ${KEY_TRANSITION_PARAMS} ${CORRUPT_PARAMS} \ @@ -127,7 +128,7 @@ PNOR_LAYOUT = ${pnorLayoutFSP.xml:P} .else PNOR_LAYOUT = ${pnorLayoutFake.xml:P} # Parameters passed into GEN_PNOR_IMAGE_SCRIPT. - GEN_DEFAULT_BIN_FILES = HBI=${HBI_IMG},HBEL=EMPTY,MVPD=${${VPO_FAKE_MVPD}:P},DJVPD=${${VPO_FAKE_DJVPD}:P} + GEN_DEFAULT_BIN_FILES = HBI=${HBI_IMG},HBEL=EMPTY,MVPD=${${VPO_FAKE_MVPD}:P},DJVPD=${${VPO_FAKE_DJVPD}:P},FIRDATA=EMPTY DEFAULT_PARAMS = --systemBinFiles ${GEN_DEFAULT_BIN_FILES} --pnorLayout ${PNOR_LAYOUT} .endif @@ -280,7 +281,7 @@ gen_system_specific_images_bypass_cache : gen_system_specific_images: build_sbe_partitions .PMAKE @${MAKE:T:R} gen_system_specific_images_bypass_cache -HOSTBOOT_DEFAULT_SECTIONS = HBBL=${HBBL_FINAL_IMG},HBB=${HBB_FINAL_IMG},HBI=${HBI_FINAL_IMG},HBRT=${HBRT_FINAL_IMG},TEST=${TEST_FINAL_IMG},TESTRO=${TESTRO_FINAL_IMG},HBEL=${HBEL_FINAL_IMG},GUARD=${GUARD_FINAL_IMG},GLOBAL=${GLOBAL_FINAL_IMG},PAYLOAD=${PAYLOAD_FINAL_IMG},CVPD=${CVPD_FINAL_IMG},MVPD=${MVPD_FINAL_IMG},DJVPD=${DJVPD_FINAL_IMG},RINGOVD=${RINGOVD_FINAL_IMG},SBKT=${SBKT_FINAL_IMG},WOFDATA=${WOFDATA_FINAL_IMG} +HOSTBOOT_DEFAULT_SECTIONS = HBBL=${HBBL_FINAL_IMG},HBB=${HBB_FINAL_IMG},HBI=${HBI_FINAL_IMG},HBRT=${HBRT_FINAL_IMG},TEST=${TEST_FINAL_IMG},TESTRO=${TESTRO_FINAL_IMG},HBEL=${HBEL_FINAL_IMG},GUARD=${GUARD_FINAL_IMG},GLOBAL=${GLOBAL_FINAL_IMG},PAYLOAD=${PAYLOAD_FINAL_IMG},CVPD=${CVPD_FINAL_IMG},MVPD=${MVPD_FINAL_IMG},DJVPD=${DJVPD_FINAL_IMG},RINGOVD=${RINGOVD_FINAL_IMG},SBKT=${SBKT_FINAL_IMG},WOFDATA=${WOFDATA_FINAL_IMG},FIRDATA=${FIRDATA_FINAL_IMG} #@TODO RTC:163810 - Put SBEC back "SBEC=${SBEC_FINAL_IMG}," .if(${DEFAULT_PNOR} == 1) NIMBUS_SECT = HBD=${NIMBUS_HBD_FINAL_IMG},SBE=${NIMBUS_SBE_FINAL_IMG},HCODE=${NIMBUS_HCODE_FINAL_IMG},OCC=${NIMBUS_OCC_FINAL_IMG} @@ -298,7 +299,7 @@ PNOR_IMG_INFO = \ # Note: If FAKEPNOR defined, ONLY a FAKEPNOR will be generated, this is due to # some limitations of GEN_PNOR_IMAGE_SCRIPT at the time of porting to p9 .if(${FAKEPNOR} != "") - HOSTBOOT_DEFAULT_SECTIONS = HBI=${HBI_FINAL_IMG},HBEL=${HBEL_FINAL_IMG},MVPD=${MVPD_FINAL_IMG},DJVPD=${DJVPD_FINAL_IMG},CVPD=${VPO_FAKE_DVPD} + HOSTBOOT_DEFAULT_SECTIONS = HBI=${HBI_FINAL_IMG},HBEL=${HBEL_FINAL_IMG},MVPD=${MVPD_FINAL_IMG},DJVPD=${DJVPD_FINAL_IMG},CVPD=${VPO_FAKE_DVPD},FIRDATA=${FIRDATA_FINAL_IMG} NIMBUS_SECT = HBD=${NIMBUS_HBD_FINAL_IMG},HCODE=${NIMBUS_HCODE_FINAL_IMG} PNOR_IMG_INFO = \ ${FAKEPNOR}:${PNOR_LAYOUT}:${NIMBUS_SECT},${HOSTBOOT_DEFAULT_SECTIONS} \ diff --git a/src/usr/diag/HBconfig b/src/usr/diag/HBconfig index 3bf6f2a9893..3c46d6e0265 100644 --- a/src/usr/diag/HBconfig +++ b/src/usr/diag/HBconfig @@ -4,7 +4,7 @@ config HBRT_PRD Enable HBRT PRD. config ENABLE_CHECKSTOP_ANALYSIS - default n + default y help Enable collection of FIR data by OCC for checkstops and post-checkstop analysis by PRD on system reboot diff --git a/src/usr/diag/prdf/framework/prdfFileRegisterAccess.C b/src/usr/diag/prdf/framework/prdfFileRegisterAccess.C index a7a89b4cf14..dfdaabf9c6d 100755 --- a/src/usr/diag/prdf/framework/prdfFileRegisterAccess.C +++ b/src/usr/diag/prdf/framework/prdfFileRegisterAccess.C @@ -33,7 +33,7 @@ using namespace TARGETING; namespace PRDF { -errlHndl_t FileScomAccessor::Access( +uint32_t FileScomAccessor::Access( TargetHandle_t i_target, BitString & bs, uint64_t registerId, @@ -41,7 +41,7 @@ errlHndl_t FileScomAccessor::Access( { #define PRDF_FUNC "[FileScomAccessor::Access()] " - errlHndl_t errlH = NULL; + uint32_t rc = SUCCESS; PnorFirDataReader & firData = PnorFirDataReader::getPnorFirDataReader(); uint64_t data = 0; @@ -64,7 +64,7 @@ errlHndl_t FileScomAccessor::Access( PRDF_ERR(PRDF_FUNC "Wrong Operation:%u", operation); } - return errlH; + return rc; #undef PRDF_FUNC } diff --git a/src/usr/diag/prdf/framework/prdfFileRegisterAccess.H b/src/usr/diag/prdf/framework/prdfFileRegisterAccess.H index 256d3ac4dd3..61d255e8a49 100755 --- a/src/usr/diag/prdf/framework/prdfFileRegisterAccess.H +++ b/src/usr/diag/prdf/framework/prdfFileRegisterAccess.H @@ -65,10 +65,10 @@ class FileScomAccessor : public ScomAccessor * @param BitString - holds data read or to write * @param register address * @param [READ|WRITE] - * @returns NULL if success, valid error handle otherwise + * @returns SUCCESS or PRD_SCANCOM_FAILURE * @pre bs.Length() must be size of register data to read/write */ - virtual errlHndl_t Access(TARGETING::TargetHandle_t i_target, + virtual uint32_t Access(TARGETING::TargetHandle_t i_target, BitString & bs, uint64_t registerId, MopRegisterAccess::Operation operation) const; diff --git a/src/usr/isteps/istep06/host_gard.C b/src/usr/isteps/istep06/host_gard.C index f8dc30f1b30..7bbaa7d6479 100644 --- a/src/usr/isteps/istep06/host_gard.C +++ b/src/usr/isteps/istep06/host_gard.C @@ -58,9 +58,6 @@ #endif #ifdef CONFIG_ENABLE_CHECKSTOP_ANALYSIS - #include - #include - #include #endif diff --git a/src/usr/isteps/istep16/call_host_activate_slave_cores.C b/src/usr/isteps/istep16/call_host_activate_slave_cores.C index 7cb56d5367b..87e925b5385 100644 --- a/src/usr/isteps/istep16/call_host_activate_slave_cores.C +++ b/src/usr/isteps/istep16/call_host_activate_slave_cores.C @@ -45,6 +45,10 @@ #include #include +#ifdef CONFIG_IPLTIME_CHECKSTOP_ANALYSIS + #include +#endif + using namespace ERRORLOG; using namespace TARGETING; using namespace ISTEP; @@ -132,7 +136,7 @@ void* call_host_activate_slave_cores (void *io_pArgs) fapi2::toString( l_fapi2ProcTarget, l_targName, sizeof(l_targName) ); - + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "Call p9_dump_stop_info on processor %s", l_targName ); @@ -229,7 +233,7 @@ void* call_host_activate_slave_cores (void *io_pArgs) } // @@@@@ END CUSTOM BLOCK: @@@@@ -#ifdef CONFIG_ENABLE_CHECKSTOP_ANALYSIS +#ifdef CONFIG_IPLTIME_CHECKSTOP_ANALYSIS if( l_stepError.isNull() ) { // update firdata inputs for OCC diff --git a/src/usr/isteps/pm/pm_common.C b/src/usr/isteps/pm/pm_common.C index 5b0c9372de7..8a2346e1e22 100644 --- a/src/usr/isteps/pm/pm_common.C +++ b/src/usr/isteps/pm/pm_common.C @@ -193,12 +193,10 @@ namespace HBPM { l_config_data->firMaster = IS_FIR_MASTER; - // TODO: RTC 124683 The ability to write the HOMER data - // is currently not available at runtime. -#ifndef __HOSTBOOT_RUNTIME + #if !defined(__HOSTBOOT_RUNTIME) || defined(CONFIG_HBRT_PRD) l_errl = PRDF::writeHomerFirData( l_config_data->firdataConfig, - sizeof(config_data->firdataConfig) ); -#endif + sizeof(l_config_data->firdataConfig) ); + #endif } else