summaryrefslogtreecommitdiffstats
path: root/src/import
diff options
context:
space:
mode:
authorPrem Shanker Jha <premjha2@in.ibm.com>2017-08-01 10:49:39 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-08-05 21:20:57 -0400
commit0cd2d4c3338d6222c271d78088dbf8ba5381d5bd (patch)
tree72a8af06a3eb64aa25101eb9da3ee2762b2ea758 /src/import
parent4ed975bbd55b6a958fb5e18964dd6aae70bf975d (diff)
downloadtalos-hostboot-0cd2d4c3338d6222c271d78088dbf8ba5381d5bd.tar.gz
talos-hostboot-0cd2d4c3338d6222c271d78088dbf8ba5381d5bd.zip
Image Build: Added support for Auxiliary Controls in PGPE Header.
Commit addds support for auxiliary controls invocation time in PGPE Header. Change-Id: I035324d1f1d8daeb1bcaee56eb06bc91156b6422 RTC: 177182 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/44075 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: BRIAN D. VICTOR <brian.d.victor1@ibm.com> Reviewed-by: Gregory S. Still <stillgs@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/44077 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: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/import')
-rw-r--r--src/import/chips/p9/procedures/hwp/lib/p9_hcode_image_defines.H1
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_hcode_image_build.C33
2 files changed, 33 insertions, 1 deletions
diff --git a/src/import/chips/p9/procedures/hwp/lib/p9_hcode_image_defines.H b/src/import/chips/p9/procedures/hwp/lib/p9_hcode_image_defines.H
index be014dc10..ee7f48d33 100644
--- a/src/import/chips/p9/procedures/hwp/lib/p9_hcode_image_defines.H
+++ b/src/import/chips/p9/procedures/hwp/lib/p9_hcode_image_defines.H
@@ -353,6 +353,7 @@ HCD_HDR_UINT32(g_wof_table_addr, 0 ); // SRAM address wher
HCD_HDR_UINT32(g_wof_table_length, 0 ); // WOF Table length in bytes
HCD_HDR_UINT32(g_pgpe_core_throttle_assert_cnt, 0 ); // Core throttle assert count
HCD_HDR_UINT32(g_pgpe_core_throttle_deassert_cnt, 0 ); // Core throttle de-aasert count
+HCD_HDR_UINT32(g_pgpe_aux_controls, 0 ); // Auxiliary Controls
#ifdef __ASSEMBLER__
.endm
#else
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_hcode_image_build.C b/src/import/chips/p9/procedures/hwp/pm/p9_hcode_image_build.C
index 20c65feca..d0e945946 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_hcode_image_build.C
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_hcode_image_build.C
@@ -2008,6 +2008,7 @@ fapi2::ReturnCode updatePgpeHeader( void* const i_pHomer, CONST_FAPI2_PROC& i_pr
FAPI_DBG("WOF Length : 0x%08x", SWIZZLE_4_BYTE(pPgpeHdr->g_wof_table_length));
FAPI_DBG("Core Assert Count : 0x%08x", SWIZZLE_4_BYTE(pPgpeHdr->g_pgpe_core_throttle_assert_cnt));
FAPI_DBG("Core De - Assert Count : 0x%08x", SWIZZLE_4_BYTE(pPgpeHdr->g_pgpe_core_throttle_deassert_cnt));
+ FAPI_DBG("Auxiliary Control : 0x%08x", SWIZZLE_4_BYTE(pPgpeHdr->g_pgpe_aux_controls));
FAPI_DBG("==============================PGPE Image Header End========================================")
@@ -3939,6 +3940,33 @@ fapi_try_exit:
}
//---------------------------------------------------------------------------
+/**
+ * @brief Updates PGPE Image header with Auxiliary Controls.
+ * @param[in] i_pHomer points to HOMER.
+ * @return fapi2 return code
+ */
+fapi2::ReturnCode buildPgpeAux( Homerlayout_t* i_pHomer )
+{
+ FAPI_INF(">> buildPgpeAux");
+ PgpeHeader_t* pPgpeHdr = (PgpeHeader_t*)&i_pHomer->ppmrRegion.pgpeSramImage[PGPE_INT_VECTOR_SIZE];
+ uint8_t l_pgpeAuxFunc = 0;
+ const fapi2::Target<fapi2::TARGET_TYPE_SYSTEM> FAPI_SYSTEM;
+
+ FAPI_TRY( FAPI_ATTR_GET( fapi2::ATTR_AUX_FUNC_INVOCATION_TIME_MS,
+ FAPI_SYSTEM,
+ l_pgpeAuxFunc ),
+ "Error From FAPI_ATTR_GET For Attribute ATTR_AUX_FUNC_INVOCATION_TIME_MS" );
+
+ pPgpeHdr->g_pgpe_aux_controls = (l_pgpeAuxFunc << 24 );
+ pPgpeHdr->g_pgpe_aux_controls = SWIZZLE_4_BYTE(pPgpeHdr->g_pgpe_aux_controls);
+
+fapi_try_exit:
+ FAPI_INF("<< buildPgpeAux");
+ return fapi2::current_err;
+
+}
+
+//---------------------------------------------------------------------------
/**
* @brief customizes the magic words in various HOMER headers.
@@ -4069,7 +4097,7 @@ fapi2::ReturnCode p9_hcode_image_build( CONST_FAPI2_PROC& i_procTgt,
"Failed to build QPMR-SGPE region of HOMER" );
FAPI_TRY( buildSgpeAux( i_procTgt, pChipHomer, l_qpmrHdr ),
- "Failed to build Auxiliary section" );
+ "Failed to build auxiliary section in QPMR" );
FAPI_INF("SGPE built");
@@ -4105,6 +4133,9 @@ fapi2::ReturnCode p9_hcode_image_build( CONST_FAPI2_PROC& i_procTgt,
FAPI_TRY( buildPgpeImage( i_pImageIn, pChipHomer, l_ppmrHdr, i_imgType, l_chipFuncModel ),
"Failed To Copy PGPE region in HOMER" );
+ FAPI_TRY( buildPgpeAux( pChipHomer ),
+ "Failed to build auxiliary function in PPMR" );
+
//Update P State parameter block info in HOMER
FAPI_TRY( buildParameterBlock( pChipHomer, i_procTgt, l_ppmrHdr, i_imgType, i_pBuf1, i_sizeBuf1 ),
"Failed to Add Parameter Block" );
OpenPOWER on IntegriCloud