summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/procedures/hwp/accessors
diff options
context:
space:
mode:
authorClaus Michael Olsen <cmolsen@us.ibm.com>2016-09-29 02:44:19 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2016-09-29 23:25:39 -0400
commit6eabda34fa0adfe714f1e11090383e59ef7516ce (patch)
treec19935bccad6d55e81be456792f5a8f215ac8683 /src/import/chips/p9/procedures/hwp/accessors
parent74a70a51b6f1a14ca45aa89a8639e741de23a948 (diff)
downloadtalos-hostboot-6eabda34fa0adfe714f1e11090383e59ef7516ce.tar.gz
talos-hostboot-6eabda34fa0adfe714f1e11090383e59ef7516ce.zip
Support for EX VPD instance rings.
Change-Id: I43090f95b6ee2729549d962c1af6827d59b4277c Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/30458 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Dev-Ready: Matt K. Light <mklight@us.ibm.com> Reviewed-by: RANGANATHPRASAD G. BRAHMASAMUDRA <prasadbgr@in.ibm.com> Reviewed-by: Martin Gloff <mgloff@us.ibm.com> Reviewed-by: Benjamin Gass <bgass@us.ibm.com> Reviewed-by: Joseph J. McGill <jmcgill@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/30461 Reviewed-by: Hostboot Team <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/chips/p9/procedures/hwp/accessors')
-rw-r--r--src/import/chips/p9/procedures/hwp/accessors/p9_get_mvpd_ring.C27
-rw-r--r--src/import/chips/p9/procedures/hwp/accessors/p9_get_mvpd_ring.H15
-rw-r--r--src/import/chips/p9/procedures/hwp/accessors/p9_mvpd_ring_funcs.C76
-rw-r--r--src/import/chips/p9/procedures/hwp/accessors/p9_mvpd_ring_funcs.H34
4 files changed, 94 insertions, 58 deletions
diff --git a/src/import/chips/p9/procedures/hwp/accessors/p9_get_mvpd_ring.C b/src/import/chips/p9/procedures/hwp/accessors/p9_get_mvpd_ring.C
index b7b77ec8a..72f63f030 100644
--- a/src/import/chips/p9/procedures/hwp/accessors/p9_get_mvpd_ring.C
+++ b/src/import/chips/p9/procedures/hwp/accessors/p9_get_mvpd_ring.C
@@ -42,32 +42,35 @@ extern "C"
{
using namespace fapi2;
-// getMvpdRing: Wrapper to call common function mvpdRingFunc
+ // getMvpdRing: Wrapper to call common function mvpdRingFunc
fapi2::ReturnCode getMvpdRing( fapi2::MvpdRecord i_record,
fapi2::MvpdKeyword i_keyword,
const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>
& i_fapiTarget,
const uint8_t i_chipletId,
+ const uint64_t i_evenOddMask,
const uint8_t i_ringId,
- uint8_t* i_pRingBuf,
- uint32_t& io_rRingBufsize)
+ uint8_t* i_pRingBuf,
+ uint32_t& io_rRingBufsize )
{
fapi2::ReturnCode l_fapirc;
- FAPI_DBG("getMvpdRing: entry ringId=0x%x, chipletId=0x%x, size=0x%x ",
+ FAPI_DBG("getMvpdRing: Called w/ringId=0x%x, chipletId=0x%x, evenOddMask=0x%016llx, size=0x%x",
i_ringId,
i_chipletId,
+ i_evenOddMask,
io_rRingBufsize );
// common get and set processing
- l_fapirc = mvpdRingFunc(MVPD_RING_GET,
- i_record,
- i_keyword,
- i_fapiTarget,
- i_chipletId,
- i_ringId,
- i_pRingBuf,
- io_rRingBufsize);
+ l_fapirc = mvpdRingFunc( MVPD_RING_GET,
+ i_record,
+ i_keyword,
+ i_fapiTarget,
+ i_chipletId,
+ i_evenOddMask,
+ i_ringId,
+ i_pRingBuf,
+ io_rRingBufsize );
FAPI_DBG("getMvpdRing: exit rc=0x%x",
diff --git a/src/import/chips/p9/procedures/hwp/accessors/p9_get_mvpd_ring.H b/src/import/chips/p9/procedures/hwp/accessors/p9_get_mvpd_ring.H
index c0ad0ab9a..622c11687 100644
--- a/src/import/chips/p9/procedures/hwp/accessors/p9_get_mvpd_ring.H
+++ b/src/import/chips/p9/procedures/hwp/accessors/p9_get_mvpd_ring.H
@@ -39,10 +39,15 @@ namespace fapi2
{
// function pointer typedef definition for HWP call support
-typedef ReturnCode (*getMvpdRing_FP_t)
-(MvpdRecord, MvpdKeyword,
- const Target<TARGET_TYPE_PROC_CHIP>&,
- const uint8_t, const uint8_t, uint8_t*, uint32_t&);
+typedef ReturnCode (*getMvpdRing_FP_t) (
+ MvpdRecord,
+ MvpdKeyword,
+ const Target<TARGET_TYPE_PROC_CHIP>&,
+ const uint8_t,
+ const uint64_t,
+ const uint8_t,
+ uint8_t*,
+ uint32_t& );
extern "C"
{
@@ -60,6 +65,7 @@ extern "C"
* MVPD_RECORD_CP00 - MVPD_KEYWORD_PDG
* @param i_fapiTarget - cpu target
* @param i_chipletId - Chiplet ID
+ * @param i_evenOddMask - Mask to choose even or odd EX. O for all other chiplets
* @param i_ringId - Ring ID
* @param i_pRingBuf - pointer to a buffer allocated by the caller
* to receive the ring header and data.
@@ -91,6 +97,7 @@ extern "C"
const Target<TARGET_TYPE_PROC_CHIP>&
i_fapiTarget,
const uint8_t i_chipletId,
+ const uint64_t i_evenOddMask,
const uint8_t i_ringId,
uint8_t* io_pRingBuf,
uint32_t& io_rRingBufsize );
diff --git a/src/import/chips/p9/procedures/hwp/accessors/p9_mvpd_ring_funcs.C b/src/import/chips/p9/procedures/hwp/accessors/p9_mvpd_ring_funcs.C
index db02498ec..939ce2619 100644
--- a/src/import/chips/p9/procedures/hwp/accessors/p9_mvpd_ring_funcs.C
+++ b/src/import/chips/p9/procedures/hwp/accessors/p9_mvpd_ring_funcs.C
@@ -59,6 +59,7 @@ extern "C"
fapi2::MvpdRecord i_record,
fapi2::MvpdKeyword i_keyword,
const uint8_t i_chipletId,
+ const uint64_t i_evenOddMask,
const uint8_t i_ringId,
uint8_t* i_pRecordBuf,
uint32_t i_recordBufLenfapi,
@@ -163,6 +164,9 @@ extern "C"
* @param[in] i_chipletId
* Chiplet ID for the op
*
+ * @param[in] i_evenOddMask
+ * Mask to choose even or odd EX. O for all other chiplets
+ *
* @param[in] i_ringId
* Ring ID for the op
*
@@ -176,15 +180,16 @@ extern "C"
*
* @return fapi2::ReturnCode
*/
- fapi2::ReturnCode mvpdRingFunc(const mvpdRingFuncOp i_mvpdRingFuncOp,
- fapi2::MvpdRecord i_record,
- fapi2::MvpdKeyword i_keyword,
- const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>
- & i_fapiTarget,
- const uint8_t i_chipletId,
- const uint8_t i_ringId,
- uint8_t* i_pRingBuf,
- uint32_t& io_rRingBufsize)
+ fapi2::ReturnCode mvpdRingFunc( const mvpdRingFuncOp i_mvpdRingFuncOp,
+ fapi2::MvpdRecord i_record,
+ fapi2::MvpdKeyword i_keyword,
+ const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>
+ & i_fapiTarget,
+ const uint8_t i_chipletId,
+ const uint64_t i_evenOddMask,
+ const uint8_t i_ringId,
+ uint8_t* i_pRingBuf,
+ uint32_t& io_rRingBufsize )
{
fapi2::ReturnCode l_fapirc = fapi2::FAPI2_RC_SUCCESS;
uint32_t l_recordLen = 0;
@@ -192,11 +197,12 @@ extern "C"
uint8_t* l_pRing = NULL;
uint32_t l_ringLen = 0;
- FAPI_DBG("mvpdRingFunc:entry op=0x%x ringId=0x%x chipletId=0x%x "
- "size=0x%x",
+ FAPI_DBG("mvpdRingFunc: Called w/op=0x%x, ringId=0x%x, chipletId=0x%x, "
+ "evenOddMask=0x%016llx, size=0x%x",
i_mvpdRingFuncOp,
i_ringId,
i_chipletId,
+ i_evenOddMask,
io_rRingBufsize );
// do common get and set input parameter error checks
@@ -256,8 +262,9 @@ extern "C"
l_recordBuf,
l_recordLen ),
"mvpdRingFunc: getMvpdField failed "
- "chipletId=0x%x, ringId=0x%x",
+ "chipletId=0x%x, evenOddMask=0x%016llx, ringId=0x%x",
i_chipletId,
+ i_evenOddMask,
i_ringId);
// find ring in the record. It is an error if not there for a "get".
@@ -267,14 +274,16 @@ extern "C"
i_record,
i_keyword,
i_chipletId,
+ i_evenOddMask,
i_ringId,
l_recordBuf,
l_recordLen,
l_pRing,
l_ringLen),
"mvpdRingFunc: mvpdRingFuncFind failed "
- "chipletId=0x%x, ringId=0x%x",
+ "chipletId=0x%x, evenOddMask=0x%016llx, ringId=0x%x",
i_chipletId,
+ i_evenOddMask,
i_ringId);
// do the get or set specific operations
@@ -306,8 +315,9 @@ extern "C"
i_pRingBuf,
io_rRingBufsize),
"mvpdRingFunc: mvpdRingFuncGet failed "
- "chipletId=0x%x, ringId=0x%x",
+ "chipletId=0x%x, evenOddMask=0x%016llx, ringId=0x%x",
i_chipletId,
+ i_evenOddMask,
i_ringId);
}
else // set operation
@@ -371,6 +381,9 @@ extern "C"
* @param[in] i_chipletId
* Chiplet ID for the op
*
+ * @param[in] i_evenOddMask
+ * Mask to choose even or odd EX. O for all other chiplets
+ *
* @param[in] i_ringId
* Ring ID for the op
*
@@ -391,16 +404,17 @@ extern "C"
*
* @return fapi2::ReturnCode
*/
- fapi2::ReturnCode mvpdRingFuncFind(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>
- & i_fapiTarget,
- fapi2::MvpdRecord i_record,
- fapi2::MvpdKeyword i_keyword,
- const uint8_t i_chipletId,
- const uint8_t i_ringId,
- uint8_t* i_pRecordBuf,
- uint32_t i_recordBufLen,
- uint8_t*& o_rpRing,
- uint32_t& o_rRingLen)
+ fapi2::ReturnCode mvpdRingFuncFind( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>
+ & i_fapiTarget,
+ fapi2::MvpdRecord i_record,
+ fapi2::MvpdKeyword i_keyword,
+ const uint8_t i_chipletId,
+ const uint64_t i_evenOddMask,
+ const uint8_t i_ringId,
+ uint8_t* i_pRecordBuf,
+ uint32_t i_recordBufLen,
+ uint8_t*& o_rpRing,
+ uint32_t& o_rRingLen )
{
fapi2::ReturnCode l_fapirc;
uint8_t* l_pRing = NULL;
@@ -412,9 +426,10 @@ extern "C"
o_rpRing = NULL;
o_rRingLen = 0;
- FAPI_DBG("mvpdRingFuncFind: entry chipletId=0x%x, ringId=0x%x ",
+ FAPI_DBG("mvpdRingFuncFind: Called w/chipletId=0x%x, evenOddMask=0x%016llx, ringId=0x%x ",
i_chipletId,
- i_ringId );
+ i_evenOddMask,
+ i_ringId);
do
{
@@ -483,13 +498,15 @@ extern "C"
be32toh(l_pScanData->iv_size) );
- if ( (l_pScanData->iv_ringId == i_ringId)
- && (l_pScanData->iv_chipletId == i_chipletId) )
+ if ( l_pScanData->iv_ringId == i_ringId &&
+ l_pScanData->iv_chipletId == i_chipletId &&
+ ( i_evenOddMask == 0 || (be64toh(l_pScanData->iv_scanSelect) & i_evenOddMask) ) )
{
FAPI_DBG( "mvpdRingFuncFind: Found it: ringId=0x%x, "
- "chiplet=0x%x, ringlen=0x%x",
+ "chipletId=0x%x, evenOddMask=0x%016llx, ringlen=0x%x",
i_ringId,
i_chipletId,
+ i_evenOddMask,
be32toh(l_pScanData->iv_length) );
// shouldn't happen, but does not all fit
@@ -759,6 +776,7 @@ extern "C"
i_keyword,
0x00,
0x00,
+ 0x00,
i_pRecordBuf,
i_recordLen,
l_pRingEnd, // find start of padding
diff --git a/src/import/chips/p9/procedures/hwp/accessors/p9_mvpd_ring_funcs.H b/src/import/chips/p9/procedures/hwp/accessors/p9_mvpd_ring_funcs.H
index 636c65140..6965d4b1b 100644
--- a/src/import/chips/p9/procedures/hwp/accessors/p9_mvpd_ring_funcs.H
+++ b/src/import/chips/p9/procedures/hwp/accessors/p9_mvpd_ring_funcs.H
@@ -46,10 +46,16 @@ enum mvpdRingFuncOp
MVPD_RING_SET,
};
-typedef ReturnCode (*mvpdRingFuncs_FP_t)
-(mvpdRingFuncOp, MvpdRecord, MvpdKeyword,
- const Target<TARGET_TYPE_PROC_CHIP>&,
- const uint8_t, const uint8_t, uint8_t*, uint32_t&);
+typedef ReturnCode (*mvpdRingFuncs_FP_t) (
+ mvpdRingFuncOp,
+ MvpdRecord,
+ MvpdKeyword,
+ const Target<TARGET_TYPE_PROC_CHIP>&,
+ const uint8_t,
+ const uint64_t,
+ const uint8_t,
+ uint8_t*,
+ uint32_t& );
extern "C"
{
@@ -66,6 +72,7 @@ extern "C"
* @param i_keyword - Keyword enumerator
* @param i_fapiTarget - cpu target
* @param i_chipletId - Chiplet ID
+ * @param i_evenOddMask - Mask to choose even or odd EX. O for all other chiplets
* @param i_ringId - Ring ID
* @param i_pRingBuf - The buffer to receive or send the ring
* @param io_rRingBufsize - Size of ring / ring buffer
@@ -73,15 +80,16 @@ extern "C"
* @return fapi2::ReturnCode - FAPI_RC_SUCCESS if success,
* relevant error code for failure.
*/
- ReturnCode mvpdRingFunc(mvpdRingFuncOp i_mvpdRingFuncOp,
- MvpdRecord i_record,
- MvpdKeyword i_keyword,
- const Target<TARGET_TYPE_PROC_CHIP>&
- i_fapiTarget,
- const uint8_t i_chipletId,
- const uint8_t i_ringId,
- uint8_t* i_pRingBuf,
- uint32_t& io_rRingBufsize);
+ ReturnCode mvpdRingFunc( mvpdRingFuncOp i_mvpdRingFuncOp,
+ MvpdRecord i_record,
+ MvpdKeyword i_keyword,
+ const Target<TARGET_TYPE_PROC_CHIP>&
+ i_fapiTarget,
+ const uint8_t i_chipletId,
+ const uint64_t i_evenOddMask,
+ const uint8_t i_ringId,
+ uint8_t* i_pRingBuf,
+ uint32_t& io_rRingBufsize );
} // extern "C"
} // namespace fapi
OpenPOWER on IntegriCloud