summaryrefslogtreecommitdiffstats
path: root/src/import/chips
diff options
context:
space:
mode:
authorSachin Gupta <sgupta2m@in.ibm.com>2016-12-15 13:49:39 -0500
committerChristian R. Geddes <crgeddes@us.ibm.com>2016-12-19 14:58:43 -0500
commit5dfd2d49d67da0da9e24c3d6550b726412a7b0c9 (patch)
treec6d6053aad28a193d3f4641aceb84427592fab48 /src/import/chips
parente592c081ef64501070ea2964f3d953fc8f30eb29 (diff)
downloadtalos-hostboot-5dfd2d49d67da0da9e24c3d6550b726412a7b0c9.tar.gz
talos-hostboot-5dfd2d49d67da0da9e24c3d6550b726412a7b0c9.zip
Reverting RS4v3 changes
Revert "TOR reduction: Ditching DeltaRingLayout and RingLayout_t" This reverts commit 0ea8cddae37eb5186571e6c66469dad694de9c5a. Revert "Shrinking RS4 header" This reverts commit c1a7c86e800e8bb38f6549b443bb4801feb4f1e3. Change-Id: I7832e23491ea34f86db3cbdc5d25c98e3a9f1821 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/33985 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com> Reviewed-by: Prachi Gupta <pragupta@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/33992 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: Christian R. Geddes <crgeddes@us.ibm.com>
Diffstat (limited to 'src/import/chips')
-rw-r--r--src/import/chips/p9/procedures/hwp/accessors/p9_get_mvpd_ring.C8
-rw-r--r--src/import/chips/p9/procedures/hwp/accessors/p9_get_mvpd_ring.H6
-rw-r--r--src/import/chips/p9/procedures/hwp/accessors/p9_mvpd_ring_funcs.C527
-rw-r--r--src/import/chips/p9/procedures/hwp/accessors/p9_mvpd_ring_funcs.H4
-rw-r--r--src/import/chips/p9/procedures/hwp/accessors/p9_mvpd_ring_funcs.mk1
-rw-r--r--src/import/chips/p9/procedures/hwp/customize/p9_xip_customize.C85
-rw-r--r--src/import/chips/p9/procedures/xml/error_info/p9_mvpd_ring_funcs_errors.xml18
-rw-r--r--src/import/chips/p9/utils/imageProcs/p9_ringId.C644
-rw-r--r--src/import/chips/p9/utils/imageProcs/p9_ringId.H25
-rw-r--r--src/import/chips/p9/utils/imageProcs/p9_scan_compression.C231
-rw-r--r--src/import/chips/p9/utils/imageProcs/p9_scan_compression.H220
-rw-r--r--src/import/chips/p9/utils/imageProcs/p9_tor.C629
-rw-r--r--src/import/chips/p9/utils/imageProcs/p9_tor.H47
13 files changed, 1095 insertions, 1350 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 8fa09557e..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
@@ -48,17 +48,17 @@ extern "C"
const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>
& i_fapiTarget,
const uint8_t i_chipletId,
- const uint8_t i_evenOdd,
+ const uint64_t i_evenOddMask,
const uint8_t i_ringId,
uint8_t* i_pRingBuf,
uint32_t& io_rRingBufsize )
{
fapi2::ReturnCode l_fapirc;
- FAPI_DBG("getMvpdRing: Called w/ringId=0x%x, chipletId=0x%x, evenOdd=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_evenOdd,
+ i_evenOddMask,
io_rRingBufsize );
// common get and set processing
@@ -67,7 +67,7 @@ extern "C"
i_keyword,
i_fapiTarget,
i_chipletId,
- i_evenOdd,
+ i_evenOddMask,
i_ringId,
i_pRingBuf,
io_rRingBufsize );
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 6fe70da71..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
@@ -65,7 +65,7 @@ extern "C"
* MVPD_RECORD_CP00 - MVPD_KEYWORD_PDG
* @param i_fapiTarget - cpu target
* @param i_chipletId - Chiplet ID
- * @param i_evenOdd - Even (0) or odd (1) EX. Disregarded for other chiplets.
+ * @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.
@@ -86,7 +86,7 @@ extern "C"
* caller does compression and decompression.
* Buffer: io_rRingBufsize returns xNN.
* byte x0 CompressedScanData structure (rs4 header)
- * byte x0C compressed data (sizeof CompressedScanData is 0x0C)
+ * byte x18 compressed data (sizeof CompressedScanData is 0x18)
* byte xNN last byte of compressed data
*
* @return fapi2::ReturnCode - FAPI_RC_SUCCESS if success,
@@ -97,7 +97,7 @@ extern "C"
const Target<TARGET_TYPE_PROC_CHIP>&
i_fapiTarget,
const uint8_t i_chipletId,
- const uint8_t i_evenOdd,
+ 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 527a63509..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
@@ -41,7 +41,6 @@
// pull in CompressedScanData def from proc_slw_build HWP
#include <p9_scan_compression.H>
#include <p9_ring_identification.H>
-#include <p9_ringId.H>
extern "C"
@@ -60,7 +59,7 @@ extern "C"
fapi2::MvpdRecord i_record,
fapi2::MvpdKeyword i_keyword,
const uint8_t i_chipletId,
- const uint8_t i_evenOdd,
+ const uint64_t i_evenOddMask,
const uint8_t i_ringId,
uint8_t* i_pRecordBuf,
uint32_t i_recordBufLenfapi,
@@ -165,9 +164,8 @@ extern "C"
* @param[in] i_chipletId
* Chiplet ID for the op
*
- * @param[in] i_evenOdd
- * Indicates whether to choose even (0) or odd (1) EX.
- * Undefined and to be disregarded for non-EX.
+ * @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
@@ -188,7 +186,7 @@ extern "C"
const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>
& i_fapiTarget,
const uint8_t i_chipletId,
- const uint8_t i_evenOdd,
+ const uint64_t i_evenOddMask,
const uint8_t i_ringId,
uint8_t* i_pRingBuf,
uint32_t& io_rRingBufsize )
@@ -200,11 +198,11 @@ extern "C"
uint32_t l_ringLen = 0;
FAPI_DBG("mvpdRingFunc: Called w/op=0x%x, ringId=0x%x, chipletId=0x%x, "
- "evenOdd=0x%x, size=0x%x",
+ "evenOddMask=0x%016llx, size=0x%x",
i_mvpdRingFuncOp,
i_ringId,
i_chipletId,
- i_evenOdd,
+ i_evenOddMask,
io_rRingBufsize );
// do common get and set input parameter error checks
@@ -264,9 +262,9 @@ extern "C"
l_recordBuf,
l_recordLen ),
"mvpdRingFunc: getMvpdField failed "
- "chipletId=0x%x, evenOdd=0x%x, ringId=0x%x",
+ "chipletId=0x%x, evenOddMask=0x%016llx, ringId=0x%x",
i_chipletId,
- i_evenOdd,
+ i_evenOddMask,
i_ringId);
// find ring in the record. It is an error if not there for a "get".
@@ -276,16 +274,16 @@ extern "C"
i_record,
i_keyword,
i_chipletId,
- i_evenOdd,
+ i_evenOddMask,
i_ringId,
l_recordBuf,
l_recordLen,
l_pRing,
l_ringLen),
"mvpdRingFunc: mvpdRingFuncFind failed "
- "chipletId=0x%x, evenOdd=0x%x, ringId=0x%x",
+ "chipletId=0x%x, evenOddMask=0x%016llx, ringId=0x%x",
i_chipletId,
- i_evenOdd,
+ i_evenOddMask,
i_ringId);
// do the get or set specific operations
@@ -317,9 +315,9 @@ extern "C"
i_pRingBuf,
io_rRingBufsize),
"mvpdRingFunc: mvpdRingFuncGet failed "
- "chipletId=0x%x, evenOdd=0x%x, ringId=0x%x",
+ "chipletId=0x%x, evenOddMask=0x%016llx, ringId=0x%x",
i_chipletId,
- i_evenOdd,
+ i_evenOddMask,
i_ringId);
}
else // set operation
@@ -373,279 +371,6 @@ extern "C"
return l_fapirc;
}
- // Attempts to find the MVPD END marker at given buffer address.
- // Returns o_mvpdEnd: true if END marker read, false otherwise.
- // Adjusts buffer pointer and length for the consumed portion of buffer, if any.
- fapi2::ReturnCode mvpdRingFuncFindEnd( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>
- & i_fapiTarget,
- uint8_t** io_pBufLeft,
- uint32_t* io_pBufLenLeft,
- bool* o_mvpdEnd)
- {
- uint32_t l_mvpdMagic;
- const uint8_t l_mvpdMagicLength = 3; // we match against 3 out of 4 bytes
-
- *o_mvpdEnd = false;
-
- if (*io_pBufLenLeft < l_mvpdMagicLength)
- {
- return fapi2::current_err;
- }
-
- l_mvpdMagic = *(reinterpret_cast<uint32_t*>(*io_pBufLeft));
- l_mvpdMagic = be32toh(l_mvpdMagic) & 0xffffff00;
-
- // Check for end of data magic word
- if (l_mvpdMagic == (MVPD_END_OF_DATA_MAGIC & 0xffffff00))
- {
- *o_mvpdEnd = true;
-
- FAPI_DBG("mvpdRingFuncFind: Found end of VPD data "
- "at address 0x%x",
- *io_pBufLeft);
-
- *io_pBufLeft += l_mvpdMagicLength;
- *io_pBufLenLeft -= l_mvpdMagicLength;
- }
-
- return fapi2::current_err;
- }
-
-
- // Returns a matching MVPD ring in RS4 v2 format at given buffer address,
- // NULL otherwise.
- // Adjusts buffer pointer and remaining length for the consumed portion
- // of buffer, that is, for the size of a matching MVPD ring, if any.
- // This function is needed only for backward compatibility, and may be
- // removed as soon as no RS4 v2 MVPD rings will be available.
- fapi2::ReturnCode mvpdRingFuncFindOld( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>
- & i_fapiTarget,
- const uint8_t i_chipletId,
- const uint8_t i_evenOdd,
- const uint8_t i_ringId,
- uint8_t** io_pBufLeft,
- uint32_t* io_pBufLenLeft,
- CompressedScanData** o_pScanData)
- {
- uint64_t l_evenOddMask;
- CompressedScanData l_scanData;
-
- // old CompressedScanData structure
- typedef struct
- {
- uint32_t iv_magic;
- uint32_t iv_size;
- uint32_t iv_algorithmReserved;
- uint32_t iv_length;
- uint64_t iv_scanSelect;
- uint8_t iv_headerVersion;
- uint8_t iv_flushOptimization;
- uint8_t iv_ringId;
- uint8_t iv_chipletId;
- } OldCompressedScanData;
-
- OldCompressedScanData* l_pScanDataOld =
- reinterpret_cast<OldCompressedScanData*>(*io_pBufLeft);
-
- *o_pScanData = NULL;
-
- // check if buffer is big enough for old ring header
- if (*io_pBufLenLeft < sizeof(OldCompressedScanData))
- {
- return fapi2::current_err;
- }
-
- // check magic word assuming an old ring header
- if ((be32toh(l_pScanDataOld->iv_magic) & 0xffffff00) != 0x52533400)
- {
- return fapi2::current_err;
- }
-
- // make sure that buffer is big enough for entire ring
- FAPI_ASSERT(*io_pBufLenLeft >= be32toh(l_pScanDataOld->iv_size),
- fapi2::MVPD_INSUFFICIENT_RECORD_SPACE(),
- "mvpdRingFuncFind: data does not fit "
- "into record buffer: ringId=0x%x, chipletId=0x%x",
- i_ringId,
- i_chipletId );
-
- // ok, this is a ring with an old header,
- // hence this part of the input buffer can be considered consumed,
- // regardless of it being the ring to be found or not
- *io_pBufLeft += be32toh(l_pScanDataOld->iv_size);
- *io_pBufLenLeft -= be32toh(l_pScanDataOld->iv_size);
-
- // for a few rings there are two different copies,
- // called even and odd, which we need to consider
- // as an extra search criterion for those rings (EX only)
- switch (i_ringId)
- {
- case ex_l3_refr_time:
- case ex_l3_refr_repr:
- l_evenOddMask = 0x0008000000000000 >> i_evenOdd;
- break;
-
- case ex_l2_repr:
- l_evenOddMask = 0x0080000000000000 >> i_evenOdd;
- break;
-
- case ex_l3_repr:
- l_evenOddMask = 0x0200000000000000 >> i_evenOdd;
- break;
-
- default:
- l_evenOddMask = 0;
- }
-
- // check if this ring matches the given criteria
- // (ring ID, chiplet Id, and even/odd for EX)
- if ( l_pScanDataOld->iv_ringId == i_ringId &&
- l_pScanDataOld->iv_chipletId == i_chipletId &&
- (l_evenOddMask == 0 ||
- be64toh(l_pScanDataOld->iv_scanSelect) & l_evenOddMask) )
- {
- // look up ring in p9_ringId and retrieve scanAddr
- GenRingIdList* l_ringProp = p9_ringid_get_ring_properties(
- (RingID)i_ringId);
- FAPI_ASSERT(l_ringProp,
- fapi2::MVPD_RINGID_DATA_NOT_FOUND(),
- "mvpdRingFuncFind: lookup of scanAddr failed "
- "for ringId=0x%x, chipletId=0x%x",
- i_ringId,
- i_chipletId);
-
- // update chipletId in iv_scanScomAddress (for instance rings)
- uint32_t l_scanScomAddr = l_ringProp->scanScomAddress;
-
- if (i_chipletId != (l_scanScomAddr & 0xff000000) >> 24)
- {
- l_scanScomAddr = (l_scanScomAddr & 0x00ffffff) |
- (((uint32_t)i_chipletId) << 24);
- }
-
- // translate old ring header to new ring header
- l_scanData.iv_magic = htobe16(RS4_MAGIC);
- l_scanData.iv_version = RS4_VERSION;
- l_scanData.iv_type = RS4_SCAN_DATA_TYPE_NON_CMSK;
- l_scanData.iv_size = htobe16(
- (be32toh(l_pScanDataOld->iv_size)
- - sizeof(OldCompressedScanData)
- + sizeof(CompressedScanData)));
- l_scanData.iv_ringId = htobe16(i_ringId);
- l_scanData.iv_scanAddr = htobe32(l_scanScomAddr);
-
- // overwrite old ring header with new ring header
- memcpy(l_pScanDataOld, &l_scanData, sizeof(l_scanData));
-
- // move compressed ring data to position adjacent to new header
- memmove((uint8_t*)l_pScanDataOld + sizeof(CompressedScanData),
- (uint8_t*)l_pScanDataOld + sizeof(OldCompressedScanData),
- be16toh(l_scanData.iv_size) - sizeof(CompressedScanData));
-
- // return found ring in new format
- *o_pScanData = reinterpret_cast<CompressedScanData*>
- (l_pScanDataOld);
-
- FAPI_DBG("mvpdRingFuncFindOld: found RS4 v2 ring for "
- "chipletId 0x%x, evenOdd %d and ringId %d "
- "at address 0x%x and with old/translated size %d/%d",
- i_chipletId,
- i_evenOdd,
- i_ringId,
- *o_pScanData,
- be32toh(l_pScanDataOld->iv_size),
- be16toh((*o_pScanData)->iv_size));
- }
-
- fapi_try_exit:
- return fapi2::current_err;
- }
-
-
- // Returns a matching MVPD ring in RS4 v3 format at given buffer address,
- // NULL otherwise.
- // Adjusts buffer pointer and remaining length for the consumed portion
- // of buffer, that is, for the size of a matching MVPD ring, if any.
- fapi2::ReturnCode mvpdRingFuncFindNew( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>
- & i_fapiTarget,
- const uint8_t i_chipletId,
- const uint8_t i_evenOdd,
- const uint8_t i_ringId,
- uint8_t** io_pBufLeft,
- uint32_t* io_pBufLenLeft,
- CompressedScanData** o_pScanData)
- {
- uint32_t l_evenOddMask;
-
- CompressedScanData* l_pScanData =
- reinterpret_cast<CompressedScanData*>(*io_pBufLeft);
-
- *o_pScanData = NULL;
-
- // check if buffer is big enough for new ring header
- if (*io_pBufLenLeft < sizeof(CompressedScanData))
- {
- return fapi2::current_err;
- }
-
- // check magic word assuming a new ring header
- if (be16toh(l_pScanData->iv_magic) != RS4_MAGIC)
- {
- return fapi2::current_err;
- }
-
- // make sure that buffer is big enough for entire ring
- FAPI_ASSERT(*io_pBufLenLeft >= be16toh(l_pScanData->iv_size),
- fapi2::MVPD_INSUFFICIENT_RECORD_SPACE(),
- "mvpdRingFuncFind: data does not fit "
- "into record buffer: ringId=0x%x, chipletId=0x%x",
- i_ringId,
- i_chipletId);
-
- // ok, this is a ring with a new header,
- // hence this part of the input buffer can be considered consumed,
- // regardless of it being the ring to be found or not
- *io_pBufLeft += be16toh(l_pScanData->iv_size);
- *io_pBufLenLeft -= be16toh(l_pScanData->iv_size);
-
- // for a few rings there are two different copies,
- // called even and odd, which we need to consider
- // as an extra search criterion for those rings (EX only)
- switch (i_ringId)
- {
- case ex_l3_refr_time:
- case ex_l3_refr_repr:
- case ex_l2_repr:
- case ex_l3_repr:
- l_evenOddMask = 0x00000800 >> i_evenOdd;
- break;
-
- default:
- l_evenOddMask = 0;
- }
-
- if ( be16toh(l_pScanData->iv_ringId) == i_ringId &&
- (be32toh(l_pScanData->iv_scanAddr) & 0xFF000000UL) >> 24
- == i_chipletId &&
- ( l_evenOddMask == 0 ||
- (be32toh(l_pScanData->iv_scanAddr) & l_evenOddMask) ) )
- {
- // found it, return pointer to ring
- *o_pScanData = l_pScanData;
-
- FAPI_DBG("mvpdRingFuncFindNew: found RS4 v3 ring for "
- "chipletId 0x%x, evenOdd %d and ringId %d "
- "at address 0x%x and with size %d",
- i_chipletId,
- i_evenOdd,
- i_ringId,
- *o_pScanData,
- be16toh((*o_pScanData)->iv_size));
- }
-
- fapi_try_exit:
- return fapi2::current_err;
- }
/**
* @brief MVPD Ring Function Find
@@ -656,9 +381,8 @@ extern "C"
* @param[in] i_chipletId
* Chiplet ID for the op
*
- * @param[in] i_evenOdd
- * Indicates whether choose even (0) or odd (1) EX.
- * Undefined and to be disregarded for non-EX.
+ * @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
@@ -685,102 +409,149 @@ extern "C"
fapi2::MvpdRecord i_record,
fapi2::MvpdKeyword i_keyword,
const uint8_t i_chipletId,
- const uint8_t i_evenOdd,
+ 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;
- bool l_mvpdEnd;
- CompressedScanData* l_pScanData = NULL;
- uint32_t l_prevLen;
- uint32_t l_recordBufLenLeft = i_recordBufLen;
+ fapi2::ReturnCode l_fapirc;
+ uint8_t* l_pRing = NULL;
+ uint32_t l_offset = 0;
+ CompressedScanData* l_pScanData = NULL;
+ bool l_foundflag = false;
+
+ // initialize return fields in case of an error.
+ o_rpRing = NULL;
+ o_rRingLen = 0;
- FAPI_DBG("mvpdRingFuncFind: Called w/chipletId=0x%x, evenOdd=0x%x, ringId=0x%x ",
+ FAPI_DBG("mvpdRingFuncFind: Called w/chipletId=0x%x, evenOddMask=0x%016llx, ringId=0x%x ",
i_chipletId,
- i_evenOdd,
+ i_evenOddMask,
i_ringId);
- // Find first RSA data block in ring (fixed offset defined by
- // MVPD spec)
- //
- // First byte in record should be the version number, skip
- // over this.
- //
- FAPI_DBG( "mvpdRingFuncFind: record version = 0x%x", *i_pRecordBuf );
- i_pRecordBuf++;
- l_recordBufLenLeft--;
-
do
{
- // let's track the previous size of the remaining buffer,
- // so that we can determine whether we have found anything,
- // and bail out if not (= buffer content corrupted)
- l_prevLen = l_recordBufLenLeft;
-
- // first look for vpd end marker
- FAPI_TRY(mvpdRingFuncFindEnd(i_fapiTarget,
- &i_pRecordBuf,
- &l_recordBufLenLeft,
- &l_mvpdEnd),
- "mvpdRingFuncFind: mvpdRingFuncFindEnd failed");
-
- // next look for old ring header, because
- // its magic "RS4" is not as ambigiuous as the new "RS" magic
- if (!l_mvpdEnd)
+ // Point to record
+ l_pRing = i_pRecordBuf;
+
+ // Find first RSA data block in ring (fixed offset defined by
+ // MVPD spec)
+ //
+ // First byte in record should be the version number, skip
+ // over this.
+ //
+ FAPI_DBG( "mvpdRingFuncFind: record version = 0x%x", *l_pRing );
+ l_pRing++;
+ l_offset = 0;
+
+ // point to header of first ring in record
+ l_pScanData =
+ reinterpret_cast<CompressedScanData*>( l_pRing + l_offset );
+
+ l_foundflag = false;
+
+ // be sure that data we will look at is within the passed buffer
+ while ( (l_offset + be32toh(l_pScanData->iv_size)) < i_recordBufLen )
{
- FAPI_TRY(mvpdRingFuncFindOld(i_fapiTarget,
- i_chipletId,
- i_evenOdd,
- i_ringId,
- &i_pRecordBuf,
- &l_recordBufLenLeft,
- &l_pScanData),
- "mvpdRingFuncFind: mvpdRingFuncFindOld failed");
- }
- // last look for new ring header
- if (!l_mvpdEnd && !l_pScanData)
+ // There's only two valid header words that may appear in the Mvpd record:
+ // - MVPD_END_OF_DATA_MAGIC which indicates end of the data with a record.
+ // - RS4_MAGIC which indicates the beginning of another VPD ring.
+ // - Anything else is a catastrophic failure.
+
+ // Check for end of data magic word
+ if ((be32toh(l_pScanData->iv_magic) & 0xffffff00) == (MVPD_END_OF_DATA_MAGIC & 0xffffff00))
+ {
+ FAPI_DBG("mvpdRingFuncFind: Found end of data magic word (=0x%08X): "
+ "offset=0x%x, chipletId=0x%x, ringId=0x%x",
+ be32toh(l_pScanData->iv_magic),
+ l_offset,
+ i_chipletId,
+ i_ringId);
+ break;
+ }
+
+ // Check magic word to make sure this is valid data.
+ FAPI_ASSERT( (be32toh(l_pScanData->iv_magic) & 0xffffff00) == (RS4_MAGIC & 0xffffff00),
+ fapi2::MVPD_INVALID_RS4_HEADER().
+ set_CHIP_TARGET(i_fapiTarget).
+ set_MVPD_RECORD(i_record).
+ set_MVPD_KEYWORD(i_keyword),
+ "mvpdRingFuncFind: Couldn't find RS4 or End-of-data magic word in header: "
+ "Header=0x%x, offset=0x%x, ringId=0x%x, chipletId=0x%x",
+ be32toh(l_pScanData->iv_magic),
+ l_offset,
+ i_ringId,
+ i_chipletId );
+
+ // We can now assume good data...
+
+ // Dump record info for debug
+ FAPI_DBG("mvpdRingFuncFind:%d ringId=0x%x chipletId=0x%x"
+ " ringlen=0x%x size=0x%x",
+ l_offset,
+ l_pScanData->iv_ringId,
+ l_pScanData->iv_chipletId,
+ be32toh(l_pScanData->iv_length),
+ be32toh(l_pScanData->iv_size) );
+
+
+ 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, "
+ "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
+ FAPI_ASSERT(l_offset + be32toh(l_pScanData->iv_size) <=
+ i_recordBufLen,
+ fapi2::MVPD_INSUFFICIENT_RECORD_SPACE(),
+ "mvpdRingFuncFind: data does not fit "
+ "into record buffer: ringId=0x%x, chipletId=0x%x",
+ i_ringId,
+ i_chipletId );
+
+ l_foundflag = true;
+ o_rpRing = l_pRing + l_offset;
+ o_rRingLen = be32toh(l_pScanData->iv_size);
+ // got it, break out of scan loop
+ break;
+ }
+
+ // being defensive.
+ if ( be32toh(l_pScanData->iv_size) == 0)
+ {
+ // size of 0 is invalid, would loop forever.
+ break;
+ }
+
+ // bump to next ring
+ l_offset += be32toh(l_pScanData->iv_size) ;
+
+ // point to header
+ l_pScanData =
+ reinterpret_cast<CompressedScanData*>( l_pRing + l_offset );
+
+
+ } // end while scan loop
+
+ // if no other error and not found, indicate with 0 size.
+ if ( !l_fapirc && ! l_foundflag )
{
- FAPI_TRY(mvpdRingFuncFindNew(i_fapiTarget,
- i_chipletId,
- i_evenOdd,
- i_ringId,
- &i_pRecordBuf,
- &l_recordBufLenLeft,
- &l_pScanData),
- "mvpdRingFuncFind: mvpdRingFuncFindNew failed");
+ o_rpRing = l_pRing + l_offset; //return pointer to end of list
+ //incase needed for appending
+ o_rRingLen = 0; //indicate not found
}
- FAPI_ASSERT(l_prevLen != l_recordBufLenLeft,
- fapi2::MVPD_RING_FUNC_ENDLESS(),
- "mvpdRingFuncFind: found neither END marker, nor valid"
- " ring at address 0x%x for remaining buffer size 0x%d.",
- i_pRecordBuf,
- l_recordBufLenLeft);
- }
- while (!l_mvpdEnd && !l_pScanData && l_recordBufLenLeft);
-
- if (l_pScanData)
- {
- o_rpRing = (uint8_t*)l_pScanData;
- o_rRingLen = be16toh(l_pScanData->iv_size);
-
- // Dump record info for debug
- FAPI_DBG("mvpdRingFuncFind:ringId=0x%x chipletId=0x%x size=0x%x",
- i_ringId,
- i_chipletId,
- be16toh(l_pScanData->iv_size));
- }
- else
- {
- // if no error and not found, return pointer to end of list
- // in case it's needed for appending, and indicate with 0 size
- o_rpRing = i_pRecordBuf;
- o_rRingLen = 0;
}
+ while ( 0 );
fapi_try_exit:
// get current error
@@ -815,11 +586,10 @@ extern "C"
*
* @return fapi2::ReturnCode
*/
- fapi2::ReturnCode mvpdValidateRingHeader(
- CompressedScanData* i_pRingBuf,
- uint8_t i_chipletId,
- uint8_t i_ringId,
- uint32_t i_ringBufsize)
+ fapi2::ReturnCode mvpdValidateRingHeader( CompressedScanData* i_pRingBuf,
+ uint8_t i_chipletId,
+ uint8_t i_ringId,
+ uint32_t i_ringBufsize)
{
FAPI_ASSERT(i_ringBufsize > sizeof(CompressedScanData),
fapi2::MVPD_RING_FUNC_INVALID_PARAMETER(),
@@ -827,26 +597,25 @@ extern "C"
"chipletId=0x%x, ringId=0x%x",
i_chipletId,
i_ringId);
- FAPI_ASSERT(be16toh(i_pRingBuf->iv_magic) == RS4_MAGIC,
+ FAPI_ASSERT((be32toh(i_pRingBuf->iv_magic) & 0xffffff00) == (RS4_MAGIC & 0xffffff00),
fapi2::MVPD_RING_FUNC_INVALID_PARAMETER(),
"mvpdValidateRingHeader: i_pRingBuf->iv_magic failed "
"chipletId=0x%x, ringId=0x%x",
i_chipletId,
i_ringId);
- FAPI_ASSERT(be16toh(i_pRingBuf->iv_ringId) == i_ringId,
+ FAPI_ASSERT(i_pRingBuf->iv_ringId == i_ringId,
fapi2::MVPD_RING_FUNC_INVALID_PARAMETER(),
"mvpdValidateRingHeader: i_pRingBuf->iv_ringId failed "
"chipletId=0x%x, ringId=0x%x",
i_chipletId,
i_ringId);
- FAPI_ASSERT((be32toh(i_pRingBuf->iv_scanAddr) & 0xFF000000UL) >> 24
- == i_chipletId,
+ FAPI_ASSERT(i_pRingBuf->iv_chipletId == i_chipletId,
fapi2::MVPD_RING_FUNC_INVALID_PARAMETER(),
"mvpdValidateRingHeader: i_pRingBuf->iv_chipletId failed "
"chipletId=0x%x, ringId=0x%x",
i_chipletId,
i_ringId);
- FAPI_ASSERT(be16toh(i_pRingBuf->iv_size) == i_ringBufsize,
+ FAPI_ASSERT(be32toh(i_pRingBuf->iv_size) == i_ringBufsize,
fapi2::MVPD_RING_FUNC_INVALID_PARAMETER(),
"mvpdValidateRingHeader: i_pRingBuf->iv_size failed "
"chipletId=0x%x, ringId=0x%x",
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 396db3419..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
@@ -72,7 +72,7 @@ extern "C"
* @param i_keyword - Keyword enumerator
* @param i_fapiTarget - cpu target
* @param i_chipletId - Chiplet ID
- * @param i_evenOddMask - Even (0) or odd (1) EX. Disregarded for other chiplets.
+ * @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
@@ -86,7 +86,7 @@ extern "C"
const Target<TARGET_TYPE_PROC_CHIP>&
i_fapiTarget,
const uint8_t i_chipletId,
- const uint8_t i_evenOdd,
+ const uint64_t i_evenOddMask,
const uint8_t i_ringId,
uint8_t* i_pRingBuf,
uint32_t& io_rRingBufsize );
diff --git a/src/import/chips/p9/procedures/hwp/accessors/p9_mvpd_ring_funcs.mk b/src/import/chips/p9/procedures/hwp/accessors/p9_mvpd_ring_funcs.mk
index e936a8d70..601b92808 100644
--- a/src/import/chips/p9/procedures/hwp/accessors/p9_mvpd_ring_funcs.mk
+++ b/src/import/chips/p9/procedures/hwp/accessors/p9_mvpd_ring_funcs.mk
@@ -26,5 +26,4 @@
# Include the macros and things for MVPD ring procedures
PROCEDURE=p9_mvpd_ring_funcs
$(call ADD_MODULE_INCDIR,$(PROCEDURE),$(ROOTPATH)/chips/p9/utils/imageProcs)
-lib$(PROCEDURE)_DEPLIBS+=p9_ringId
$(call BUILD_PROCEDURE)
diff --git a/src/import/chips/p9/procedures/hwp/customize/p9_xip_customize.C b/src/import/chips/p9/procedures/hwp/customize/p9_xip_customize.C
index a3bb7d4d0..00723dea3 100644
--- a/src/import/chips/p9/procedures/hwp/customize/p9_xip_customize.C
+++ b/src/import/chips/p9/procedures/hwp/customize/p9_xip_customize.C
@@ -165,9 +165,11 @@ fapi2::ReturnCode _fetch_and_insert_vpd_rings(
int l_rc = 0;
uint8_t l_chipletId;
- uint8_t l_ringsPerChipletId = 1;
+ uint8_t l_ringsPerChipletId = 0;
uint8_t l_instanceIdMax;
uint8_t l_evenOdd;
+ uint64_t l_evenOddMaskStart;
+ uint64_t l_evenOddMask; // 0:even, 1:odd
uint8_t bSkipRing = 0;
@@ -185,13 +187,44 @@ fapi2::ReturnCode _fetch_and_insert_vpd_rings(
// listed in ring_identification.C: One for each of the two EX, even and odd.
// Each of these two rings have the same [EQ] chipletId encoded in their
// iv_chipletId (current RS4 header) or iv_scanAddress (next gen RS4 header).
- // They are distinguished by their even-odd bits in iv_scanAddress and so
- // for each EQ chipletId there's two EX rings to be accommodated.
+ // They are distinguished by their even-odd bits in iv_scanSelect as follows:
if (i_ring.vpdRingClass == VPD_RING_CLASS_EX_INS)
{
l_ringsPerChipletId = 2;
+
+ switch (i_ring.ringId)
+ {
+ case ex_l3_refr_time:
+ case ex_l3_refr_repr:
+ l_evenOddMaskStart = ((uint64_t)0x00080000) << 32;
+ break;
+
+ case ex_l2_repr:
+ l_evenOddMaskStart = ((uint64_t)0x00800000) << 32;
+ break;
+
+ case ex_l3_repr:
+ l_evenOddMaskStart = ((uint64_t)0x02000000) << 32;
+ break;
+
+ default:
+ FAPI_ASSERT( false,
+ fapi2::XIPC_MVPD_RING_ID_MESS().
+ set_CHIP_TARGET(i_proc_target).
+ set_RING_ID(i_ring.ringId),
+ "Code bug: Wrong assumption about supported ringIds in this context. "
+ "ringId=%d(=0x%x)(=ringId.ringName) is not allowed here. ",
+ i_ring.ringId, i_ring.ringId, i_ring.ringName );
+ break;
+ }
+ }
+ else
+ {
+ l_ringsPerChipletId = 1;
+ l_evenOddMaskStart = 0;
}
+
// We use ring.instanceIdMax column to govern max value of instanceIdMax (i.e., the
// max chipletId). But unlike in P8, in P9 we will not search for chipletId=0xff in P9
// MVPD. It is no longer used in the MVPD. We merely keep the multicast Id, 0xff, in
@@ -210,6 +243,9 @@ fapi2::ReturnCode _fetch_and_insert_vpd_rings(
for (l_evenOdd = 0; l_evenOdd < l_ringsPerChipletId; l_evenOdd++)
{
+
+ l_evenOddMask = l_evenOddMaskStart >> l_evenOdd;
+
FAPI_INF("_fetch_and_insert_vpd_rings: (ringId,chipletId) = (0x%02X,0x%02x)",
i_ring.ringId, l_chipletId);
@@ -262,7 +298,7 @@ fapi2::ReturnCode _fetch_and_insert_vpd_rings(
l_mvpdKeyword,
i_proc_target,
l_chipletId,
- l_evenOdd,
+ l_evenOddMask,
i_ring.ringId,
(uint8_t*)i_vpdRing,
l_vpdRingSize );
@@ -286,7 +322,7 @@ fapi2::ReturnCode _fetch_and_insert_vpd_rings(
l_mvpdKeyword,
i_proc_target,
l_chipletId,
- l_evenOdd,
+ l_evenOddMask,
i_ring.ringId,
(uint8_t*)i_vpdRing,
l_vpdRingSize );
@@ -309,7 +345,7 @@ fapi2::ReturnCode _fetch_and_insert_vpd_rings(
l_mvpdKeyword,
i_proc_target,
l_chipletId,
- l_evenOdd,
+ l_evenOddMask,
i_ring.ringId,
(uint8_t*)i_vpdRing,
l_vpdRingSize );
@@ -334,7 +370,7 @@ fapi2::ReturnCode _fetch_and_insert_vpd_rings(
l_mvpdKeyword,
i_proc_target,
l_chipletId,
- l_evenOdd,
+ l_evenOddMask,
i_ring.ringId,
(uint8_t*)i_vpdRing,
l_vpdRingSize );
@@ -356,12 +392,12 @@ fapi2::ReturnCode _fetch_and_insert_vpd_rings(
else if (l_fapiRc == fapi2::FAPI2_RC_SUCCESS)
{
- auto l_scanAddr =
- be32toh(((CompressedScanData*)i_vpdRing)->iv_scanAddr);
- auto l_vpdChipletId = (l_scanAddr & 0xFF000000UL) >> 24;
+ auto l_vpdChipletId = ((CompressedScanData*)i_vpdRing)->iv_chipletId;
// Even though success, checking that chipletId didn't somehow get
// messed up (code bug).
+ //@TODO: Modify this when chipletId becomes part of iv_scanAddress
+ // as part of RS4 shrinkage (RTC158101).
FAPI_ASSERT( l_vpdChipletId == l_chipletId,
fapi2::XIPC_MVPD_CHIPLET_ID_MESS().
set_CHIP_TARGET(i_proc_target).
@@ -390,7 +426,7 @@ fapi2::ReturnCode _fetch_and_insert_vpd_rings(
// Also fix p9_mvpd_ring_funcs.C to look for entire RS4_MAGIC string.
// Actually, do all the above in connection with RS4 header
// shrinkage (RTC158101 and RTC159801).
- ((CompressedScanData*)i_vpdRing)->iv_magic = htobe16(RS4_MAGIC);
+ ((CompressedScanData*)i_vpdRing)->iv_magic = htobe32(RS4_MAGIC);
// Check if ring is a flush ring, i.e. if it is redundant, meaning that it will
// result in no change.
@@ -414,8 +450,25 @@ fapi2::ReturnCode _fetch_and_insert_vpd_rings(
}
else
{
+
+ //@TODO: Temporary fix to convert VPD RS4 container format to
+ // to RingLayout format. Remove/replace in connection
+ // with RS4 header shrinkage (RTC158101)
+ uint32_t i;
+
+ for (i = 0; i < l_vpdRingSize; i++)
+ {
+ *(((uint8_t*)i_vpdRing) + l_vpdRingSize - 1 + sizeof(P9_TOR::RingLayout_t) - i) =
+ *(((uint8_t*)i_vpdRing) + l_vpdRingSize - 1 - i);
+ }
+
+ uint32_t l_sizeOfThisRing = l_vpdRingSize + sizeof(P9_TOR::RingLayout_t);
+ ((P9_TOR::RingLayout_t*)i_vpdRing)->sizeOfThis = htobe32(l_sizeOfThisRing);
+ ((P9_TOR::RingLayout_t*)i_vpdRing)->sizeOfCmsk = 0;
+ ((P9_TOR::RingLayout_t*)i_vpdRing)->sizeOfMeta = 0;
+
// Checking for potential image overflow BEFORE appending the ring.
- if ( (io_ringSectionSize + l_vpdRingSize) > i_maxRingSectionSize )
+ if ( (io_ringSectionSize + l_sizeOfThisRing) > i_maxRingSectionSize )
{
//@TODO: We can't update bootCoreMask until RTC158106. So for now
// we're simply returning the requested bootCoreMask. Thus,
@@ -428,7 +481,7 @@ fapi2::ReturnCode _fetch_and_insert_vpd_rings(
fapi2::XIPC_IMAGE_WOULD_OVERFLOW().
set_CHIP_TARGET(i_proc_target).
set_CURRENT_RING_SECTION_SIZE(io_ringSectionSize).
- set_SIZE_OF_THIS_RING(l_vpdRingSize).
+ set_SIZE_OF_THIS_RING(l_sizeOfThisRing).
set_MAX_RING_SECTION_SIZE(i_maxRingSectionSize).
set_RING_ID(i_ring.ringId).
set_CHIPLET_ID(l_chipletId).
@@ -462,7 +515,7 @@ fapi2::ReturnCode _fetch_and_insert_vpd_rings(
l_chipletTorId, // Chiplet instance TOR Index
i_vpdRing ); // The VPD RS4 ring container
- if (l_rc == TOR_SUCCESS)
+ if (l_rc == TOR_APPEND_RING_DONE)
{
FAPI_INF("Successfully added VPD ring: (ringId,evenOdd,chipletId)=(0x%02X,0x%X,0x%02X)",
i_ring.ringId, l_evenOdd, l_chipletId);
@@ -492,7 +545,7 @@ fapi2::ReturnCode _fetch_and_insert_vpd_rings(
l_chipletTorId, // Chiplet instance ID
i_vpdRing ); // The VPD RS4 ring container
- if (l_rc == TOR_SUCCESS)
+ if (l_rc == TOR_APPEND_RING_DONE)
{
FAPI_INF("Successfully added VPD ring: (ringId,evenOdd,chipletId)=(0x%02X,0x%X,0x%02X)",
i_ring.ringId, l_evenOdd, l_chipletId);
@@ -524,7 +577,7 @@ fapi2::ReturnCode _fetch_and_insert_vpd_rings(
l_chipletTorId, // Chiplet instance ID
i_vpdRing ); // The VPD RS4 ring container
- if (l_rc == TOR_SUCCESS)
+ if (l_rc == TOR_APPEND_RING_DONE)
{
FAPI_INF("Successfully added VPD ring: (ringId,evenOdd,chipletId)=(0x%02X,0x%X,0x%02X)",
i_ring.ringId, l_evenOdd, l_chipletId);
diff --git a/src/import/chips/p9/procedures/xml/error_info/p9_mvpd_ring_funcs_errors.xml b/src/import/chips/p9/procedures/xml/error_info/p9_mvpd_ring_funcs_errors.xml
index d9258f91e..4250b2eef 100644
--- a/src/import/chips/p9/procedures/xml/error_info/p9_mvpd_ring_funcs_errors.xml
+++ b/src/import/chips/p9/procedures/xml/error_info/p9_mvpd_ring_funcs_errors.xml
@@ -26,15 +26,6 @@
<hwpErrors>
<!-- ********************************************************************* -->
<hwpError>
- <rc>RC_MVPD_RING_FUNC_ENDLESS</rc>
- <description>failed to interprete VPD data buffer</description>
- <callout>
- <procedure>CODE</procedure>
- <priority>HIGH</priority>
- </callout>
- </hwpError>
- <!-- ********************************************************************* -->
- <hwpError>
<rc>RC_MVPD_RING_FUNC_INVALID_PARAMETER</rc>
<description>MVPD ring function parameter is not valid</description>
<callout>
@@ -94,13 +85,4 @@
</callout>
</hwpError>
<!-- ********************************************************************* -->
- <hwpError>
- <rc>RC_MVPD_RINGID_DATA_NOT_FOUND</rc>
- <description>Data for given ringId missing in p9_ringId</description>
- <callout>
- <procedure>CODE</procedure>
- <priority>HIGH</priority>
- </callout>
- </hwpError>
- <!-- ********************************************************************* -->
</hwpErrors>
diff --git a/src/import/chips/p9/utils/imageProcs/p9_ringId.C b/src/import/chips/p9/utils/imageProcs/p9_ringId.C
index da31ca45f..90f17753e 100644
--- a/src/import/chips/p9/utils/imageProcs/p9_ringId.C
+++ b/src/import/chips/p9/utils/imageProcs/p9_ringId.C
@@ -30,28 +30,29 @@ namespace PERV
{
const GenRingIdList RING_ID_LIST_COMMON[] =
{
- {"perv_fure" , 0x00, 0x01, 0x01, NON_VPD_RING , 0, 0x0103400F},
- {"perv_gptr" , 0x01, 0x01, 0x01, NON_VPD_RING , 0, 0x01034002},
- {"perv_time" , 0x02, 0x01, 0x01, NON_VPD_RING , 0, 0x01034007},
- {"occ_fure" , 0x03, 0x01, 0x01, NON_VPD_RING , 0, 0x0103080F},
- {"occ_gptr" , 0x04, 0x01, 0x01, NON_VPD_RING , 0, 0x01030802},
- {"occ_time" , 0x05, 0x01, 0x01, NON_VPD_RING , 0, 0x01030807},
- {"perv_ana_func" , 0x06, 0x01, 0x01, NON_VPD_RING , 0, 0x01030400},
- {"perv_ana_gptr" , 0x07, 0x01, 0x01, NON_VPD_RING , 0, 0x01030402},
- {"perv_pll_gptr" , 0x08, 0x01, 0x01, NON_VPD_RING , 0, 0x01030012},
- {"perv_pll_bndy_bucket_1", 0x09, 0x01, 0x01, NON_VPD_PLL_RING, 5, 0x01030018},
- {"perv_pll_bndy_bucket_2", 0x0a, 0x01, 0x01, NON_VPD_PLL_RING, 5, 0x01030018},
- {"perv_pll_bndy_bucket_3", 0x0b, 0x01, 0x01, NON_VPD_PLL_RING, 5, 0x01030018},
- {"perv_pll_bndy_bucket_4", 0x0c, 0x01, 0x01, NON_VPD_PLL_RING, 5, 0x01030018},
- {"perv_pll_bndy_bucket_5", 0x0d, 0x01, 0x01, NON_VPD_PLL_RING, 5, 0x01030018},
- {"perv_pll_func" , 0x0e, 0x01, 0x01, NON_VPD_RING , 0, 0x01030010},
+ {"perv_fure" , 0x00, 0x01, 0x01, NON_VPD_RING, 0, 0x0800000000009000},
+ {"perv_gptr" , 0x01, 0x01, 0x01, NON_VPD_RING, 0, 0x0800000000002000},
+ {"perv_time" , 0x02, 0x01, 0x01, NON_VPD_RING, 0, 0x0800000000000100},
+ {"occ_fure" , 0x03, 0x01, 0x01, NON_VPD_RING, 0, 0x0100000000009000},
+ {"occ_gptr" , 0x04, 0x01, 0x01, NON_VPD_RING, 0, 0x0100000000002000},
+ {"occ_time" , 0x05, 0x01, 0x01, NON_VPD_RING, 0, 0x0100000000000100},
+ {"perv_ana_func" , 0x06, 0x01, 0x01, NON_VPD_RING, 0, 0x0080000000008000},
+ {"perv_ana_gptr" , 0x07, 0x01, 0x01, NON_VPD_RING, 0, 0x0080000000002000},
+ {"perv_pll_gptr" , 0x08, 0x01, 0x01, NON_VPD_RING, 0, 0x0002000000002000},
+ {"perv_pll_bndy_bucket_1" , 0x09, 0x01, 0x01, NON_VPD_PLL_RING, 5, 0x0002000000000080},
+ {"perv_pll_bndy_bucket_2" , 0x0a, 0x01, 0x01, NON_VPD_PLL_RING, 5, 0x0002000000000080},
+ {"perv_pll_bndy_bucket_3" , 0x0b, 0x01, 0x01, NON_VPD_PLL_RING, 5, 0x0002000000000080},
+ {"perv_pll_bndy_bucket_4" , 0x0c, 0x01, 0x01, NON_VPD_PLL_RING, 5, 0x0002000000000080},
+ {"perv_pll_bndy_bucket_5" , 0x0d, 0x01, 0x01, NON_VPD_PLL_RING, 5, 0x0002000000000080},
+ {"perv_pll_func" , 0x0e, 0x01, 0x01, NON_VPD_RING, 0, 0x0002000000008000},
+
};
const GenRingIdList RING_ID_LIST_INSTANCE[] =
{
- {"perv_repr" , 0x0f, 0x01, 0x01, NON_VPD_RING , 0, 0x01034006},
- {"occ_repr" , 0x10, 0x01, 0x01, NON_VPD_RING , 0, 0x01030806},
+ {"perv_repr" , 0x0f, 0x01, 0x01, NON_VPD_RING, 0, 0x0800000000000200},
+ {"occ_repr" , 0x10, 0x01, 0x01, NON_VPD_RING, 0, 0x0100000000000200},
};
-const RingVariantOrder RING_VARIANT_ORDER[] = { BASE, RL, NOT_VALID };
+const RingVariantOrder RING_VARIANT_ORDER[] = { BASE, RL, NOT_VALID};
};
@@ -59,21 +60,21 @@ namespace N0
{
const GenRingIdList RING_ID_LIST_COMMON[] =
{
- {"n0_fure" , 0x00, 0x02, 0x02, NON_VPD_RING , 0, 0x02034E0F},
- {"n0_gptr" , 0x01, 0x02, 0x02, NON_VPD_RING , 0, 0x02034E02},
- {"n0_time" , 0x02, 0x02, 0x02, NON_VPD_RING , 0, 0x02034E07},
- {"n0_nx_fure" , 0x03, 0x02, 0x02, NON_VPD_RING , 0, 0x0203200F},
- {"n0_nx_gptr" , 0x04, 0x02, 0x02, NON_VPD_RING , 0, 0x02032002},
- {"n0_nx_time" , 0x05, 0x02, 0x02, NON_VPD_RING , 0, 0x02032007},
- {"n0_cxa0_fure" , 0x06, 0x02, 0x02, NON_VPD_RING , 0, 0x0203100F},
- {"n0_cxa0_gptr" , 0x07, 0x02, 0x02, NON_VPD_RING , 0, 0x02031007},
- {"n0_cxa0_time" , 0x08, 0x02, 0x02, NON_VPD_RING , 0, 0x02031002},
+ {"n0_fure" , 0x00, 0x02, 0x02, NON_VPD_RING, 0, 0x09C0000000009000},
+ {"n0_gptr" , 0x01, 0x02, 0x02, NON_VPD_RING, 0, 0x09C0000000002000},
+ {"n0_time" , 0x02, 0x02, 0x02, NON_VPD_RING, 0, 0x09C0000000000100},
+ {"n0_nx_fure" , 0x03, 0x02, 0x02, NON_VPD_RING, 0, 0x0400000000009000},
+ {"n0_nx_gptr" , 0x04, 0x02, 0x02, NON_VPD_RING, 0, 0x0400000000002000},
+ {"n0_nx_time" , 0x05, 0x02, 0x02, NON_VPD_RING, 0, 0x0400000000000100},
+ {"n0_cxa0_fure" , 0x06, 0x02, 0x02, NON_VPD_RING, 0, 0x0200000000009000},
+ {"n0_cxa0_gptr" , 0x07, 0x02, 0x02, NON_VPD_RING, 0, 0x0200000000002000},
+ {"n0_cxa0_time" , 0x08, 0x02, 0x02, NON_VPD_RING, 0, 0x0200000000000100},
};
const GenRingIdList RING_ID_LIST_INSTANCE[] =
{
- {"n0_repr" , 0x09, 0x02, 0x02, NON_VPD_RING , 0, 0x02034E06},
- {"n0_nx_repr" , 0x0a, 0x02, 0x02, NON_VPD_RING , 0, 0x02032006},
- {"n0_cxa0_repr" , 0x0b, 0x02, 0x02, NON_VPD_RING , 0, 0x02031006},
+ {"n0_repr" , 0x09, 0x02, 0x02, NON_VPD_RING, 0, 0x09C0000000000200},
+ {"n0_nx_repr" , 0x0a, 0x02, 0x02, NON_VPD_RING, 0, 0x0400000000000200},
+ {"n0_cxa0_repr" , 0x0b, 0x02, 0x02, NON_VPD_RING, 0, 0x0200000000000200},
};
const RingVariantOrder RING_VARIANT_ORDER[] = { BASE, RL, NOT_VALID};
};
@@ -83,25 +84,25 @@ namespace N1
{
const GenRingIdList RING_ID_LIST_COMMON[] =
{
- {"n1_fure" , 0x00, 0x03, 0x03, NON_VPD_RING , 0, 0x0303700F},
- {"n1_gptr" , 0x01, 0x03, 0x03, NON_VPD_RING , 0, 0x03037002},
- {"n1_time" , 0x02, 0x03, 0x03, NON_VPD_RING , 0, 0x03037007},
- {"n1_ioo0_fure" , 0x03, 0x03, 0x03, NON_VPD_RING , 0, 0x0303080F},
- {"n1_ioo0_gptr" , 0x04, 0x03, 0x03, NON_VPD_RING , 0, 0x03030802},
- {"n1_ioo0_time" , 0x05, 0x03, 0x03, NON_VPD_RING , 0, 0x03030807},
- {"n1_ioo1_fure" , 0x06, 0x03, 0x03, NON_VPD_RING , 0, 0x0303040F},
- {"n1_ioo1_gptr" , 0x07, 0x03, 0x03, NON_VPD_RING , 0, 0x03030402},
- {"n1_ioo1_time" , 0x08, 0x03, 0x03, NON_VPD_RING , 0, 0x03030407},
- {"n1_mcs23_fure" , 0x09, 0x03, 0x03, NON_VPD_RING , 0, 0x0303020F},
- {"n1_mcs23_gptr" , 0x0a, 0x03, 0x03, NON_VPD_RING , 0, 0x03030202},
- {"n1_mcs23_time" , 0x0b, 0x03, 0x03, NON_VPD_RING , 0, 0x03030207},
+ {"n1_fure" , 0x00, 0x03, 0x03, NON_VPD_RING, 0, 0x0E00000000009000},
+ {"n1_gptr" , 0x01, 0x03, 0x03, NON_VPD_RING, 0, 0x0E00000000002000},
+ {"n1_time" , 0x02, 0x03, 0x03, NON_VPD_RING, 0, 0x0E00000000000100},
+ {"n1_ioo0_fure" , 0x03, 0x03, 0x03, NON_VPD_RING, 0, 0x0100000000009000},
+ {"n1_ioo0_gptr" , 0x04, 0x03, 0x03, NON_VPD_RING, 0, 0x0100000000002000},
+ {"n1_ioo0_time" , 0x05, 0x03, 0x03, NON_VPD_RING, 0, 0x0100000000000100},
+ {"n1_ioo1_fure" , 0x06, 0x03, 0x03, NON_VPD_RING, 0, 0x0080000000009000},
+ {"n1_ioo1_gptr" , 0x07, 0x03, 0x03, NON_VPD_RING, 0, 0x0080000000002000},
+ {"n1_ioo1_time" , 0x08, 0x03, 0x03, NON_VPD_RING, 0, 0x0080000000000100},
+ {"n1_mcs23_fure" , 0x09, 0x03, 0x03, NON_VPD_RING, 0, 0x0040000000009000},
+ {"n1_mcs23_gptr" , 0x0a, 0x03, 0x03, NON_VPD_RING, 0, 0x0040000000002000},
+ {"n1_mcs23_time" , 0x0b, 0x03, 0x03, NON_VPD_RING, 0, 0x0040000000000100},
};
const GenRingIdList RING_ID_LIST_INSTANCE[] =
{
- {"n1_repr" , 0x0c, 0x03, 0x03, NON_VPD_RING , 0, 0x03037006},
- {"n1_ioo0_repr" , 0x0d, 0x03, 0x03, NON_VPD_RING , 0, 0x03030806},
- {"n1_ioo1_repr" , 0x0e, 0x03, 0x03, NON_VPD_RING , 0, 0x03030406},
- {"n1_mcs23_repr" , 0x0f, 0x03, 0x03, NON_VPD_RING , 0, 0x03030206},
+ {"n1_repr" , 0x0c, 0x03, 0x03, NON_VPD_RING, 0, 0x0E00000000000200},
+ {"n1_ioo0_repr" , 0x0d, 0x03, 0x03, NON_VPD_RING, 0, 0x0100000000000200},
+ {"n1_ioo1_repr" , 0x0e, 0x03, 0x03, NON_VPD_RING, 0, 0x0080000000000200},
+ {"n1_mcs23_repr" , 0x0f, 0x03, 0x03, NON_VPD_RING, 0, 0x0040000000000200},
};
const RingVariantOrder RING_VARIANT_ORDER[] = { BASE, RL, NOT_VALID};
};
@@ -111,23 +112,23 @@ namespace N2
{
const GenRingIdList RING_ID_LIST_COMMON[] =
{
- {"n2_fure" , 0x00, 0x04, 0x04, NON_VPD_RING , 0, 0x04035C0F},
- {"n2_gptr" , 0x01, 0x04, 0x04, NON_VPD_RING , 0, 0x04035C02},
- {"n2_time" , 0x02, 0x04, 0x04, NON_VPD_RING , 0, 0x04035C07},
- {"n2_cxa1_fure" , 0x03, 0x04, 0x04, NON_VPD_RING , 0, 0x0403020F},
- {"n2_cxa1_gptr" , 0x04, 0x04, 0x04, NON_VPD_RING , 0, 0x04030202},
- {"n2_cxa1_time" , 0x05, 0x04, 0x04, NON_VPD_RING , 0, 0x04030207},
- {"n2_psi_fure" , 0x06, 0x04, 0x04, NON_VPD_RING , 0, 0x0403200F},
- {"n2_psi_gptr" , 0x07, 0x04, 0x04, NON_VPD_RING , 0, 0x04032002},
- {"n2_psi_time" , 0x08, 0x04, 0x04, NON_VPD_RING , 0, 0x04032007},
+ {"n2_fure" , 0x00, 0x04, 0x04, NON_VPD_RING, 0, 0x0B80000000009000},
+ {"n2_gptr" , 0x01, 0x04, 0x04, NON_VPD_RING, 0, 0x0B80000000002000},
+ {"n2_time" , 0x02, 0x04, 0x04, NON_VPD_RING, 0, 0x0B80000000000100},
+ {"n2_cxa1_fure" , 0x03, 0x04, 0x04, NON_VPD_RING, 0, 0x0400000000009000},
+ {"n2_cxa1_gptr" , 0x04, 0x04, 0x04, NON_VPD_RING, 0, 0x0400000000002000},
+ {"n2_cxa1_time" , 0x05, 0x04, 0x04, NON_VPD_RING, 0, 0x0400000000000100},
+ {"n2_psi_fure" , 0x06, 0x04, 0x04, NON_VPD_RING, 0, 0x0040000000009000},
+ {"n2_psi_gptr" , 0x07, 0x04, 0x04, NON_VPD_RING, 0, 0x0040000000002000},
+ {"n2_psi_time" , 0x08, 0x04, 0x04, NON_VPD_RING, 0, 0x0040000000000100},
};
const GenRingIdList RING_ID_LIST_INSTANCE[] =
{
- {"n2_repr" , 0x09, 0x04, 0x04, NON_VPD_RING , 0, 0x04035C06},
- {"n2_cxa1_repr" , 0x0a, 0x04, 0x04, NON_VPD_RING , 0, 0x04030206},
- {"n2_psi_repr" , 0x0b, 0x04, 0x04, NON_VPD_RING , 0, 0x04032006},
+ {"n2_repr" , 0x09, 0x04, 0x04, NON_VPD_RING, 0, 0x0B80000000000200},
+ {"n2_cxa1_repr" , 0x0a, 0x04, 0x04, NON_VPD_RING, 0, 0x0400000000000200},
+ {"n2_psi_repr" , 0x0b, 0x04, 0x04, NON_VPD_RING, 0, 0x0040000000000200},
};
-const RingVariantOrder RING_VARIANT_ORDER[] = { BASE, RL, NOT_VALID };
+const RingVariantOrder RING_VARIANT_ORDER[] = { BASE, RL, NOT_VALID};
};
@@ -135,23 +136,23 @@ namespace N3
{
const GenRingIdList RING_ID_LIST_COMMON[] =
{
- {"n3_fure" , 0x00, 0x05, 0x05, NON_VPD_RING , 0, 0x0503660F},
- {"n3_gptr" , 0x01, 0x05, 0x05, NON_VPD_RING , 0, 0x05037602},
- {"n3_time" , 0x02, 0x05, 0x05, NON_VPD_RING , 0, 0x05037607},
- {"n3_mcs01_fure" , 0x03, 0x05, 0x05, NON_VPD_RING , 0, 0x0503010F},
- {"n3_mcs01_gptr" , 0x04, 0x05, 0x05, NON_VPD_RING , 0, 0x05030102},
- {"n3_mcs01_time" , 0x05, 0x05, 0x05, NON_VPD_RING , 0, 0x05030107},
- {"n3_np_fure" , 0x06, 0x05, 0x05, NON_VPD_RING , 0, 0x0503080F},
- {"n3_np_gptr" , 0x07, 0x05, 0x05, NON_VPD_RING , 0, 0x05030802},
- {"n3_np_time" , 0x08, 0x05, 0x05, NON_VPD_RING , 0, 0x05030807},
+ {"n3_fure" , 0x00, 0x05, 0x05, NON_VPD_RING, 0, 0x0CC0000000009000},
+ {"n3_gptr" , 0x01, 0x05, 0x05, NON_VPD_RING, 0, 0x0EC0000000002000},
+ {"n3_time" , 0x02, 0x05, 0x05, NON_VPD_RING, 0, 0x0EC0000000000100},
+ {"n3_mcs01_fure" , 0x03, 0x05, 0x05, NON_VPD_RING, 0, 0x0020000000009000},
+ {"n3_mcs01_gptr" , 0x04, 0x05, 0x05, NON_VPD_RING, 0, 0x0020000000002000},
+ {"n3_mcs01_time" , 0x05, 0x05, 0x05, NON_VPD_RING, 0, 0x0020000000000100},
+ {"n3_np_fure" , 0x06, 0x05, 0x05, NON_VPD_RING, 0, 0x0100000000009000},
+ {"n3_np_gptr" , 0x07, 0x05, 0x05, NON_VPD_RING, 0, 0x0100000000002000},
+ {"n3_np_time" , 0x08, 0x05, 0x05, NON_VPD_RING, 0, 0x0100000000000100},
};
const GenRingIdList RING_ID_LIST_INSTANCE[] =
{
- {"n3_repr" , 0x09, 0x05, 0x05, NON_VPD_RING , 0, 0x05037606},
- {"n3_mcs01_repr" , 0x0a, 0x05, 0x05, NON_VPD_RING , 0, 0x05030106},
- {"n3_np_repr" , 0x0b, 0x05, 0x05, NON_VPD_RING , 0, 0x05030806},
+ {"n3_repr" , 0x09, 0x05, 0x05, NON_VPD_RING, 0, 0x0EC0000000000200},
+ {"n3_mcs01_repr" , 0x0a, 0x05, 0x05, NON_VPD_RING, 0, 0x0020000000000200},
+ {"n3_np_repr" , 0x0b, 0x05, 0x05, NON_VPD_RING, 0, 0x0100000000000200},
};
-const RingVariantOrder RING_VARIANT_ORDER[] = { BASE, RL, NOT_VALID };
+const RingVariantOrder RING_VARIANT_ORDER[] = { BASE, RL, NOT_VALID};
};
@@ -159,30 +160,30 @@ namespace XB
{
const GenRingIdList RING_ID_LIST_COMMON[] =
{
- {"xb_fure" , 0x00, 0x06, 0x06, NON_VPD_RING , 0, 0x0603440F},
- {"xb_gptr" , 0x01, 0x06, 0x06, NON_VPD_RING , 0, 0x06034402},
- {"xb_time" , 0x02, 0x06, 0x06, NON_VPD_RING , 0, 0x06034407},
- {"xb_io0_fure" , 0x03, 0x06, 0x06, NON_VPD_RING , 0, 0x0603220F},
- {"xb_io0_gptr" , 0x04, 0x06, 0x06, NON_VPD_RING , 0, 0x06032202},
- {"xb_io0_time" , 0x05, 0x06, 0x06, NON_VPD_RING , 0, 0x06032207},
- {"xb_io1_fure" , 0x06, 0x06, 0x06, NON_VPD_RING , 0, 0x0603110F},
- {"xb_io1_gptr" , 0x07, 0x06, 0x06, NON_VPD_RING , 0, 0x06031102},
- {"xb_io1_time" , 0x08, 0x06, 0x06, NON_VPD_RING , 0, 0x06031107},
- {"xb_io2_fure" , 0x09, 0x06, 0x06, NON_VPD_RING , 0, 0x0603088F},
- {"xb_io2_gptr" , 0x0a, 0x06, 0x06, NON_VPD_RING , 0, 0x06030882},
- {"xb_io2_time" , 0x0b, 0x06, 0x06, NON_VPD_RING , 0, 0x06030887},
- {"xb_pll_gptr" , 0x0c, 0x06, 0x06, NON_VPD_RING , 0, 0x06030012},
- {"xb_pll_bndy" , 0x0d, 0x06, 0x06, NON_VPD_RING , 0, 0x06030018},
- {"xb_pll_func" , 0x0e, 0x06, 0x06, NON_VPD_RING , 0, 0x06030010},
+ {"xb_fure" , 0x00, 0x06, 0x06, NON_VPD_RING, 0, 0x0880000000009000},
+ {"xb_gptr" , 0x01, 0x06, 0x06, NON_VPD_RING, 0, 0x0880000000002000},
+ {"xb_time" , 0x02, 0x06, 0x06, NON_VPD_RING, 0, 0x0880000000000100},
+ {"xb_io0_fure" , 0x03, 0x06, 0x06, NON_VPD_RING, 0, 0x0440000000009000},
+ {"xb_io0_gptr" , 0x04, 0x06, 0x06, NON_VPD_RING, 0, 0x0440000000002000},
+ {"xb_io0_time" , 0x05, 0x06, 0x06, NON_VPD_RING, 0, 0x0440000000000100},
+ {"xb_io1_fure" , 0x06, 0x06, 0x06, NON_VPD_RING, 0, 0x0220000000009000},
+ {"xb_io1_gptr" , 0x07, 0x06, 0x06, NON_VPD_RING, 0, 0x0220000000002000},
+ {"xb_io1_time" , 0x08, 0x06, 0x06, NON_VPD_RING, 0, 0x0220000000000100},
+ {"xb_io2_fure" , 0x09, 0x06, 0x06, NON_VPD_RING, 0, 0x0110000000009000},
+ {"xb_io2_gptr" , 0x0a, 0x06, 0x06, NON_VPD_RING, 0, 0x0110000000002000},
+ {"xb_io2_time" , 0x0b, 0x06, 0x06, NON_VPD_RING, 0, 0x0110000000000100},
+ {"xb_pll_gptr" , 0x0c, 0x06, 0x06, NON_VPD_RING, 0, 0x0002000000002000},
+ {"xb_pll_bndy" , 0x0d, 0x06, 0x06, NON_VPD_RING, 0, 0x0002000000000080},
+ {"xb_pll_func" , 0x0e, 0x06, 0x06, NON_VPD_RING, 0, 0x0002000000008000},
};
const GenRingIdList RING_ID_LIST_INSTANCE[] =
{
- {"xb_repr" , 0x13, 0x06, 0x06, NON_VPD_RING , 0, 0x06034406},
- {"xb_io0_repr" , 0x14, 0x06, 0x06, NON_VPD_RING , 0, 0x06032206},
- {"xb_io1_repr" , 0x15, 0x06, 0x06, NON_VPD_RING , 0, 0x06031106},
- {"xb_io2_repr" , 0x16, 0x06, 0x06, NON_VPD_RING , 0, 0x06030886},
+ {"xb_repr" , 0x13, 0x06, 0x06, NON_VPD_RING, 0, 0x0880000000000200},
+ {"xb_io0_repr" , 0x14, 0x06, 0x06, NON_VPD_RING, 0, 0x0440000000000200},
+ {"xb_io1_repr" , 0x15, 0x06, 0x06, NON_VPD_RING, 0, 0x0220000000000200},
+ {"xb_io2_repr" , 0x16, 0x06, 0x06, NON_VPD_RING, 0, 0x0110000000000200},
};
-const RingVariantOrder RING_VARIANT_ORDER[] = { BASE, RL, NOT_VALID };
+const RingVariantOrder RING_VARIANT_ORDER[] = { BASE, RL, NOT_VALID};
};
@@ -190,30 +191,30 @@ namespace MC
{
const GenRingIdList RING_ID_LIST_COMMON[] =
{
- {"mc_fure" , 0x00, 0x07, 0x07, NON_VPD_RING, 0, 0x0703600F},
- {"mc_gptr" , 0x01, 0x07, 0x07, NON_VPD_RING, 0, 0x07036002},
- {"mc_time" , 0x02, 0x07, 0x07, NON_VPD_RING, 0, 0x07036007},
- {"mc_iom01_fure" , 0x03, 0x07, 0x07, NON_VPD_RING, 0, 0x0703100F},
- {"mc_iom01_gptr" , 0x04, 0x07, 0x07, NON_VPD_RING, 0, 0x07031002},
- {"mc_iom01_time" , 0x05, 0x07, 0x07, NON_VPD_RING, 0, 0x07031007},
- {"mc_iom23_fure" , 0x06, 0x07, 0x07, NON_VPD_RING, 0, 0x0703080F},
- {"mc_iom23_gptr" , 0x07, 0x07, 0x07, NON_VPD_RING, 0, 0x07030802},
- {"mc_iom23_time" , 0x08, 0x07, 0x07, NON_VPD_RING, 0, 0x07030807},
- {"mc_pll_gptr" , 0x09, 0x07, 0x07, NON_VPD_RING, 0, 0x07030012},
- {"mc_pll_bndy_bucket_1", 0x0a, 0x07, 0x07, NON_VPD_PLL_RING, 0, 0x07030018},
- {"mc_pll_bndy_bucket_2", 0x0b, 0x07, 0x07, NON_VPD_PLL_RING, 0, 0x07030018},
- {"mc_pll_bndy_bucket_3", 0x0c, 0x07, 0x07, NON_VPD_PLL_RING, 0, 0x07030018},
- {"mc_pll_bndy_bucket_4", 0x0d, 0x07, 0x07, NON_VPD_PLL_RING, 0, 0x07030018},
- {"mc_pll_bndy_bucket_5", 0x0e, 0x07, 0x07, NON_VPD_PLL_RING, 0, 0x07030018},
- {"mc_pll_func" , 0x0f, 0x07, 0x07, NON_VPD_RING, 0, 0x07030010},
+ {"mc_fure" , 0x00, 0x07, 0x07, NON_VPD_RING, 0, 0x0C00000000009000},
+ {"mc_gptr" , 0x01, 0x07, 0x07, NON_VPD_RING, 0, 0x0C00000000002000},
+ {"mc_time" , 0x02, 0x07, 0x07, NON_VPD_RING, 0, 0x0C00000000000100},
+ {"mc_iom01_fure" , 0x03, 0x07, 0x07, NON_VPD_RING, 0, 0x0200000000009000},
+ {"mc_iom01_gptr" , 0x04, 0x07, 0x07, NON_VPD_RING, 0, 0x0200000000002000},
+ {"mc_iom01_time" , 0x05, 0x07, 0x07, NON_VPD_RING, 0, 0x0200000000000100},
+ {"mc_iom23_fure" , 0x06, 0x07, 0x07, NON_VPD_RING, 0, 0x0100000000009000},
+ {"mc_iom23_gptr" , 0x07, 0x07, 0x07, NON_VPD_RING, 0, 0x0100000000002000},
+ {"mc_iom23_time" , 0x08, 0x07, 0x07, NON_VPD_RING, 0, 0x0100000000000100},
+ {"mc_pll_gptr" , 0x09, 0x07, 0x07, NON_VPD_RING, 0, 0x0002000000002000},
+ {"mc_pll_bndy_bucket_1" , 0x0a, 0x07, 0x07, NON_VPD_PLL_RING, 0, 0x0002000000000080},
+ {"mc_pll_bndy_bucket_2" , 0x0b, 0x07, 0x07, NON_VPD_PLL_RING, 0, 0x0002000000000080},
+ {"mc_pll_bndy_bucket_3" , 0x0c, 0x07, 0x07, NON_VPD_PLL_RING, 0, 0x0002000000000080},
+ {"mc_pll_bndy_bucket_4" , 0x0d, 0x07, 0x07, NON_VPD_PLL_RING, 0, 0x0002000000000080},
+ {"mc_pll_bndy_bucket_5" , 0x0e, 0x07, 0x07, NON_VPD_PLL_RING, 0, 0x0002000000000080},
+ {"mc_pll_func" , 0x0f, 0x07, 0x07, NON_VPD_RING, 0, 0x0002000000008000},
};
const GenRingIdList RING_ID_LIST_INSTANCE[] =
{
- {"mc_repr" , 0x10, 0x07, 0x08, NON_VPD_RING , 0, 0x07036006},
- {"mc_iom01_repr" , 0x11, 0x07, 0x08, NON_VPD_RING , 0, 0x07031006},
- {"mc_iom23_repr" , 0x12, 0x07, 0x08, NON_VPD_RING , 0, 0x07030806},
+ {"mc_repr" , 0x10, 0x07, 0x08, NON_VPD_RING, 0, 0x0C00000000000200},
+ {"mc_iom01_repr" , 0x11, 0x07, 0x08, NON_VPD_RING, 0, 0x0200000000000200},
+ {"mc_iom23_repr" , 0x12, 0x07, 0x08, NON_VPD_RING, 0, 0x0100000000000200},
};
-const RingVariantOrder RING_VARIANT_ORDER[] = { BASE, RL, NOT_VALID };
+const RingVariantOrder RING_VARIANT_ORDER[] = { BASE, RL, NOT_VALID};
};
@@ -221,18 +222,18 @@ namespace OB0
{
const GenRingIdList RING_ID_LIST_COMMON[] =
{
- {"ob0_fure" , 0x00, 0x09, 0x09, NON_VPD_RING , 0, 0x0903700F},
- {"ob0_gptr" , 0x01, 0x09, 0x09, NON_VPD_RING , 0, 0x09037002},
- {"ob0_time" , 0x02, 0x09, 0x09, NON_VPD_RING , 0, 0x09037007},
- {"ob0_pll_gptr" , 0x03, 0x09, 0x09, NON_VPD_RING , 0, 0x09030012},
- {"ob0_pll_bndy" , 0x04, 0x09, 0x09, NON_VPD_RING , 0, 0x09030018},
- {"ob0_pll_func" , 0x05, 0x09, 0x09, NON_VPD_RING , 0, 0x09030010},
+ {"ob0_fure" , 0x00, 0x09, 0x09, NON_VPD_RING, 0, 0x0E00000000009000},
+ {"ob0_gptr" , 0x01, 0x09, 0x09, NON_VPD_RING, 0, 0x0E00000000002000},
+ {"ob0_time" , 0x02, 0x09, 0x09, NON_VPD_RING, 0, 0x0E00000000000100},
+ {"ob0_pll_gptr" , 0x03, 0x09, 0x09, NON_VPD_RING, 0, 0x0002000000002000},
+ {"ob0_pll_bndy" , 0x04, 0x09, 0x09, NON_VPD_RING, 0, 0x0002000000000080},
+ {"ob0_pll_func" , 0x05, 0x09, 0x09, NON_VPD_RING, 0, 0x0002000000008000},
};
const GenRingIdList RING_ID_LIST_INSTANCE[] =
{
- {"ob0_repr" , 0x0a, 0x09, 0x09, NON_VPD_RING , 0, 0x09037006},
+ {"ob0_repr" , 0x0a, 0x09, 0x09, NON_VPD_RING, 0, 0x0E00000000000200},
};
-const RingVariantOrder RING_VARIANT_ORDER[] = { BASE, RL, NOT_VALID };
+const RingVariantOrder RING_VARIANT_ORDER[] = { BASE, RL, NOT_VALID};
};
@@ -240,18 +241,18 @@ namespace OB1
{
const GenRingIdList RING_ID_LIST_COMMON[] =
{
- {"ob1_fure" , 0x00, 0x0a, 0x0a, NON_VPD_RING , 0, 0x0A03700F},
- {"ob1_gptr" , 0x01, 0x0a, 0x0a, NON_VPD_RING , 0, 0x0A037002},
- {"ob1_time" , 0x02, 0x0a, 0x0a, NON_VPD_RING , 0, 0x0A037007},
- {"ob1_pll_gptr" , 0x03, 0x0a, 0x0a, NON_VPD_RING , 0, 0x0A030012},
- {"ob1_pll_bndy" , 0x04, 0x0a, 0x0a, NON_VPD_RING , 0, 0x0A030018},
- {"ob1_pll_func" , 0x05, 0x0a, 0x0a, NON_VPD_RING , 0, 0x0A030010},
+ {"ob1_fure" , 0x00, 0x0a, 0x0a, NON_VPD_RING, 0, 0x0E00000000009000},
+ {"ob1_gptr" , 0x01, 0x0a, 0x0a, NON_VPD_RING, 0, 0x0E00000000002000},
+ {"ob1_time" , 0x02, 0x0a, 0x0a, NON_VPD_RING, 0, 0x0E00000000000100},
+ {"ob1_pll_gptr" , 0x03, 0x0a, 0x0a, NON_VPD_RING, 0, 0x0002000000002000},
+ {"ob1_pll_bndy" , 0x04, 0x0a, 0x0a, NON_VPD_RING, 0, 0x0002000000000080},
+ {"ob1_pll_func" , 0x05, 0x0a, 0x0a, NON_VPD_RING, 0, 0x0002000000008000},
};
const GenRingIdList RING_ID_LIST_INSTANCE[] =
{
- {"ob1_repr" , 0x0a, 0x0a, 0x0a, NON_VPD_RING , 0, 0x0A037006},
+ {"ob1_repr" , 0x0a, 0x0a, 0x0a, NON_VPD_RING, 0, 0x0E00000000000200},
};
-const RingVariantOrder RING_VARIANT_ORDER[] = { BASE, RL, NOT_VALID };
+const RingVariantOrder RING_VARIANT_ORDER[] = { BASE, RL, NOT_VALID};
};
@@ -259,18 +260,18 @@ namespace OB2
{
const GenRingIdList RING_ID_LIST_COMMON[] =
{
- {"ob2_fure" , 0x00, 0x0b, 0x0b, NON_VPD_RING , 0, 0x0B03700F},
- {"ob2_gptr" , 0x01, 0x0b, 0x0b, NON_VPD_RING , 0, 0x0B037002},
- {"ob2_time" , 0x02, 0x0b, 0x0b, NON_VPD_RING , 0, 0x0B037007},
- {"ob2_pll_gptr" , 0x03, 0x0b, 0x0b, NON_VPD_RING , 0, 0x0B030012},
- {"ob2_pll_bndy" , 0x04, 0x0b, 0x0b, NON_VPD_RING , 0, 0x0B030018},
- {"ob2_pll_func" , 0x05, 0x0b, 0x0b, NON_VPD_RING , 0, 0x0B030010},
+ {"ob2_fure" , 0x00, 0x0b, 0x0b, NON_VPD_RING, 0, 0x0E00000000009000},
+ {"ob2_gptr" , 0x01, 0x0b, 0x0b, NON_VPD_RING, 0, 0x0E00000000002000},
+ {"ob2_time" , 0x02, 0x0b, 0x0b, NON_VPD_RING, 0, 0x0E00000000000100},
+ {"ob2_pll_gptr" , 0x03, 0x0b, 0x0b, NON_VPD_RING, 0, 0x0002000000002000},
+ {"ob2_pll_bndy" , 0x04, 0x0b, 0x0b, NON_VPD_RING, 0, 0x0002000000000080},
+ {"ob2_pll_func" , 0x05, 0x0b, 0x0b, NON_VPD_RING, 0, 0x0002000000008000},
};
const GenRingIdList RING_ID_LIST_INSTANCE[] =
{
- {"ob2_repr" , 0x0a, 0x0b, 0x0b, NON_VPD_RING , 0, 0x0B037006},
+ {"ob2_repr" , 0x0a, 0x0b, 0x0b, NON_VPD_RING, 0, 0x0E00000000000200},
};
-const RingVariantOrder RING_VARIANT_ORDER[] = { BASE, RL, NOT_VALID };
+const RingVariantOrder RING_VARIANT_ORDER[] = { BASE, RL, NOT_VALID};
};
@@ -278,18 +279,18 @@ namespace OB3
{
const GenRingIdList RING_ID_LIST_COMMON[] =
{
- {"ob3_fure" , 0x00, 0x0c, 0x0c, NON_VPD_RING , 0, 0x0C03700F},
- {"ob3_gptr" , 0x01, 0x0c, 0x0c, NON_VPD_RING , 0, 0x0C037002},
- {"ob3_time" , 0x02, 0x0c, 0x0c, NON_VPD_RING , 0, 0x0C037007},
- {"ob3_pll_gptr" , 0x03, 0x0c, 0x0c, NON_VPD_RING , 0, 0x0C030012},
- {"ob3_pll_bndy" , 0x04, 0x0c, 0x0c, NON_VPD_RING , 0, 0x0C030018},
- {"ob3_pll_func" , 0x05, 0x0c, 0x0c, NON_VPD_RING , 0, 0x0C030010},
+ {"ob3_fure" , 0x00, 0x0c, 0x0c, NON_VPD_RING, 0, 0x0E00000000009000},
+ {"ob3_gptr" , 0x01, 0x0c, 0x0c, NON_VPD_RING, 0, 0x0E00000000002000},
+ {"ob3_time" , 0x02, 0x0c, 0x0c, NON_VPD_RING, 0, 0x0E00000000000100},
+ {"ob3_pll_gptr" , 0x03, 0x0c, 0x0c, NON_VPD_RING, 0, 0x0002000000002000},
+ {"ob3_pll_bndy" , 0x04, 0x0c, 0x0c, NON_VPD_RING, 0, 0x0002000000000080},
+ {"ob3_pll_func" , 0x05, 0x0c, 0x0c, NON_VPD_RING, 0, 0x0002000000008000},
};
const GenRingIdList RING_ID_LIST_INSTANCE[] =
{
- {"ob3_repr" , 0x0a, 0x0c, 0x0c, NON_VPD_RING , 0, 0x0C037006},
+ {"ob3_repr" , 0x0a, 0x0c, 0x0c, NON_VPD_RING, 0, 0x0E00000000000200},
};
-const RingVariantOrder RING_VARIANT_ORDER[] = { BASE, RL, NOT_VALID };
+const RingVariantOrder RING_VARIANT_ORDER[] = { BASE, RL, NOT_VALID};
};
@@ -297,17 +298,17 @@ namespace PCI0
{
const GenRingIdList RING_ID_LIST_COMMON[] =
{
- {"pci0_fure" , 0x00, 0x0d, 0x0d, NON_VPD_RING , 0, 0x0D03700F},
- {"pci0_gptr" , 0x01, 0x0d, 0x0d, NON_VPD_RING , 0, 0x0D037002},
- {"pci0_time" , 0x02, 0x0d, 0x0d, NON_VPD_RING , 0, 0x0D037007},
- {"pci0_pll_bndy" , 0x03, 0x0d, 0x0d, NON_VPD_RING , 0, 0x0D030018},
- {"pci0_pll_gptr" , 0x04, 0x0d, 0x0d, NON_VPD_RING , 0, 0x0D030012},
+ {"pci0_fure" , 0x00, 0x0d, 0x0d, NON_VPD_RING, 0, 0x0E00000000009000},
+ {"pci0_gptr" , 0x01, 0x0d, 0x0d, NON_VPD_RING, 0, 0x0E00000000002000},
+ {"pci0_time" , 0x02, 0x0d, 0x0d, NON_VPD_RING, 0, 0x0E00000000000100},
+ {"pci0_pll_bndy" , 0x03, 0x0d, 0x0d, NON_VPD_RING, 0, 0x0002000000000080},
+ {"pci0_pll_gptr" , 0x04, 0x0d, 0x0d, NON_VPD_RING, 0, 0x0002000000002000},
};
const GenRingIdList RING_ID_LIST_INSTANCE[] =
{
- {"pci0_repr" , 0x05, 0x0d, 0x0d, NON_VPD_RING , 0, 0x0D03700F},
+ {"pci0_repr" , 0x05, 0x0d, 0x0d, NON_VPD_RING, 0, 0x0E00000000000200},
};
-const RingVariantOrder RING_VARIANT_ORDER[] = { BASE, RL, NOT_VALID };
+const RingVariantOrder RING_VARIANT_ORDER[] = { BASE, RL, NOT_VALID};
};
@@ -315,17 +316,17 @@ namespace PCI1
{
const GenRingIdList RING_ID_LIST_COMMON[] =
{
- {"pci1_fure" , 0x00, 0x0e, 0x0e, NON_VPD_RING , 0, 0x0E03700F},
- {"pci1_gptr" , 0x01, 0x0e, 0x0e, NON_VPD_RING , 0, 0x0E037002},
- {"pci1_time" , 0x02, 0x0e, 0x0e, NON_VPD_RING , 0, 0x0E037007},
- {"pci1_pll_bndy" , 0x03, 0x0e, 0x0e, NON_VPD_RING , 0, 0x0E030018},
- {"pci1_pll_gptr" , 0x04, 0x0e, 0x0e, NON_VPD_RING , 0, 0x0E030012},
+ {"pci1_fure" , 0x00, 0x0e, 0x0e, NON_VPD_RING, 0, 0x0F00000000009000},
+ {"pci1_gptr" , 0x01, 0x0e, 0x0e, NON_VPD_RING, 0, 0x0F00000000002000},
+ {"pci1_time" , 0x02, 0x0e, 0x0e, NON_VPD_RING, 0, 0x0F00000000000100},
+ {"pci1_pll_bndy" , 0x03, 0x0e, 0x0e, NON_VPD_RING, 0, 0x0002000000000080},
+ {"pci1_pll_gptr" , 0x04, 0x0e, 0x0e, NON_VPD_RING, 0, 0x0002000000002000},
};
const GenRingIdList RING_ID_LIST_INSTANCE[] =
{
- {"pci1_repr" , 0x05, 0x0e, 0x0e, NON_VPD_RING , 0, 0x0E03700F},
+ {"pci1_repr" , 0x05, 0x0e, 0x0e, NON_VPD_RING, 0, 0x0F00000000000200},
};
-const RingVariantOrder RING_VARIANT_ORDER[] = { BASE, RL, NOT_VALID };
+const RingVariantOrder RING_VARIANT_ORDER[] = { BASE, RL, NOT_VALID};
};
@@ -333,17 +334,17 @@ namespace PCI2
{
const GenRingIdList RING_ID_LIST_COMMON[] =
{
- {"pci2_fure" , 0x00, 0x0f, 0x0f, NON_VPD_RING , 0, 0x0F03700F},
- {"pci2_gptr" , 0x01, 0x0f, 0x0f, NON_VPD_RING , 0, 0x0F037002},
- {"pci2_time" , 0x02, 0x0f, 0x0f, NON_VPD_RING , 0, 0x0F037007},
- {"pci2_pll_bndy" , 0x03, 0x0f, 0x0f, NON_VPD_RING , 0, 0x0F030018},
- {"pci2_pll_gptr" , 0x04, 0x0f, 0x0f, NON_VPD_RING , 0, 0x0F030012},
+ {"pci2_fure" , 0x00, 0x0f, 0x0f, NON_VPD_RING, 0, 0x0F80000000009000},
+ {"pci2_gptr" , 0x01, 0x0f, 0x0f, NON_VPD_RING, 0, 0x0F80000000002000},
+ {"pci2_time" , 0x02, 0x0f, 0x0f, NON_VPD_RING, 0, 0x0F80000000000100},
+ {"pci2_pll_bndy" , 0x03, 0x0f, 0x0f, NON_VPD_RING, 0, 0x0002000000000080},
+ {"pci2_pll_gptr" , 0x04, 0x0f, 0x0f, NON_VPD_RING, 0, 0x0002000000002000},
};
const GenRingIdList RING_ID_LIST_INSTANCE[] =
{
- {"pci2_repr" , 0x05, 0x0F, 0x0F, NON_VPD_RING , 0, 0x0F03700F},
+ {"pci2_repr" , 0x05, 0x0F, 0x0F, NON_VPD_RING, 0, 0x0F80000000000200},
};
-const RingVariantOrder RING_VARIANT_ORDER[] = { BASE, RL, NOT_VALID };
+const RingVariantOrder RING_VARIANT_ORDER[] = { BASE, RL, NOT_VALID};
};
@@ -351,64 +352,64 @@ namespace EQ
{
const GenRingIdList RING_ID_LIST_COMMON[] =
{
- {"eq_fure" , 0x00, 0x10, 0x10, NON_VPD_RING, 0, 0x1003608F},
- {"eq_gptr" , 0x01, 0x10, 0x10, NON_VPD_RING, 0, 0x10036082},
- {"eq_time" , 0x02, 0x10, 0x10, NON_VPD_RING, 0, 0x10036087},
- {"eq_mode" , 0x03, 0x10, 0x10, NON_VPD_RING, 0, 0x10036081},
- {"ex_l3_fure" , 0x04, 0x10, 0x10, NON_VPD_RING, 0, 0x1003100F},
- {"ex_l3_gptr" , 0x05, 0x10, 0x10, NON_VPD_RING, 0, 0x10031002},
- {"ex_l3_time" , 0x06, 0x10, 0x10, NON_VPD_RING, 0, 0x10031007},
- {"ex_l2_mode" , 0x07, 0x10, 0x10, NON_VPD_RING, 0, 0x10030401},
- {"ex_l2_fure" , 0x08, 0x10, 0x10, NON_VPD_RING, 0, 0x1003040F},
- {"ex_l2_gptr" , 0x09, 0x10, 0x10, NON_VPD_RING, 0, 0x10030402},
- {"ex_l2_time" , 0x0a, 0x10, 0x10, NON_VPD_RING, 0, 0x10030407},
- {"ex_l3_refr_fure" , 0x0b, 0x10, 0x10, NON_VPD_RING, 0, 0x1003004F},
- {"ex_l3_refr_gptr" , 0x0c, 0x10, 0x10, NON_VPD_RING, 0, 0x10030042},
- {"eq_ana_func" , 0x0d, 0x10, 0x10, NON_VPD_RING, 0, 0x10030100},
- {"eq_ana_gptr" , 0x0e, 0x10, 0x10, NON_VPD_RING, 0, 0x10030102},
- {"eq_dpll_func" , 0x0f, 0x10, 0x10, NON_VPD_RING, 0, 0x10030010},
- {"eq_dpll_gptr" , 0x10, 0x10, 0x10, NON_VPD_RING, 0, 0x10030012},
- {"eq_dpll_mode" , 0x11, 0x10, 0x10, NON_VPD_RING, 0, 0x10030011},
- {"eq_ana_bndy_bucket_0" , 0x12, 0x10, 0x10, NON_VPD_RING, 0, 0x10030108},
- {"eq_ana_bndy_bucket_1" , 0x13, 0x10, 0x10, NON_VPD_RING, 0, 0x10030108},
- {"eq_ana_bndy_bucket_2" , 0x14, 0x10, 0x10, NON_VPD_RING, 0, 0x10030108},
- {"eq_ana_bndy_bucket_3" , 0x15, 0x10, 0x10, NON_VPD_RING, 0, 0x10030108},
- {"eq_ana_bndy_bucket_4" , 0x16, 0x10, 0x10, NON_VPD_RING, 0, 0x10030108},
- {"eq_ana_bndy_bucket_5" , 0x17, 0x10, 0x10, NON_VPD_RING, 0, 0x10030108},
- {"eq_ana_bndy_bucket_6" , 0x18, 0x10, 0x10, NON_VPD_RING, 0, 0x10030108},
- {"eq_ana_bndy_bucket_7" , 0x19, 0x10, 0x10, NON_VPD_RING, 0, 0x10030108},
- {"eq_ana_bndy_bucket_8" , 0x1a, 0x10, 0x10, NON_VPD_RING, 0, 0x10030108},
- {"eq_ana_bndy_bucket_9" , 0x1b, 0x10, 0x10, NON_VPD_RING, 0, 0x10030108},
- {"eq_ana_bndy_bucket_10" , 0x1c, 0x10, 0x10, NON_VPD_RING, 0, 0x10030108},
- {"eq_ana_bndy_bucket_11" , 0x1d, 0x10, 0x10, NON_VPD_RING, 0, 0x10030108},
- {"eq_ana_bndy_bucket_12" , 0x1e, 0x10, 0x10, NON_VPD_RING, 0, 0x10030108},
- {"eq_ana_bndy_bucket_13" , 0x1f, 0x10, 0x10, NON_VPD_RING, 0, 0x10030108},
- {"eq_ana_bndy_bucket_14" , 0x20, 0x10, 0x10, NON_VPD_RING, 0, 0x10030108},
- {"eq_ana_bndy_bucket_15" , 0x21, 0x10, 0x10, NON_VPD_RING, 0, 0x10030108},
- {"eq_ana_bndy_bucket_16" , 0x22, 0x10, 0x10, NON_VPD_RING, 0, 0x10030108},
- {"eq_ana_bndy_bucket_17" , 0x23, 0x10, 0x10, NON_VPD_RING, 0, 0x10030108},
- {"eq_ana_bndy_bucket_18" , 0x24, 0x10, 0x10, NON_VPD_RING, 0, 0x10030108},
- {"eq_ana_bndy_bucket_19" , 0x25, 0x10, 0x10, NON_VPD_RING, 0, 0x10030108},
- {"eq_ana_bndy_bucket_20" , 0x26, 0x10, 0x10, NON_VPD_RING, 0, 0x10030108},
- {"eq_ana_bndy_bucket_21" , 0x27, 0x10, 0x10, NON_VPD_RING, 0, 0x10030108},
- {"eq_ana_bndy_bucket_22" , 0x28, 0x10, 0x10, NON_VPD_RING, 0, 0x10030108},
- {"eq_ana_bndy_bucket_23" , 0x29, 0x10, 0x10, NON_VPD_RING, 0, 0x10030108},
- {"eq_ana_bndy_bucket_24" , 0x2a, 0x10, 0x10, NON_VPD_RING, 0, 0x10030108},
- {"eq_ana_bndy_bucket_25" , 0x2b, 0x10, 0x10, NON_VPD_RING, 0, 0x10030108},
- {"eq_ana_bndy_l3dcc_bucket_26", 0x2c, 0x10, 0x10, NON_VPD_RING, 0, 0x10030108},
- {"eq_ana_mode" , 0x2d, 0x10, 0x10, NON_VPD_RING, 0, 0x10030101},
- {"ex_l2_fure_1" , 0x2e, 0x10, 0x10, NON_VPD_RING, 0, 0x1003040F},
- {"ex_l3_fure_1" , 0x2f, 0x10, 0x10, NON_VPD_RING, 0, 0x1003100F},
+ {"eq_fure" , 0x00, 0x10, 0x10, NON_VPD_RING, 0, 0x0C10000000009000},
+ {"eq_gptr" , 0x01, 0x10, 0x10, NON_VPD_RING, 0, 0x0C10000000002000},
+ {"eq_time" , 0x02, 0x10, 0x10, NON_VPD_RING, 0, 0x0C10000000000100},
+ {"eq_mode" , 0x03, 0x10, 0x10, NON_VPD_RING, 0, 0x0C10000000004000},
+ {"ex_l3_fure" , 0x04, 0x10, 0x10, NON_VPD_RING, 0, 0x0200000000009000},
+ {"ex_l3_gptr" , 0x05, 0x10, 0x10, NON_VPD_RING, 0, 0x0200000000002000},
+ {"ex_l3_time" , 0x06, 0x10, 0x10, NON_VPD_RING, 0, 0x0200000000000100},
+ {"ex_l2_mode" , 0x07, 0x10, 0x10, NON_VPD_RING, 0, 0x0080000000004000},
+ {"ex_l2_fure" , 0x08, 0x10, 0x10, NON_VPD_RING, 0, 0x0080000000009000},
+ {"ex_l2_gptr" , 0x09, 0x10, 0x10, NON_VPD_RING, 0, 0x0080000000002000},
+ {"ex_l2_time" , 0x0a, 0x10, 0x10, NON_VPD_RING, 0, 0x0080000000000100},
+ {"ex_l3_refr_fure" , 0x0b, 0x10, 0x10, NON_VPD_RING, 0, 0x0008000000009000},
+ {"ex_l3_refr_gptr" , 0x0c, 0x10, 0x10, NON_VPD_RING, 0, 0x0008000000002000},
+ {"eq_ana_func" , 0x0d, 0x10, 0x10, NON_VPD_RING, 0, 0x0020000000008000},
+ {"eq_ana_gptr" , 0x0e, 0x10, 0x10, NON_VPD_RING, 0, 0x0020000000002000},
+ {"eq_dpll_func" , 0x0f, 0x10, 0x10, NON_VPD_RING, 0, 0x0002000000008000},
+ {"eq_dpll_gptr" , 0x10, 0x10, 0x10, NON_VPD_RING, 0, 0x0002000000002000},
+ {"eq_dpll_mode" , 0x11, 0x10, 0x10, NON_VPD_RING, 0, 0x0002000000004000},
+ {"eq_ana_bndy_bucket_0" , 0x12, 0x10, 0x10, NON_VPD_RING, 0, 0x0020000000000080},
+ {"eq_ana_bndy_bucket_1" , 0x13, 0x10, 0x10, NON_VPD_RING, 0, 0x0020000000000080},
+ {"eq_ana_bndy_bucket_2" , 0x14, 0x10, 0x10, NON_VPD_RING, 0, 0x0020000000000080},
+ {"eq_ana_bndy_bucket_3" , 0x15, 0x10, 0x10, NON_VPD_RING, 0, 0x0020000000000080},
+ {"eq_ana_bndy_bucket_4" , 0x16, 0x10, 0x10, NON_VPD_RING, 0, 0x0020000000000080},
+ {"eq_ana_bndy_bucket_5" , 0x17, 0x10, 0x10, NON_VPD_RING, 0, 0x0020000000000080},
+ {"eq_ana_bndy_bucket_6" , 0x18, 0x10, 0x10, NON_VPD_RING, 0, 0x0020000000000080},
+ {"eq_ana_bndy_bucket_7" , 0x19, 0x10, 0x10, NON_VPD_RING, 0, 0x0020000000000080},
+ {"eq_ana_bndy_bucket_8" , 0x1a, 0x10, 0x10, NON_VPD_RING, 0, 0x0020000000000080},
+ {"eq_ana_bndy_bucket_9" , 0x1b, 0x10, 0x10, NON_VPD_RING, 0, 0x0020000000000080},
+ {"eq_ana_bndy_bucket_10" , 0x1c, 0x10, 0x10, NON_VPD_RING, 0, 0x0020000000000080},
+ {"eq_ana_bndy_bucket_11" , 0x1d, 0x10, 0x10, NON_VPD_RING, 0, 0x0020000000000080},
+ {"eq_ana_bndy_bucket_12" , 0x1e, 0x10, 0x10, NON_VPD_RING, 0, 0x0020000000000080},
+ {"eq_ana_bndy_bucket_13" , 0x1f, 0x10, 0x10, NON_VPD_RING, 0, 0x0020000000000080},
+ {"eq_ana_bndy_bucket_14" , 0x20, 0x10, 0x10, NON_VPD_RING, 0, 0x0020000000000080},
+ {"eq_ana_bndy_bucket_15" , 0x21, 0x10, 0x10, NON_VPD_RING, 0, 0x0020000000000080},
+ {"eq_ana_bndy_bucket_16" , 0x22, 0x10, 0x10, NON_VPD_RING, 0, 0x0020000000000080},
+ {"eq_ana_bndy_bucket_17" , 0x23, 0x10, 0x10, NON_VPD_RING, 0, 0x0020000000000080},
+ {"eq_ana_bndy_bucket_18" , 0x24, 0x10, 0x10, NON_VPD_RING, 0, 0x0020000000000080},
+ {"eq_ana_bndy_bucket_19" , 0x25, 0x10, 0x10, NON_VPD_RING, 0, 0x0020000000000080},
+ {"eq_ana_bndy_bucket_20" , 0x26, 0x10, 0x10, NON_VPD_RING, 0, 0x0020000000000080},
+ {"eq_ana_bndy_bucket_21" , 0x27, 0x10, 0x10, NON_VPD_RING, 0, 0x0020000000000080},
+ {"eq_ana_bndy_bucket_22" , 0x28, 0x10, 0x10, NON_VPD_RING, 0, 0x0020000000000080},
+ {"eq_ana_bndy_bucket_23" , 0x29, 0x10, 0x10, NON_VPD_RING, 0, 0x0020000000000080},
+ {"eq_ana_bndy_bucket_24" , 0x2a, 0x10, 0x10, NON_VPD_RING, 0, 0x0020000000000080},
+ {"eq_ana_bndy_bucket_25" , 0x2b, 0x10, 0x10, NON_VPD_RING, 0, 0x0020000000000080},
+ {"eq_ana_bndy_l3dcc_bucket_26", 0x2c, 0x10, 0x10, NON_VPD_RING, 0, 0x0020000000000080},
+ {"eq_ana_mode" , 0x2d, 0x10, 0x10, NON_VPD_RING, 0, 0x0020000000004000},
+ {"ex_l2_fure_1" , 0x2e, 0x10, 0x10, NON_VPD_RING, 0, 0x0080000000009000},
+ {"ex_l3_fure_1" , 0x2f, 0x10, 0x10, NON_VPD_RING, 0, 0x0200000000009000},
};
const GenRingIdList RING_ID_LIST_INSTANCE[] =
{
- {"eq_repr" , 0x30, 0x10, 0x1b, NON_VPD_RING , 0, 0x10036086},
- {"ex_l3_repr" , 0x31, 0x10, 0x1b, NON_VPD_RING , 0, 0x10031006},
- {"ex_l2_repr" , 0x32, 0x10, 0x1b, NON_VPD_RING , 0, 0x10030406},
- {"ex_l3_refr_repr" , 0x33, 0x10, 0x1b, NON_VPD_RING , 0, 0x10030046},
- {"ex_l3_refr_time" , 0x34, 0x10, 0x1b, NON_VPD_RING , 0, 0x10030047},
+ {"eq_repr" , 0x30, 0x10, 0x1b, NON_VPD_RING, 0, 0x0C10000000000200},
+ {"ex_l3_repr" , 0x31, 0x10, 0x1b, NON_VPD_RING, 0, 0x0200000000000200},
+ {"ex_l2_repr" , 0x32, 0x10, 0x1b, NON_VPD_RING, 0, 0x0080000000000200},
+ {"ex_l3_refr_repr" , 0x33, 0x10, 0x1b, NON_VPD_RING, 0, 0x0008000000000200},
+ {"ex_l3_refr_time" , 0x34, 0x10, 0x1b, NON_VPD_RING, 0, 0x0008000000000100},
};
-const RingVariantOrder RING_VARIANT_ORDER[] = { BASE, CC, RL };
+const RingVariantOrder RING_VARIANT_ORDER[] = { BASE, CC, RL};
};
@@ -416,202 +417,15 @@ namespace EC
{
const GenRingIdList RING_ID_LIST_COMMON[] =
{
- { "ec_func" , 0x00, 0x20, 0x20, NON_VPD_RING , 0, 0x2003700F},
- { "ec_gptr" , 0x01, 0x20, 0x20, NON_VPD_RING , 0, 0x20037002},
- { "ec_time" , 0x02, 0x20, 0x20, NON_VPD_RING , 0, 0x20037007},
- { "ec_mode" , 0x03, 0x20, 0x20, NON_VPD_RING , 0, 0x20037001},
+ { "ec_func" , 0x00, 0x20, 0x20, NON_VPD_RING, 0, 0x0E00000000009000},
+ { "ec_gptr" , 0x01, 0x20, 0x20, NON_VPD_RING, 0, 0x0E00000000002000},
+ { "ec_time" , 0x02, 0x20, 0x20, NON_VPD_RING, 0, 0x0E00000000000100},
+ { "ec_mode" , 0x03, 0x20, 0x20, NON_VPD_RING, 0, 0x0E00000000004000},
};
const GenRingIdList RING_ID_LIST_INSTANCE[] =
{
- { "ec_repr" , 0x04, 0x20, 0x37, NON_VPD_RING , 0, 0x20037006},
-};
-const RingVariantOrder RING_VARIANT_ORDER[] = { BASE, CC, RL };
-};
-
-CHIPLET_TYPE p9_ringid_get_chiplet(RingID i_ringId)
-{
- return RING_PROPERTIES[i_ringId].iv_type;
-}
-
-void p9_ringid_get_chiplet_properties(
- CHIPLET_TYPE i_chiplet,
- CHIPLET_DATA** o_cpltData,
- GenRingIdList** o_ringComm,
- GenRingIdList** o_ringInst,
- RingVariantOrder** o_varOrder,
- uint8_t* o_varNumb)
-{
- switch (i_chiplet)
- {
- case PERV_TYPE :
- *o_cpltData = (CHIPLET_DATA*) &PERV::g_pervData;
- *o_ringComm = (GenRingIdList*) PERV::RING_ID_LIST_COMMON;
- *o_ringInst = (GenRingIdList*) PERV::RING_ID_LIST_INSTANCE;
- *o_varOrder = (RingVariantOrder*) PERV::RING_VARIANT_ORDER;
- *o_varNumb = sizeof(PERV::RingVariants) / sizeof(uint16_t);
- break;
-
- case N0_TYPE :
- *o_cpltData = (CHIPLET_DATA*) &N0::g_n0Data;
- *o_ringComm = (GenRingIdList*) N0::RING_ID_LIST_COMMON;
- *o_ringInst = (GenRingIdList*) N0::RING_ID_LIST_INSTANCE;
- *o_varOrder = (RingVariantOrder*) N0::RING_VARIANT_ORDER;
- *o_varNumb = sizeof(N0::RingVariants) / sizeof(uint16_t);
- break;
-
- case N1_TYPE :
- *o_cpltData = (CHIPLET_DATA*) &N1::g_n1Data;
- *o_ringComm = (GenRingIdList*) N1::RING_ID_LIST_COMMON;
- *o_ringInst = (GenRingIdList*) N1::RING_ID_LIST_INSTANCE;
- *o_varOrder = (RingVariantOrder*) N1::RING_VARIANT_ORDER;
- *o_varNumb = sizeof(N1::RingVariants) / sizeof(uint16_t);
- break;
-
- case N2_TYPE :
- *o_cpltData = (CHIPLET_DATA*) &N2::g_n2Data;
- *o_ringComm = (GenRingIdList*) N2::RING_ID_LIST_COMMON;
- *o_ringInst = (GenRingIdList*) N2::RING_ID_LIST_INSTANCE;
- *o_varOrder = (RingVariantOrder*) N2::RING_VARIANT_ORDER;
- *o_varNumb = sizeof(N2::RingVariants) / sizeof(uint16_t);
- break;
-
- case N3_TYPE :
- *o_cpltData = (CHIPLET_DATA*) &N3::g_n3Data;
- *o_ringComm = (GenRingIdList*) N3::RING_ID_LIST_COMMON;
- *o_ringInst = (GenRingIdList*) N3::RING_ID_LIST_INSTANCE;
- *o_varOrder = (RingVariantOrder*) N3::RING_VARIANT_ORDER;
- *o_varNumb = sizeof(N3::RingVariants) / sizeof(uint16_t);
- break;
-
- case XB_TYPE :
- *o_cpltData = (CHIPLET_DATA*) &XB::g_xbData;
- *o_ringComm = (GenRingIdList*) XB::RING_ID_LIST_COMMON;
- *o_ringInst = (GenRingIdList*) XB::RING_ID_LIST_INSTANCE;
- *o_varOrder = (RingVariantOrder*) XB::RING_VARIANT_ORDER;
- *o_varNumb = sizeof(XB::RingVariants) / sizeof(uint16_t);
- break;
-
- case MC_TYPE :
- *o_cpltData = (CHIPLET_DATA*) &MC::g_mcData;
- *o_ringComm = (GenRingIdList*) MC::RING_ID_LIST_COMMON;
- *o_ringInst = (GenRingIdList*) MC::RING_ID_LIST_INSTANCE;
- *o_varOrder = (RingVariantOrder*) MC::RING_VARIANT_ORDER;
- *o_varNumb = sizeof(MC::RingVariants) / sizeof(uint16_t);
- break;
-
- case OB0_TYPE :
- *o_cpltData = (CHIPLET_DATA*) &OB0::g_ob0Data;
- *o_ringComm = (GenRingIdList*) OB0::RING_ID_LIST_COMMON;
- *o_ringInst = (GenRingIdList*) OB0::RING_ID_LIST_INSTANCE;
- *o_varOrder = (RingVariantOrder*) OB0::RING_VARIANT_ORDER;
- *o_varNumb = sizeof(OB0::RingVariants) / sizeof(uint16_t);
- break;
-
- case OB1_TYPE :
- *o_cpltData = (CHIPLET_DATA*) &OB1::g_ob1Data;
- *o_ringComm = (GenRingIdList*) OB1::RING_ID_LIST_COMMON;
- *o_ringInst = (GenRingIdList*) OB1::RING_ID_LIST_INSTANCE;
- *o_varOrder = (RingVariantOrder*) OB1::RING_VARIANT_ORDER;
- *o_varNumb = sizeof(OB1::RingVariants) / sizeof(uint16_t);
- break;
-
- case OB2_TYPE :
- *o_cpltData = (CHIPLET_DATA*) &OB2::g_ob2Data;
- *o_ringComm = (GenRingIdList*) OB2::RING_ID_LIST_COMMON;
- *o_ringInst = (GenRingIdList*) OB2::RING_ID_LIST_INSTANCE;
- *o_varOrder = (RingVariantOrder*) OB2::RING_VARIANT_ORDER;
- *o_varNumb = sizeof(OB2::RingVariants) / sizeof(uint16_t);
- break;
-
- case OB3_TYPE :
- *o_cpltData = (CHIPLET_DATA*) &OB3::g_ob3Data;
- *o_ringComm = (GenRingIdList*) OB3::RING_ID_LIST_COMMON;
- *o_ringInst = (GenRingIdList*) OB3::RING_ID_LIST_INSTANCE;
- *o_varOrder = (RingVariantOrder*) OB3::RING_VARIANT_ORDER;
- *o_varNumb = sizeof(OB3::RingVariants) / sizeof(uint16_t);
- break;
-
- case PCI0_TYPE :
- *o_cpltData = (CHIPLET_DATA*) &PCI0::g_pci0Data;
- *o_ringComm = (GenRingIdList*) PCI0::RING_ID_LIST_COMMON;
- *o_ringInst = (GenRingIdList*) PCI0::RING_ID_LIST_INSTANCE;
- *o_varOrder = (RingVariantOrder*) PCI0::RING_VARIANT_ORDER;
- *o_varNumb = sizeof(PCI0::RingVariants) / sizeof(uint16_t);
- break;
-
- case PCI1_TYPE :
- *o_cpltData = (CHIPLET_DATA*) &PCI1::g_pci1Data;
- *o_ringComm = (GenRingIdList*) PCI1::RING_ID_LIST_COMMON;
- *o_ringInst = (GenRingIdList*) PCI1::RING_ID_LIST_INSTANCE;
- *o_varOrder = (RingVariantOrder*) PCI1::RING_VARIANT_ORDER;
- *o_varNumb = sizeof(PCI1::RingVariants) / sizeof(uint16_t);
- break;
-
- case PCI2_TYPE :
- *o_cpltData = (CHIPLET_DATA*) &PCI2::g_pci2Data;
- *o_ringComm = (GenRingIdList*) PCI2::RING_ID_LIST_COMMON;
- *o_ringInst = (GenRingIdList*) PCI2::RING_ID_LIST_INSTANCE;
- *o_varOrder = (RingVariantOrder*) PCI2::RING_VARIANT_ORDER;
- *o_varNumb = sizeof(PCI2::RingVariants) / sizeof(uint16_t);
- break;
-
- case EQ_TYPE :
- *o_cpltData = (CHIPLET_DATA*) &EQ::g_eqData;
- *o_ringComm = (GenRingIdList*) EQ::RING_ID_LIST_COMMON;
- *o_ringInst = (GenRingIdList*) EQ::RING_ID_LIST_INSTANCE;
- *o_varOrder = (RingVariantOrder*) EQ::RING_VARIANT_ORDER;
- *o_varNumb = sizeof(EQ::RingVariants) / sizeof(uint16_t);
- break;
-
- case EC_TYPE :
- *o_cpltData = (CHIPLET_DATA*) &EC::g_ecData;
- *o_ringComm = (GenRingIdList*) EC::RING_ID_LIST_COMMON;
- *o_ringInst = (GenRingIdList*) EC::RING_ID_LIST_INSTANCE;
- *o_varOrder = (RingVariantOrder*) EC::RING_VARIANT_ORDER;
- *o_varNumb = sizeof(EC::RingVariants) / sizeof(uint16_t);
- break;
-
- default :
- *o_cpltData = NULL;
- *o_ringComm = NULL;
- *o_ringInst = NULL;
- *o_varOrder = NULL;
- *o_varNumb = 0;
- break;
- }
-}
-
-GenRingIdList* p9_ringid_get_ring_properties(RingID i_ringId)
-{
- CHIPLET_DATA* l_cpltData;
- GenRingIdList* l_ringList[2]; // 0: common, 1: instance
- RingVariantOrder* l_varOrder;
- uint8_t l_varNumb;
- int i, j, n;
-
- p9_ringid_get_chiplet_properties(
- p9_ringid_get_chiplet(i_ringId),
- &l_cpltData, &l_ringList[0], &l_ringList[1], &l_varOrder, &l_varNumb);
-
- if (!l_ringList[0])
- {
- return NULL;
- }
-
- for (j = 0; j < 2; j++) // 0: common, 1: instance
- {
- n = (j ? l_cpltData->iv_num_instance_rings
- : l_cpltData->iv_num_common_rings);
-
- for (i = 0; i < n; i++)
- {
- if (!strcmp(l_ringList[j][i].ringName,
- RING_PROPERTIES[i_ringId].iv_name))
- {
- return &(l_ringList[j][i]);
- }
- }
- }
-
- return NULL;
-}
+ { "ec_repr" , 0x04, 0x20, 0x37, NON_VPD_RING, 0, 0x0E00000000000200},
+};
+const RingVariantOrder RING_VARIANT_ORDER[] = { BASE, CC, RL};
+};
+
diff --git a/src/import/chips/p9/utils/imageProcs/p9_ringId.H b/src/import/chips/p9/utils/imageProcs/p9_ringId.H
index a52fb1b1c..d8bdda634 100644
--- a/src/import/chips/p9/utils/imageProcs/p9_ringId.H
+++ b/src/import/chips/p9/utils/imageProcs/p9_ringId.H
@@ -27,8 +27,6 @@
#define _P9_RINGID_H_
#include <stdint.h>
-#include <stddef.h>
-
#include <p9_ring_id.h>
// General Ring ID list structure
@@ -40,7 +38,7 @@ typedef struct
uint8_t instanceIdMax; // the max instanceId
uint8_t vpdKeyword;
uint8_t pllCopy; // 0,1,2,3,4,5 -- No of PLL copies required
- uint32_t scanScomAddress;
+ uint64_t scanRegionType;
} GenRingIdList;
typedef enum RingVariant // Base variables
@@ -1305,25 +1303,4 @@ static const ringProperties_t RING_PROPERTIES[NUM_RING_IDS] =
};
#endif
-// returns our own chiplet enum value for this ringId
-CHIPLET_TYPE
-p9_ringid_get_chiplet(
- RingID i_ringId);
-
-// returns data structures defined for chiplet type
-// as determined by ringId
-void
-p9_ringid_get_chiplet_properties(
- CHIPLET_TYPE i_chiplet,
- CHIPLET_DATA** o_cpltData,
- GenRingIdList** o_ringComm,
- GenRingIdList** o_ringInst,
- RingVariantOrder** o_varOrder,
- uint8_t* o_varNumb);
-
-// returns properties of a ring as determined by ringId
-GenRingIdList*
-p9_ringid_get_ring_properties(
- RingID i_ringId);
-
#endif
diff --git a/src/import/chips/p9/utils/imageProcs/p9_scan_compression.C b/src/import/chips/p9/utils/imageProcs/p9_scan_compression.C
index f1eb529d8..8eb29d230 100644
--- a/src/import/chips/p9/utils/imageProcs/p9_scan_compression.C
+++ b/src/import/chips/p9/utils/imageProcs/p9_scan_compression.C
@@ -30,14 +30,18 @@
///
/// Scan strings are compressed using a simple run-length encoding called
/// RS4. The string to be decompressed and scanned is the difference between
-/// the current state of the ring and the desired final state of the ring.
+/// the current state of the ring and the desired final state of the ring. A
+/// run-time optimization supports the case that the current state of the ring
+/// is the flush state.
///
/// Both the data to be compressed and the final compressed data are treated
-/// as strings of 4-bit nibbles. In the scan data structure the compressed
-/// strings are padded with 0x0 nibbles to the next even multiple of 2 for
-/// convenience. The compressed string consists of control nibbles and data
-/// nibbles. The string format includes a special control/data sequence that
-/// marks the end of the string and the final bits of scan data.
+/// as strings of 4-bit nibbles. When packaged in the scan data structure
+/// however the compressed string must begin on an 8-byte boundary and is
+/// always read 8 bytes at a time. In the scan data structure the compressed
+/// strings are also padded with 0x0 nibbles to the next even multiple of 8
+/// bytes. The compressed string consists of control nibbles and data nibbles.
+/// The string format includes a special control/data sequence that marks the
+/// end of the string and the final bits of scan data.
///
/// Special control/data sequences have been been added for RS4v2 to
/// store pairs of care mask nibble and data nibble. This enhancement
@@ -189,20 +193,23 @@
// unique names to support concurrent update. Most routines defined here have
// some variant of 'rs4' in their names; others should be inherently unique.
-#if RS4_VERSION != 3
- #error This code assumes CompressedScanData structure version 3 layout
+#if COMPRESSED_SCAN_DATA_VERSION != 2
+ #error This code assumes CompressedScanData structure version 2 layout
#endif
void
-compressed_scan_data_translate(CompressedScanData* o_rs4,
- CompressedScanData* i_rs4)
+compressed_scan_data_translate(CompressedScanData* o_data,
+ CompressedScanData* i_data)
{
- o_rs4->iv_magic = htobe16(i_rs4->iv_magic);
- o_rs4->iv_version = i_rs4->iv_version;
- o_rs4->iv_type = i_rs4->iv_type;
- o_rs4->iv_size = htobe16(i_rs4->iv_size);
- o_rs4->iv_ringId = htobe16(i_rs4->iv_ringId);
- o_rs4->iv_scanAddr = htobe32(i_rs4->iv_scanAddr);
+ o_data->iv_magic = htobe32(i_data->iv_magic);
+ o_data->iv_size = htobe32(i_data->iv_size);
+ o_data->iv_algorithmReserved = htobe32(i_data->iv_algorithmReserved);
+ o_data->iv_length = htobe32(i_data->iv_length);
+ o_data->iv_scanSelect = htobe64(i_data->iv_scanSelect);
+ o_data->iv_headerVersion = i_data->iv_headerVersion;
+ o_data->iv_flushOptimization = i_data->iv_flushOptimization;
+ o_data->iv_ringId = i_data->iv_ringId;
+ o_data->iv_chipletId = i_data->iv_chipletId;
}
@@ -343,7 +350,7 @@ stop_decode(uint32_t* o_count, const uint8_t* i_string, const uint32_t i_i)
// Returns a scan compression return code.
static int
-__rs4_compress(uint8_t* o_rs4_str,
+__rs4_compress(CompressedScanData* o_data,
uint32_t* o_nibbles,
const uint8_t* i_data_str,
const uint8_t* i_care_str,
@@ -353,9 +360,10 @@ __rs4_compress(uint8_t* o_rs4_str,
uint32_t n; /* Number of whole nibbles in i_data */
uint32_t r; /* Number of reminaing bits in i_data */
uint32_t i; /* Nibble index in i_data_str/i_care_str */
- uint32_t j; /* Nibble index in o_rs4_str */
+ uint32_t j; /* Nibble index in data */
uint32_t k; /* Location to place <scan_count(N)> */
uint32_t count; /* Counts rotate/scan nibbles */
+ uint8_t* data; /* The compressed scan data area */
int care_nibble;
int data_nibble;
@@ -364,6 +372,7 @@ __rs4_compress(uint8_t* o_rs4_str,
i = 0;
j = 0;
k = 0; /* Makes GCC happy */
+ data = (uint8_t*)o_data + sizeof(CompressedScanData);
care_nibble = 0;
data_nibble = 0;
count = 0;
@@ -395,7 +404,7 @@ __rs4_compress(uint8_t* o_rs4_str,
}
else
{
- j += rs4_stop_encode(count, o_rs4_str, j);
+ j += rs4_stop_encode(count, data, j);
count = 0;
k = j;
j++;
@@ -423,7 +432,7 @@ __rs4_compress(uint8_t* o_rs4_str,
{
// Set the <scan_count(N)> in nibble k since no more data in
// current AND next nibble (or next nibble might be last).
- rs4_set_nibble(o_rs4_str, k, count);
+ rs4_set_nibble(data, k, count);
count = 0;
state = 0;
}
@@ -432,7 +441,7 @@ __rs4_compress(uint8_t* o_rs4_str,
// Whether next nibble is last nibble or contains data, lets include the
// current empty nibble in the scan_data(N) count because its
// more efficient than inserting rotate go+stop nibbles.
- rs4_set_nibble(o_rs4_str, j, 0);
+ rs4_set_nibble(data, j, 0);
count++;
i++;
j++;
@@ -441,7 +450,7 @@ __rs4_compress(uint8_t* o_rs4_str,
else if ((care_nibble ^ data_nibble) == 0)
{
// Only one-data in nibble. Continue pilling on one-data nibbles.
- rs4_set_nibble(o_rs4_str, j, data_nibble);
+ rs4_set_nibble(data, j, data_nibble);
count++;
i++;
j++;
@@ -451,14 +460,14 @@ __rs4_compress(uint8_t* o_rs4_str,
// There is zero-data in nibble.
// First set the <scan_count(N)> in nibble k to end current
// sequence of one-data nibbles.
- rs4_set_nibble(o_rs4_str, k, count);
+ rs4_set_nibble(data, k, count);
count = 0;
state = 0;
}
if ((state == 1) && (count == 14))
{
- rs4_set_nibble(o_rs4_str, k, 14);
+ rs4_set_nibble(data, k, 14);
count = 0;
state = 0;
}
@@ -468,10 +477,10 @@ __rs4_compress(uint8_t* o_rs4_str,
// Zero-data section //
//-------------------//
{
- rs4_set_nibble(o_rs4_str, k, 15);
- rs4_set_nibble(o_rs4_str, j, care_nibble);
+ rs4_set_nibble(data, k, 15);
+ rs4_set_nibble(data, j, care_nibble);
j++;
- rs4_set_nibble(o_rs4_str, j, data_nibble);
+ rs4_set_nibble(data, j, data_nibble);
i++;
j++;
count = 0;
@@ -484,12 +493,12 @@ __rs4_compress(uint8_t* o_rs4_str,
if (state == 0)
{
- j += rs4_stop_encode(count, o_rs4_str, j);
+ j += rs4_stop_encode(count, data, j);
}
else if (state == 1)
{
- rs4_set_nibble(o_rs4_str, k, count);
- j += rs4_stop_encode(0, o_rs4_str, j);
+ rs4_set_nibble(data, k, count);
+ j += rs4_stop_encode(0, data, j);
}
else
{
@@ -498,14 +507,14 @@ __rs4_compress(uint8_t* o_rs4_str,
}
// Indicate termination start
- rs4_set_nibble(o_rs4_str, j, 0);
+ rs4_set_nibble(data, j, 0);
j++;
// Insert the remainder count nibble, and if r>0, the remainder data
// nibble. Note that here we indicate the number of bits (0<=r<4).
if (r == 0)
{
- rs4_set_nibble(o_rs4_str, j, r);
+ rs4_set_nibble(data, j, r);
j++;
}
else
@@ -522,19 +531,19 @@ __rs4_compress(uint8_t* o_rs4_str,
if ((care_nibble ^ data_nibble) == 0)
{
// Only one-data in rem nibble.
- rs4_set_nibble(o_rs4_str, j, r);
+ rs4_set_nibble(data, j, r);
j++;
- rs4_set_nibble(o_rs4_str, j, data_nibble);
+ rs4_set_nibble(data, j, data_nibble);
j++;
}
else
{
// Zero-data in rem nibble.
- rs4_set_nibble(o_rs4_str, j, r + 8);
+ rs4_set_nibble(data, j, r + 8);
j++;
- rs4_set_nibble(o_rs4_str, j, care_nibble);
+ rs4_set_nibble(data, j, care_nibble);
j++;
- rs4_set_nibble(o_rs4_str, j, data_nibble);
+ rs4_set_nibble(data, j, data_nibble);
j++;
}
}
@@ -600,55 +609,58 @@ rs4_max_compressed_bytes(uint32_t nibbles)
bytes = ((nibbles + 1) / 2); // nibbles rounded up to full bytes
bytes += sizeof(CompressedScanData); // plus rs4 header
- bytes = ((bytes + 1) / 2) * 2; // rounded up to multiple of 2 bytes
+ bytes = ((bytes + 7) / 8) * 8; // rounded up to multiple of 8 bytes
return bytes;
}
// We always require the worst-case amount of memory including the header and
-// any rounding required to guarantee that the data size is a multiple of 2
-// bytes. The final image size is also rounded up to a multiple of 2 bytes.
+// any rounding required to guarantee that the data size is a multiple of 8
+// bytes. The final image size is also rounded up to a multiple of 8 bytes.
//
// Returns a scan compression return code.
int
-_rs4_compress(CompressedScanData* io_rs4,
- const uint32_t i_size,
+_rs4_compress(CompressedScanData* io_data,
+ uint32_t i_dataSize,
+ uint32_t* o_imageSize,
const uint8_t* i_data_str,
const uint8_t* i_care_str,
const uint32_t i_length,
- const uint32_t i_scanAddr,
- const uint8_t i_ringId)
+ const uint64_t i_scanSelect,
+ const uint8_t i_ringId,
+ const uint8_t i_chipletId,
+ const uint8_t i_flushOptimization)
{
int rc;
uint32_t nibbles = rs4_max_compressed_nibbles(i_length);
uint32_t bytes = rs4_max_compressed_bytes(nibbles);
- uint8_t* rs4_str = (uint8_t*)io_rs4 + sizeof(CompressedScanData);
- if (bytes > i_size)
+ if (i_dataSize < bytes)
{
return BUG(SCAN_COMPRESSION_BUFFER_OVERFLOW);
}
- memset(io_rs4, 0, i_size);
+ memset(io_data, 0, bytes);
- rc = __rs4_compress(rs4_str, &nibbles, i_data_str, i_care_str, i_length);
+ rc = __rs4_compress(io_data, &nibbles, i_data_str, i_care_str, i_length);
if (rc == SCAN_COMPRESSION_OK)
{
bytes = rs4_max_compressed_bytes(nibbles);
- io_rs4->iv_magic = htobe16(RS4_MAGIC);
- io_rs4->iv_version = RS4_VERSION;
- // For now this assumes non-CMSK scan data.
- // For CMSK support, we would need to:
- // - either add a CMSK function parameter and set type here,
- // - or rely on caller to set type later.
- io_rs4->iv_type = RS4_SCAN_DATA_TYPE_NON_CMSK;
- io_rs4->iv_size = htobe16(bytes);
- io_rs4->iv_ringId = htobe16(i_ringId);
- io_rs4->iv_scanAddr = htobe32(i_scanAddr);
+ io_data->iv_magic = htobe32(RS4_MAGIC);
+ io_data->iv_size = htobe32(bytes);
+ io_data->iv_algorithmReserved = htobe32(nibbles);
+ io_data->iv_scanSelect = htobe64(i_scanSelect);
+ io_data->iv_length = htobe32(i_length);
+ io_data->iv_headerVersion = COMPRESSED_SCAN_DATA_VERSION;
+ io_data->iv_flushOptimization = i_flushOptimization;
+ io_data->iv_ringId = i_ringId;
+ io_data->iv_chipletId = i_chipletId;
+
+ *o_imageSize = bytes;
}
return rc;
@@ -657,32 +669,35 @@ _rs4_compress(CompressedScanData* io_rs4,
// We always allocate the worst-case amount of memory including the header
// and any rounding required to guarantee that the allocated length is a
-// multiple of 2 bytes. The final size is also rounded up to a multiple of 2
+// multiple of 8 bytes. The final size is also rounded up to a multiple of 8
// bytes.
//
// Returns a scan compression return code.
int
-rs4_compress(CompressedScanData** o_rs4,
+rs4_compress(CompressedScanData** o_data,
+ uint32_t* o_size,
const uint8_t* i_data_str,
const uint8_t* i_care_str,
const uint32_t i_length,
- const uint32_t i_scanAddr,
- const uint8_t i_ringId)
+ const uint64_t i_scanSelect,
+ const uint8_t i_ringId,
+ const uint8_t i_chipletId,
+ const uint8_t i_flushOptimization)
{
uint32_t nibbles = rs4_max_compressed_nibbles(i_length);
uint32_t bytes = rs4_max_compressed_bytes(nibbles);
- *o_rs4 = (CompressedScanData*)malloc(bytes);
+ *o_data = (CompressedScanData*)malloc(bytes);
- if (*o_rs4 == 0)
+ if (*o_data == 0)
{
return BUG(SCAN_COMPRESSION_NO_MEMORY);
}
- return _rs4_compress(*o_rs4, bytes,
- i_data_str, i_care_str, i_length,
- i_scanAddr, i_ringId);
+ return _rs4_compress(*o_data, bytes, o_size, i_data_str,
+ i_care_str, i_length, i_scanSelect,
+ i_ringId, i_chipletId, i_flushOptimization);
}
@@ -694,9 +709,8 @@ rs4_compress(CompressedScanData** o_rs4,
static int
__rs4_decompress(uint8_t* io_data_str,
uint8_t* io_care_str,
- uint32_t i_size,
- uint32_t* o_length,
- const uint8_t* i_rs4_str)
+ const uint8_t* i_rs4_str,
+ const uint32_t i_length)
{
int state; /* 0 : Rotate, 1 : Scan */
uint32_t i; /* Nibble index in i_rs4_str */
@@ -724,9 +738,9 @@ __rs4_decompress(uint8_t* io_data_str,
bits += 4 * count;
- if (bits > i_size * 8)
+ if (bits > i_length)
{
- return BUG(SCAN_COMPRESSION_BUFFER_OVERFLOW);
+ return BUG(SCAN_DECOMPRESSION_SIZE_ERROR);
}
// keep 'count' zero care and data nibbles
@@ -749,9 +763,9 @@ __rs4_decompress(uint8_t* io_data_str,
nibbles = (masked ? 1 : nibbles);
bits += 4 * nibbles;
- if (bits > i_size * 8)
+ if (bits > i_length)
{
- return BUG(SCAN_COMPRESSION_BUFFER_OVERFLOW);
+ return BUG(SCAN_DECOMPRESSION_SIZE_ERROR);
}
for (k = 0; k < nibbles; k++)
@@ -777,9 +791,9 @@ __rs4_decompress(uint8_t* io_data_str,
r = nibbles & 0x3;
bits += r;
- if (bits > i_size * 8)
+ if (bits != i_length)
{
- return BUG(SCAN_COMPRESSION_BUFFER_OVERFLOW);
+ return BUG(SCAN_DECOMPRESSION_SIZE_ERROR);
}
if (r != 0)
@@ -789,7 +803,6 @@ __rs4_decompress(uint8_t* io_data_str,
rs4_set_nibble(io_data_str, j, rs4_get_nibble(i_rs4_str, i));
}
- *o_length = bits;
return SCAN_COMPRESSION_OK;
}
@@ -797,27 +810,31 @@ __rs4_decompress(uint8_t* io_data_str,
int
_rs4_decompress(uint8_t* io_data_str,
uint8_t* io_care_str,
- uint32_t i_size,
+ uint32_t i_stringSize,
uint32_t* o_length,
const CompressedScanData* i_rs4)
{
- uint8_t* rs4_str = (uint8_t*)i_rs4 + sizeof(CompressedScanData);
+ uint32_t bytes;
- if (htobe16(i_rs4->iv_magic) != RS4_MAGIC)
+ if (htobe32(i_rs4->iv_magic) != RS4_MAGIC)
{
return BUG(SCAN_DECOMPRESSION_MAGIC_ERROR);
}
- if (i_rs4->iv_version != RS4_VERSION)
+ *o_length = htobe32(i_rs4->iv_length);
+ bytes = (*o_length + 7) / 8;
+
+ if (i_stringSize < bytes)
{
- return BUG(SCAN_COMPRESSION_VERSION_ERROR);
+ return BUG(SCAN_COMPRESSION_BUFFER_OVERFLOW);
}
- memset(io_data_str, 0, i_size);
- memset(io_care_str, 0, i_size);
+ memset(io_data_str, 0, bytes);
+ memset(io_care_str, 0, bytes);
- return __rs4_decompress(io_data_str, io_care_str, i_size,
- o_length, rs4_str);
+ return __rs4_decompress(io_data_str, io_care_str,
+ (uint8_t*)i_rs4 + sizeof(CompressedScanData),
+ *o_length);
}
@@ -827,36 +844,25 @@ rs4_decompress(uint8_t** o_data_str,
uint32_t* o_length,
const CompressedScanData* i_rs4)
{
- uint32_t size = 65536;
- int rc;
+ uint32_t length, bytes;
- *o_data_str = (uint8_t*)malloc(size);
-
- if (*o_data_str == NULL)
+ if (htobe32(i_rs4->iv_magic) != RS4_MAGIC)
{
- return BUG(SCAN_COMPRESSION_NO_MEMORY);
+ return BUG(SCAN_DECOMPRESSION_MAGIC_ERROR);
}
- *o_care_str = (uint8_t*)malloc(size);
+ length = htobe32(i_rs4->iv_length);
+ bytes = (length + 7) / 8;
- if (*o_care_str == NULL)
- {
- free(*o_data_str);
- *o_data_str = NULL;
- return BUG(SCAN_COMPRESSION_NO_MEMORY);
- }
+ *o_data_str = (uint8_t*)malloc(bytes);
+ *o_care_str = (uint8_t*)malloc(bytes);
- rc = _rs4_decompress(*o_data_str, *o_care_str, size, o_length, i_rs4);
-
- if (rc != SCAN_COMPRESSION_OK)
+ if (*o_data_str == 0 || *o_care_str == 0)
{
- free(*o_data_str);
- free(*o_care_str);
- *o_data_str = NULL;
- *o_care_str = NULL;
+ return BUG(SCAN_COMPRESSION_NO_MEMORY);
}
- return rc;
+ return _rs4_decompress(*o_data_str, *o_care_str, bytes, o_length, i_rs4);
}
@@ -864,16 +870,17 @@ int
rs4_redundant(const CompressedScanData* i_data, int* o_redundant)
{
uint8_t* data;
- uint32_t length, pos;
+ uint32_t length, stringLength, pos;
*o_redundant = 0;
- if (htobe16(i_data->iv_magic) != RS4_MAGIC)
+ if (htobe32(i_data->iv_magic) != RS4_MAGIC)
{
return BUG(SCAN_DECOMPRESSION_MAGIC_ERROR);
}
data = (uint8_t*)i_data + sizeof(CompressedScanData);
+ stringLength = htobe32(i_data->iv_length);
// A compressed scan string is redundant if the initial rotate is
// followed by the end-of-string marker, and any remaining mod-4 bits
@@ -899,6 +906,12 @@ rs4_redundant(const CompressedScanData* i_data, int* o_redundant)
}
}
+ if ((length > stringLength) ||
+ (*o_redundant && (length != stringLength)))
+ {
+ return SCAN_DECOMPRESSION_SIZE_ERROR;
+ }
+
return SCAN_COMPRESSION_OK;
}
diff --git a/src/import/chips/p9/utils/imageProcs/p9_scan_compression.H b/src/import/chips/p9/utils/imageProcs/p9_scan_compression.H
index bda54434a..6845fc50d 100644
--- a/src/import/chips/p9/utils/imageProcs/p9_scan_compression.H
+++ b/src/import/chips/p9/utils/imageProcs/p9_scan_compression.H
@@ -36,49 +36,92 @@
/// Compressed Scan Chain Data Structure Format
///
/// The compressed scan ring data structure must be 8-byte aligned in
-/// memory. The container data structure consists of a header
+/// memory. The container data structure consists of this 24-byte header
/// followed by an arbitrary number of 8 byte doublewords containing the
-/// compressed scan data. Images are always stored and processed in
-/// big-endian byte order. The header format is common across all
+/// compressed scan data. Images are always stored and processed in
+/// big-endian byte order. This container format is common across all
/// decompression algorithms.
///
-/// ATTENTION:
-/// The RS4v2 CompressedScanData had a 4 byte magic value with 0x34 ("4")
-/// within its third byte, which is at the same byte position as iv_version
-/// now. Users of CompressedScanData which use the magic value to detect
-/// a ring data structure won't be able to distingish old and new
-/// CompressedScanData for iv_version being 0x34. In the very unlikely case
-/// that we would have that many versions of ComprossedScanData, it is
-/// strongly suggested to simply skip 0x34 as version number.
-///
/// Bytes - Content
///
-/// 0:1 - A 16-bit "magic number" that identifies and validates the
-/// compression algorithm used to compress the data ("RS").
+/// 0:3 - A 32-bit "magic number" that identifies and validates the
+/// compression algorithm and algorithm version used to compress the data.
+///
+/// 4:7 - The 32-bit size of the entire data structure in \e bytes. Thi
+/// consists of this 24-byte header plus the compressed scan data. This value
+/// is always a multiple of 8.
+///
+/// 8:11 - This 32-bit value is reserved to the compression
+/// algorithm. Typically this field is used to record the 'size' of the
+/// compressed string in units specific to each algorithm.
+///
+/// 12:15 - The length of the original scan chain in \e bits.
+///
+/// 16:23 - The 64 bit scan Region and type details
+///
///
-/// 2 - An 8-bit version number (3 for the time being).
+/// 24:27 - The 32 high-order bits of the value written to the Scan Select
+/// register to set up the scan. The Scan Select register only defines these
+/// bits. (Planned to use scan scom register value)
///
-/// 3 - An 8-bit type field distinguishing different scan data types
-/// (0 for non-CMSK, 1 for CMSK).
+/// 28 - The Scan Chain Data Structure version number
///
-/// 4:5 - The 16-bit size of the uncompressed scan data with
-/// this header in \e bytes. This is not the exact length of actual scan data
-/// in bits, but the number of bytes used by the RS4 encoding to store those
-/// compressed scan bits.
+/// 29 - Flush-optimize : Is this byte is non-zero, the ring state to be
+/// modified is the flush state of the ring.
///
-/// 6:7 - The 16-bit ring ID uniquely identifying the ring.
+/// 30 - The ring ID uniquely identifying the repair ring name.
///
-/// 8:11 - scan scom register value
+/// 31 - The 7-bit pervasive chiplet Id + Multicast bit of the chiplet to
+/// scan. This value is loaded directly into P0. The decompression
+/// algorithms provide two entry points - one that uses this value as the
+/// chiplet Id, and another that allows the caller to specify the chiplet Id
+/// in the call.
+
typedef struct
{
- uint16_t iv_magic;
- uint8_t iv_version;
- uint8_t iv_type;
- uint16_t iv_size;
- uint16_t iv_ringId;
- uint32_t iv_scanAddr;
+
+ /// Magic number - See \ref scan_compression_magic
+ uint32_t iv_magic;
+
+ /// Total size in bytes, including the container header
+ uint32_t iv_size;
+
+ /// Reserved to the algorithm
+ uint32_t iv_algorithmReserved;
+
+ /// Length of the original scan chain in bits
+ uint32_t iv_length;
+
+ /// 64 bit scan select register value
+ uint64_t iv_scanSelect;
+
+ /// Data structure (header) version
+ uint8_t iv_headerVersion;
+
+ /// Flush-state optimization
+ ///
+ /// Normally, modifying the state of the ring requires XOR-ing the
+ /// difference state (the compressed state) with the current ring state as
+ /// it will appear in the Scan Data Register. If the current state of the
+ /// ring is the scan-0 flush state, then by definition the Scan Data
+ /// Register is always 0. Therefore we can simply write the difference to
+ /// the Scan Data Register rather than using a read-XOR-write.
+ uint8_t iv_flushOptimization;
+
+ /// Ring ID uniquely identifying the repair name. (See the list of ring
+ /// name vs ring IDs in p8_ring_identification.c).
+ uint8_t iv_ringId;
+
+ /// 7-bit pervasive chiplet Id + Multicast bit
+ ///
+ /// This field is right-justified in an 8-byte aligned doubleword so that
+ /// the P0 register can be directly updated from the doubelword value in a
+ /// data register.
+ uint8_t iv_chipletId;
+
} CompressedScanData;
+
/// Endian-translate a CompressedScanData structure
///
/// \param o_data A pointer to a CompressedScanData structure to receive the
@@ -98,14 +141,17 @@ compressed_scan_data_translate(CompressedScanData* o_data,
/// Compress a scan string using the RS4 compression algorithm
///
-/// \param[in,out] io_rs4 This is a pointer to a memory area which must be
-/// large enough to hold the worst-case result of compressing \a i_data_str
-/// and \a i_care_str (see below). Note that the CompressedScanData is
-/// always created in big-endian format, however the caller can use
-/// compresed_scan_data_translate() to create a copy of the header in
-/// host format.
+/// \param[in,out] io_data This is a pointer to a memory area which must be
+/// large enough to hold the worst-case result of compressing \a i_string (see
+/// below). Note that the CompressedScanData is always created in big-endian
+/// format, however the caller can use compresed_scan_data_translate() to
+/// create a copy of the header in host format.
+///
+/// \param[in] i_dataSize The size of \a io_data in bytes.
///
-/// \param[in] i_size The size of the buffer pointed to by \a io_rs4.
+/// \param[out] o_imageSize The effective size of the entire compressed scan
+/// data structure (header + compressed data) created in \a io_data, in bytes.
+/// This value will always be a multiple of 8.
///
/// \param[in] i_data_str The string to compress. Scan data to compress is
/// left-justified in this input string.
@@ -116,42 +162,61 @@ compressed_scan_data_translate(CompressedScanData* o_data,
/// \param[in] i_length The length of the input string in \e bits. It is
/// assumed the \a i_string contains at least (\a i_length + 7) / 8 bytes.
///
-/// \param[in] i_scanAddr The 32-bit scan address.
+/// \param[in] i_scanSelect The 64-bit value written to the Scan Select
+/// register to set up for the scan.
///
/// \param[in] i_ringId The ring ID that uniquely identifies the ring name of
-/// a repair ring. (See p9_ring_id.h for more info.)
+/// a repair ring. (See p8_ring_identification.c for more info.)
+///
+/// \param[in] i_chipletId The 7-bit value for the iv_chipletId field of the
+/// CompressedScanData.
+///
+/// \param[in] i_flushOptimization This input parameter should be set to a
+/// non-0 value if it is known that this ring difference will be applied to a
+/// scan-0 flush state. This will improve the performance of the
+/// decompress-scan routine. If the initial state of the ring is unknown, set
+/// this parameter to 0.
///
/// This API is required for integration with PHYP which does not support
/// malloc(). Applications in environments supporting malloc() can use
/// rs4_compress() instead.
///
-/// We always require the worst-case amount of memory including the header and
+/// The worst-case compression for RS4 requires 2 nibbles of control overhead
+/// per 15 nibbles of data (17/15), plus a maximum of 2 nibbles of termination.
+/// We always require this worst-case amount of memory including the header and
/// any rounding required to guarantee that the data size is a multiple of 8
/// bytes. The final image size is also rounded up to a multiple of 8 bytes.
-/// If the \a io_size is less than this amount (based on \a i_length) the
+/// If the \a i_dataSize is less than this amount (based on \a i_length) the
/// call will fail.
///
/// \returns See \ref scan_compression_codes
int
-_rs4_compress(CompressedScanData* io_rs4,
- const uint32_t i_size,
+_rs4_compress(CompressedScanData* io_data,
+ uint32_t i_dataSize,
+ uint32_t* o_imageSize,
const uint8_t* i_data_str,
const uint8_t* i_care_str,
const uint32_t i_length,
- const uint32_t i_scanAddr,
- const uint16_t i_ringId);
+ const uint64_t i_scanSelect,
+ const uint8_t i_ringId,
+ const uint8_t i_chipletId,
+ const uint8_t i_flushOptimization);
/// Compress a scan string using the RS4 compression algorithm
///
-/// \param[out] o_rs4 This algorithm uses malloc() to allocate memory for the
-/// compressed data, and returns a pointer to this memory in \a o_rs4. After
+/// \param[out] o_data This algorithm uses malloc() to allocate memory for the
+/// compresed data, and returns a pointer to this memory in \a o_data. After
/// the call this memory is owned by the caller who is responsible for
/// free()-ing the data area once it is no longer required. Note that the
/// CompressedScanData is always created in big-endian format, however the
/// caller can use compresed_scan_data_translate() to create a copy of the
/// header in host format.
///
+/// \param[out] o_size The effective size of the entire compressed scan data
+/// structure (header + compressed data) pointed to by \a o_data, in bytes.
+/// This value will always be a multiple of 8.
+///
/// \param[in] i_data_str The string to compress. Scan data to compress is
/// left-justified in this input string.
///
@@ -161,19 +226,33 @@ _rs4_compress(CompressedScanData* io_rs4,
/// \param[in] i_length The length of the input string in \e bits. It is
/// assumed the \a i_string contains at least (\a i_length + 7) / 8 bytes.
///
-/// \param[in] i_scanAddr The 32-bit scan address.
+/// \param[in] i_scanSelect The 64-bit value written to the Scan Select
+/// register to set up for the scan. Only the 32 high-order bits are actually
+/// stored.
///
/// \param[in] i_ringId The ring ID that uniquely identifies the ring name of
-/// a repair ring. (See p9_ring_id.c for more info.)
+/// a repair ring. (See p8_ring_identification.c for more info.)
+///
+/// \param[in] i_chipletId The 7-bit value for the iv_chipletId field of the
+/// CompressedScanData.
+///
+/// \param[in] i_flushOptimization This input parameter should be set to a
+/// non-0 value if it is known that this ring difference will be applied to a
+/// scan-0 flush state. This will improve the performance of the
+/// decompress-scan routine. If the initial state of the ring is unknown, set
+/// this parameter to 0.
///
/// \returns See \ref scan_compression_codes
int
-rs4_compress(CompressedScanData** o_rs4,
+rs4_compress(CompressedScanData** o_data,
+ uint32_t* o_size,
const uint8_t* i_data_str,
const uint8_t* i_care_str,
const uint32_t i_length,
- const uint32_t i_scanAddr,
- const uint8_t i_ringId);
+ const uint64_t i_scanSelect,
+ const uint8_t i_ringId,
+ const uint8_t i_chipletId,
+ const uint8_t i_flushOptimization);
/// Decompress a scan string compressed using the RS4 compression algorithm
@@ -188,7 +267,8 @@ rs4_compress(CompressedScanData** o_rs4,
/// the decompressed care mask, which is the size of the original string in
/// bits rounded up to the nearest byte.
///
-/// \param[in] i_size The size in \e bytes of \a io_data_str and \a io_care_str.
+/// \param[in] i_stringSize The size (in bytes) of \a io_data_str and
+/// \a io_care_str.
///
/// \param[out] o_length The length of the decompressed string in \e bits.
///
@@ -203,7 +283,7 @@ rs4_compress(CompressedScanData** o_rs4,
int
_rs4_decompress(uint8_t* io_data_str,
uint8_t* io_care_str,
- uint32_t i_size,
+ uint32_t i_stringSize,
uint32_t* o_length,
const CompressedScanData* i_rs4);
@@ -222,7 +302,7 @@ _rs4_decompress(uint8_t* io_data_str,
/// in \e bits. The caller may assume that \a o_data_str and o_care_str each
/// contain at least (\a o_length + 7) / 8 \e bytes.
///
-/// \param[in] i_rs4 A pointer to the CompressedScanData header and data to be
+/// \param[in] i_rs4 A pointer to the CompressedScanData header + data to be
/// decompressed.
///
/// \returns See \ref scan_compression_codes
@@ -248,31 +328,26 @@ rs4_redundant(const CompressedScanData* i_data, int* o_redundant);
#endif // __ASSEMBLER__
-/// \defgroup scan_compression_magic Scan Compression Magic Numbers
+/// The current version of the CompressedScanData structure
///
-/// @ {
+/// This constant is required to be a #define to guarantee consistency between
+/// the header format and cmopiled code.
+#define COMPRESSED_SCAN_DATA_VERSION 2
-/// RS4 Magic
-#define RS4_MAGIC 0x5253 /* "RS" */
+/// The size of the CompressedScanData structure
+#define COMPRESSED_SCAN_DATA_SIZE (uint8_t)24
-/// @}
-/// \defgroup scan_compression_version_type version and type accessors
-///
-/// @{
-
-/// The current version of the CompressedScanData structure
-///
-/// This constant is required to be a #define to guarantee consistency between
-/// the header format and compiled code.
-#define RS4_VERSION 3
+/// \defgroup scan_compression_magic Scan Compression Magic Numbers
+/////
+/// @ {
-/// Scan data types
-#define RS4_SCAN_DATA_TYPE_CMSK 1
-#define RS4_SCAN_DATA_TYPE_NON_CMSK 0
+/// RS4 Magic
+#define RS4_MAGIC (uint32_t)0x52533402 /* "RS4" + Version 0x02 */
/// @}
+
/// \defgroup scan_compression_codes Scan Compression Return Codes
///
/// @{
@@ -313,9 +388,6 @@ rs4_redundant(const CompressedScanData* i_data, int* o_redundant);
/// Invalid transition in state machine
#define SCAN_COMPRESSION_STATE_ERROR 6
-/// wrong compression version
-#define SCAN_COMPRESSION_VERSION_ERROR 7
-
/// @}
#endif // __P9_SCAN_COMPRESSION_H__
diff --git a/src/import/chips/p9/utils/imageProcs/p9_tor.C b/src/import/chips/p9/utils/imageProcs/p9_tor.C
index c76fb8800..aa8ef343d 100644
--- a/src/import/chips/p9/utils/imageProcs/p9_tor.C
+++ b/src/import/chips/p9/utils/imageProcs/p9_tor.C
@@ -39,7 +39,6 @@
#include "p9_ringId.H"
#include "p9_tor.H"
#include "p9_xip_image.h"
-#include "p9_scan_compression.H"
#include "p9_infrastruct_help.H"
namespace P9_TOR
@@ -66,56 +65,50 @@ const char* ringVariantName[] = { "BASE",
//
//////////////////////////////////////////////////////////////////////////////////
static
-int get_ring_from_sbe_image( void* i_ringSection, // Ring section ptr
- uint64_t i_magic, // Image Magic Number
- RingID i_ringId, // Ring ID
- uint16_t i_ddLevelOffset, // DD level offset (wrt i_ringSection)
- RingType_t& io_RingType, // Common, Instance
- RingVariant_t i_RingVariant, // Base,CC, RL, Ovrd, Ovly
- uint8_t& io_instanceId, // Instance ID
- RingBlockType_t i_RingBlockType, // Single ring, Block
- void** io_ringBlockPtr, // Output ring buffer
- uint32_t& io_ringBlockSize, // Size of ring data
- char* o_ringName, // Name of ring
- uint32_t i_dbgl ) // Debug option
+int get_ring_from_sbe_image ( void* i_ringSection, // Ring section ptr
+ uint64_t i_magic, // Image Magic Number
+ RingID i_ringId, // Ring ID
+ uint16_t i_ddLevel, // DD level
+ RingType_t& io_RingType, // Common, Instance
+ RingVariant_t i_RingVariant, // Base,CC, RL, Ovrd, Ovly
+ uint8_t& io_instanceId, // Instance ID
+ RingBlockType_t i_RingBlockType, // Single ring, Block
+ void** io_ringBlockPtr, // Output ring buffer
+ uint32_t& io_ringBlockSize, // Size of ring data
+ char* o_ringName, // Name of ring
+ uint32_t i_dbgl ) // Debug option
{
- int rc = TOR_SUCCESS;
+ uint32_t acc_offset = 0; // Accumulating offset to next TOR offset slot
+ uint32_t ring_offset = 0;
+ uint16_t chiplet_offset = 0;
+ uint32_t next_ring_offset = 0;
+ uint32_t ringSize = 0;
+ int temp = i_ddLevel >> 2; // converting byte to word counter
+ uint32_t* deltaRingRS4_4B;
+ uint32_t sbe_offset = 0;
RingVariantOrder* ring_variant_order = NULL;
- uint32_t tor_slot_no = 0; // TOR slot number (within a TOR chiplet section)
- uint16_t dd_level_offset; // Local DD level offset, if any (wrt i_ringSection)
- uint32_t acc_offset = 0; // Accumulating offset to next TOR offset
- uint32_t ppe_offset = 0; // Local offset to where SBE PPE section starts
- uint32_t cplt_offset = 0; // Local offset to where SBE chiplet section starts
- uint16_t ring_offset = 0; // Local offset to where SBE ring container/block starts
- uint32_t ring_size = 0; // Size of whole ring container/block.
if (i_magic == P9_XIP_MAGIC_HW)
{
- dd_level_offset = i_ddLevelOffset;
- ppe_offset = *(uint32_t*)((uint8_t*)i_ringSection + dd_level_offset);
- ppe_offset = htobe32(ppe_offset);
+ sbe_offset = *((uint32_t*)i_ringSection + temp); //DD level offset index
+ temp = htobe32(sbe_offset);
}
else if (i_magic == P9_XIP_MAGIC_SEEPROM)
{
- ppe_offset = 0;
- dd_level_offset = 0;
- ppe_offset = htobe32(ppe_offset);
- }
- else
- {
- MY_ERR("Magic number i_magic=0x%016lX is not valid for SBE\n", (uintptr_t)i_magic);
- return TOR_INVALID_MAGIC_NUMBER;
+ sbe_offset = 0;
+ i_ddLevel = 0;
+ temp = htobe32(sbe_offset);
}
// Looper for each SBE chiplet
- for(int iCplt = 0; iCplt < SBE_NOOF_CHIPLETS; iCplt++)
+ for(int l = 0; l < SBE_NOOF_CHIPLETS; l++)
{
GenRingIdList* ring_id_list_common = NULL;
GenRingIdList* ring_id_list_instance = NULL;
CHIPLET_DATA l_cpltData;
uint8_t l_num_variant = 1;
- switch (iCplt)
+ switch (l)
{
case PERV_CPLT :
l_cpltData = PERV::g_pervData;
@@ -213,6 +206,7 @@ int get_ring_from_sbe_image( void* i_ringSection, // Ring section
ring_variant_order = (RingVariantOrder*) PCI0::RING_VARIANT_ORDER;
break;
+
case PCI1_CPLT :
l_cpltData = PCI1::g_pci1Data;
l_num_variant = (uint8_t)sizeof(PCI1::RingVariants) / sizeof(uint16_t);
@@ -246,7 +240,7 @@ int get_ring_from_sbe_image( void* i_ringSection, // Ring section
break;
default :
- MY_ERR("Chiplet=%d is not valid for SBE. \n", iCplt);
+ MY_ERR("Chiplet=%d is not valid. \n", l);
return TOR_INVALID_CHIPLET;
}
@@ -259,51 +253,43 @@ int get_ring_from_sbe_image( void* i_ringSection, // Ring section
l_num_variant);
}
-
- //
- // Sequentially walk the TOR slots within the chiplet's COMMON section
- //
- tor_slot_no = 0;
+ uint32_t local = 0;
for (uint8_t i = 0; i < l_cpltData.iv_num_common_rings ; i++)
{
- for (uint8_t iVariant = 0; iVariant < l_num_variant ; iVariant++)
+ for (uint8_t j = 0; j < l_num_variant ; j++)
{
if (i_dbgl > 2)
{
- MY_INF(" Ring %s Cplt common ring id %d Variant id %d\n",
- (ring_id_list_common + i)->ringName, i, iVariant);
+ MY_INF(" Ring name %s Cplt Common ring id %d Variant id %d",
+ (ring_id_list_common + i)->ringName, i, j);
}
if ((strcmp( (ring_id_list_common + i)->ringName,
RING_PROPERTIES[i_ringId].iv_name) == 0)
- && ( i_RingVariant == ring_variant_order->variant[iVariant]
+ && ( i_RingVariant == ring_variant_order->variant[j]
|| (i_RingVariant == OVERRIDE && i_magic == P9_XIP_MAGIC_SEEPROM)))
{
strcpy(o_ringName, RING_PROPERTIES[i_ringId].iv_name);
-
- acc_offset = dd_level_offset + ppe_offset + iCplt * sizeof(TorPpeBlock_t);
- cplt_offset = *(uint32_t*)( (uint8_t*)i_ringSection +
- acc_offset );
- cplt_offset = htobe32(cplt_offset);
-
- acc_offset = dd_level_offset + ppe_offset + cplt_offset;
- ring_offset = *(uint16_t*)( (uint8_t*)i_ringSection +
- acc_offset +
- tor_slot_no * sizeof(ring_offset) );
- ring_offset = htobe16(ring_offset);
+ uint32_t var = l * sizeof(TorPpeBlock_t) + i_ddLevel + temp;
+ int temp1 = var / sizeof(uint32_t);
+ ring_offset = *((uint32_t*)i_ringSection + temp1);
+ ring_offset = htobe32(ring_offset);
+ var = ring_offset + i_ddLevel + temp;
+ temp1 = var / sizeof(uint16_t) + local;
+ chiplet_offset = *((uint16_t*)i_ringSection + temp1);
+ chiplet_offset = htobe16(chiplet_offset);
if (i_RingBlockType == GET_SINGLE_RING)
{
- acc_offset = dd_level_offset +
- ppe_offset +
- cplt_offset +
- ring_offset;
- ring_size = htobe16( ((CompressedScanData*)
- ((uint8_t*)i_ringSection + acc_offset))->iv_size );
+ var = ring_offset + (chiplet_offset - sizeof(TorPpeBlock_t)) + i_ddLevel + temp;
+ temp1 = var / sizeof(uint32_t);
+ next_ring_offset = *((uint32_t*)i_ringSection + temp1);
+ next_ring_offset = htobe32(next_ring_offset);
+ ringSize = next_ring_offset;
io_RingType = COMMON;
- if (ring_offset)
+ if (chiplet_offset)
{
if (io_ringBlockSize == 0)
{
@@ -312,11 +298,11 @@ int get_ring_from_sbe_image( void* i_ringSection, // Ring section
MY_INF("\tio_ringBlockSize is zero. Returning required size.\n");
}
- io_ringBlockSize = ring_size;
+ io_ringBlockSize = ringSize;
return 0;
}
- if (io_ringBlockSize < ring_size)
+ if (io_ringBlockSize < ringSize)
{
MY_ERR("\tio_ringBlockSize is less than required size.\n");
return TOR_BUFFER_TOO_SMALL;
@@ -324,124 +310,119 @@ int get_ring_from_sbe_image( void* i_ringSection, // Ring section
if (i_dbgl > 0)
{
- MY_INF(" Ring %s found in the SBE section \n", o_ringName);
+ MY_INF(" ring container of %s is found in the SBE image container \n",
+ o_ringName);
}
- memcpy( (uint8_t*)(*io_ringBlockPtr), (uint8_t*)i_ringSection + acc_offset,
- (size_t)ring_size);
+ memcpy( (uint8_t*)(*io_ringBlockPtr), (uint8_t*)i_ringSection + var,
+ (size_t)ringSize);
- io_ringBlockSize = ring_size;
+ io_ringBlockSize = ringSize;
io_instanceId = (ring_id_list_common + i)->instanceIdMin;
- rc = TOR_RING_FOUND;
+
+ if (i_dbgl > 0)
+ {
+ MY_INF(" After get_ring_from_sbe_image Size %d \n", io_ringBlockSize);
+ }
+
+ if (i_dbgl > 1)
+ {
+ MY_INF("Hex details Chiplet offset 0x%08x local offset 0x%08x " \
+ "ring offset 0x%08x start adr 0x%08x size 0x%08x size 0x%08x \n",
+ var, temp, ring_offset, chiplet_offset, next_ring_offset, ringSize);
+ MY_INF("Chiplet %d ChipletRing TOR offset %d %d %d Size %d %d \t\n",
+ i, ring_offset, chiplet_offset, next_ring_offset, ringSize, temp);
+ }
+
+ if (i_dbgl > 2)
+ {
+ deltaRingRS4_4B = (uint32_t*)(*io_ringBlockPtr);
+
+ for (uint32_t m = 0; m < ringSize / sizeof(uint32_t); m++)
+ {
+ MY_INF("compressed data %d --- %08x \t", m, htobe32(deltaRingRS4_4B[m]));
+ }
+
+ MY_INF("\n");
+ }
+
+ return TOR_RING_FOUND;
}
else
{
if (i_dbgl > 0)
{
- MY_INF(" Ring %s not found in the SBE section \n", o_ringName);
+ MY_INF(" ring container of %s is not found in the SBE image container \n",
+ o_ringName);
}
- rc = TOR_RING_NOT_FOUND;
+ return TOR_RING_NOT_FOUND;
}
-
- if (i_dbgl > 0)
- {
- MY_INF(" Hex details (SBE) for Chiplet #%d: \n"
- " DD number section's offset to DD level section = 0x%08x \n"
- " DD level section's offset to PpeType = 0x%08x \n"
- " PpeType section's offset to chiplet = 0x%08x \n"
- " Chiplet section's offset to RS4 header = 0x%08x \n"
- " Full offset to RS4 header = 0x%08x \n"
- " Ring size = 0x%08x \n",
- i, dd_level_offset, ppe_offset, cplt_offset, ring_offset, acc_offset, ring_size);
- }
-
- return rc;
-
}
else if (i_RingBlockType == PUT_SINGLE_RING)
{
- if (ring_offset)
+ if (chiplet_offset)
{
MY_ERR("Ring container is already present in the SBE section \n");
return TOR_RING_AVAILABLE_IN_RINGSECTION;
}
- // Special [mis]use of io_ringBlockPtr and io_ringBlockSize:
- // Put location of chiplet's common section into ringBlockPtr
+ acc_offset = var;
+ io_ringBlockSize = acc_offset + (local * RING_OFFSET_SIZE);
memcpy( (uint8_t*)(*io_ringBlockPtr), &acc_offset, sizeof(acc_offset));
- // Put location of ring_offset slot into ringBlockSize
- io_ringBlockSize = acc_offset + (tor_slot_no * sizeof(ring_offset));
return TOR_RING_FOUND;
}
- else
- {
- MY_ERR("Ring block type (i_RingBlockType=%d) is not supported for SBE \n", i_RingBlockType);
- return TOR_INVALID_RING_BLOCK_TYPE;
- }
}
- tor_slot_no++; // Next TOR slot
+ local++;
}
}
+ local = 0;
- //
- // Sequentially walk the TOR slots within the chiplet's INSTANCE section
- //
- tor_slot_no = 0;
-
- for ( uint8_t i = (ring_id_list_instance + 0)->instanceIdMin;
- i < (ring_id_list_instance + 0)->instanceIdMax + 1 ; i++ )
+ for(uint8_t i = (ring_id_list_instance + 0)->instanceIdMin;
+ i < (ring_id_list_instance + 0)->instanceIdMax + 1 ; i++)
{
for (uint8_t j = 0; j < l_cpltData.iv_num_instance_rings; j++)
{
- for (uint8_t iVariant = 0; iVariant < l_num_variant ; iVariant++)
+ for(uint8_t k = 0; k < l_num_variant ; k++)
{
if (i_dbgl > 2)
{
MY_INF(" Ring name %s Cplt instance ring id %d Variant id %d Instance id %d\n",
- (ring_id_list_instance + j)->ringName, j, iVariant, i);
+ (ring_id_list_instance + j)->ringName, j, k, i);
}
- if (strcmp( (ring_id_list_instance + j)->ringName,
- RING_PROPERTIES[i_ringId].iv_name) == 0)
+ if (strcmp( (ring_id_list_instance + j)->ringName,
+ RING_PROPERTIES[i_ringId].iv_name) == 0)
{
if ( io_instanceId >= (ring_id_list_instance + 0)->instanceIdMin
- && io_instanceId <= (ring_id_list_instance + 0)->instanceIdMax )
+ && io_instanceId <= (ring_id_list_instance + 0)->instanceIdMax)
{
- if (i == io_instanceId && i_RingVariant == ring_variant_order->variant[iVariant])
+ if ( i == io_instanceId && i_RingVariant == ring_variant_order->variant[k] )
{
strcpy(o_ringName, RING_PROPERTIES[i_ringId].iv_name);
-
- acc_offset = dd_level_offset +
- ppe_offset +
- iCplt * sizeof(TorPpeBlock_t) +
- sizeof(cplt_offset); // Jump to instance offset
- cplt_offset = *(uint32_t*)( (uint8_t*)i_ringSection +
- acc_offset );
- cplt_offset = htobe32(cplt_offset);
-
- acc_offset = cplt_offset + dd_level_offset + ppe_offset;
- ring_offset = *(uint16_t*)( (uint8_t*)i_ringSection +
- acc_offset +
- tor_slot_no * sizeof(ring_offset) );
- ring_offset = htobe16(ring_offset);
+ uint32_t var = l * sizeof(TorPpeBlock_t) + i_ddLevel + temp + CPLT_OFFSET_SIZE;
+ int temp1 = var / sizeof(uint32_t);
+ ring_offset = *((uint32_t*)i_ringSection + temp1);
+ ring_offset = htobe32(ring_offset);
+ var = ring_offset + i_ddLevel + temp;
+ temp1 = var / sizeof(uint16_t) + local;
+ chiplet_offset = *((uint16_t*)i_ringSection + temp1);
+ chiplet_offset = htobe16(chiplet_offset);
if (i_RingBlockType == GET_SINGLE_RING)
{
- acc_offset = dd_level_offset +
- ppe_offset +
- cplt_offset +
- ring_offset;
- ring_size = htobe16( ((CompressedScanData*)
- ((uint8_t*)i_ringSection +
- acc_offset))->iv_size );
+ var = ring_offset + (chiplet_offset - sizeof(TorPpeBlock_t)) + i_ddLevel + temp;
+ temp1 = var / sizeof(uint32_t);
+ next_ring_offset = *((uint32_t*)i_ringSection + temp1);
+ next_ring_offset = htobe32(next_ring_offset);
+ ringSize = next_ring_offset;
io_RingType = INSTANCE;
- if (ring_offset)
+ if (chiplet_offset)
{
if (io_ringBlockSize == 0)
{
@@ -450,11 +431,11 @@ int get_ring_from_sbe_image( void* i_ringSection, // Ring section
MY_INF("\tio_ringBlockSize is zero. Returning required size.\n");
}
- io_ringBlockSize = ring_size;
+ io_ringBlockSize = ringSize;
return 0;
}
- if (io_ringBlockSize < ring_size)
+ if (io_ringBlockSize < ringSize)
{
MY_ERR("\tio_ringBlockSize is less than required size.\n");
return TOR_BUFFER_TOO_SMALL;
@@ -466,82 +447,84 @@ int get_ring_from_sbe_image( void* i_ringSection, // Ring section
o_ringName);
}
- memcpy( (uint8_t*)(*io_ringBlockPtr), (uint8_t*)i_ringSection + acc_offset,
- (size_t)ring_size);
+ memcpy( (uint8_t*)(*io_ringBlockPtr), (uint8_t*)i_ringSection + var,
+ (size_t)ringSize);
- io_ringBlockSize = ring_size;
+ io_ringBlockSize = ringSize;
if (i_dbgl > 0)
{
MY_INF(" After get_ring_from_sbe_image Size %d \n", io_ringBlockSize);
}
- rc = TOR_RING_FOUND;
+ if (i_dbgl > 1)
+ {
+ MY_INF(" 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x \n",
+ var, temp, ring_offset, chiplet_offset, next_ring_offset, ringSize);
+ MY_INF("Chiplet %d ChipletRing TOR offset %d %d %d Size %d %d \t\n",
+ i, ring_offset, chiplet_offset, next_ring_offset, ringSize, temp);
+ }
+
+ if (i_dbgl > 2)
+ {
+ deltaRingRS4_4B = (uint32_t*)(*io_ringBlockPtr);
+
+ for (uint32_t m = 0; m < ringSize / sizeof(uint32_t); m++)
+ {
+ MY_INF("compressed data %d --- %08x \t",
+ m, htobe32(deltaRingRS4_4B[m]));
+ }
+
+ MY_INF("\n");
+ }
+
+ return TOR_RING_FOUND;
}
else
{
if (i_dbgl > 0)
{
- MY_INF(" Ring %s not found in SBE section \n", o_ringName);
+ MY_INF(" ring container of %s is not found in the SBE image container \n",
+ o_ringName);
}
- rc = TOR_RING_NOT_FOUND;
- }
-
- if (i_dbgl > 0)
- {
- MY_INF(" Hex details (SBE) for Chiplet #%d: \n"
- " DD number section's offset to DD level section = 0x%08x \n"
- " DD level section's offset to PpeType = 0x%08x \n"
- " PpeType section's offset to chiplet = 0x%08x \n"
- " Chiplet section's offset to RS4 header = 0x%08x \n"
- " Full offset to RS4 header = 0x%08x \n"
- " Ring size = 0x%08x \n",
- i, dd_level_offset, ppe_offset, cplt_offset, ring_offset, acc_offset, ring_size);
+ return TOR_RING_NOT_FOUND;
}
-
- return rc;
}
else if (i_RingBlockType == PUT_SINGLE_RING)
{
- if (ring_offset)
+ if (chiplet_offset)
{
MY_ERR("Ring container is already present in the SBE section \n");
return TOR_RING_AVAILABLE_IN_RINGSECTION;
}
- // Special [mis]use of io_ringBlockPtr and io_ringBlockSize:
- // Put location of chiplet's instance section into ringBlockPtr
+ acc_offset = var;
+ io_ringBlockSize = acc_offset + (local * RING_OFFSET_SIZE);
memcpy( (uint8_t*)(*io_ringBlockPtr), &acc_offset, sizeof(acc_offset));
- // Put location of ring_offset slot into ringBlockSize
- io_ringBlockSize = acc_offset + (tor_slot_no * sizeof(ring_offset));
return TOR_RING_FOUND;
}
- else
- {
- MY_ERR("Ring block type (i_RingBlockType=%d) is not supported for SBE \n", i_RingBlockType);
- return TOR_INVALID_RING_BLOCK_TYPE;
- }
}
+
}
else
{
MY_ERR(" SBE ring instance ID %d is invalid, Valid ID is from %d to %d \n",
io_instanceId, (ring_id_list_instance + 0)->instanceIdMin,
(ring_id_list_instance + 0)->instanceIdMax);
-
return TOR_INVALID_INSTANCE_ID;
}
}
- tor_slot_no++;
+ local++;
}
+
}
+
}
- }
- MY_ERR("i_ringId=0x%x is an invalid ring ID for SBE", i_ringId);
+ }
return TOR_INVALID_RING_ID;
@@ -558,7 +541,7 @@ static
int get_ring_from_sgpe_image ( void* i_ringSection, // Ring section ptr
uint64_t i_magic, // Image Magic Number
RingID i_ringId, // Ring ID
- uint16_t i_ddLevelOffset, // DD level offset
+ uint16_t i_ddLevel, // DD level details
RingType_t& io_RingType, // Common, Instance
RingVariant_t i_RingVariant, // Base,CC, RL, Ovrd, Ovly
uint8_t& io_instanceId, // Instance ID
@@ -571,8 +554,10 @@ int get_ring_from_sgpe_image ( void* i_ringSection, // Ring sectio
uint32_t acc_offset = 0; // Accumulating offset to next TOR offset slot
uint32_t ring_offset = 0;
uint16_t chiplet_offset = 0;
+ uint32_t next_ring_offset = 0;
uint32_t ringSize = 0;
- int temp = (i_ddLevelOffset >> 2) + 4; // converting byte to word counter
+ int temp = (i_ddLevel >> 2) + 4; // converting byte to word counter
+ uint32_t* deltaRingRS4_4B;
uint32_t spge_offset = 0;
if (i_magic == P9_XIP_MAGIC_HW)
@@ -583,7 +568,7 @@ int get_ring_from_sgpe_image ( void* i_ringSection, // Ring sectio
else if (i_magic == P9_XIP_MAGIC_SGPE)
{
spge_offset = 0;
- i_ddLevelOffset = 0;
+ i_ddLevel = 0;
temp = htobe32(spge_offset);
}
@@ -601,7 +586,7 @@ int get_ring_from_sgpe_image ( void* i_ringSection, // Ring sectio
{
if (i_dbgl > 2)
{
- MY_INF(" Ring %s Cplt common ring id %d Variant id %d\n",
+ MY_INF(" Ring name %s Cplt Common ring id %d Variant id %d",
(ring_id_list_common + i)->ringName, i, j);
}
@@ -609,21 +594,22 @@ int get_ring_from_sgpe_image ( void* i_ringSection, // Ring sectio
RING_PROPERTIES[i_ringId].iv_name) == 0) && ( i_RingVariant == j ))
{
strcpy(o_ringName, RING_PROPERTIES[i_ringId].iv_name);
- uint32_t var = 0 + i_ddLevelOffset + temp;
+ uint32_t var = 0 + i_ddLevel + temp;
int temp1 = var / sizeof(uint32_t);
ring_offset = *((uint32_t*)i_ringSection + temp1);
ring_offset = htobe32(ring_offset);
- var = ring_offset + i_ddLevelOffset + temp;
+ var = ring_offset + i_ddLevel + temp;
temp1 = var / sizeof(uint16_t) + local;
chiplet_offset = *((uint16_t*)i_ringSection + temp1);
chiplet_offset = htobe16(chiplet_offset);
if (i_RingBlockType == GET_SINGLE_RING)
{
- var = ring_offset + chiplet_offset + i_ddLevelOffset + temp;
- ringSize = htobe16( ((CompressedScanData*)
- ((uint8_t*)i_ringSection +
- var))->iv_size );
+ var = ring_offset + (chiplet_offset - sizeof(TorPpeBlock_t)) + i_ddLevel + temp;
+ temp1 = var / sizeof(uint32_t);
+ next_ring_offset = *((uint32_t*)i_ringSection + temp1);
+ next_ring_offset = htobe32(next_ring_offset);
+ ringSize = next_ring_offset;
io_RingType = COMMON;
if (chiplet_offset)
@@ -647,7 +633,8 @@ int get_ring_from_sgpe_image ( void* i_ringSection, // Ring sectio
if (i_dbgl > 0)
{
- MY_INF(" Ring %s found in the SGPE section \n", o_ringName);
+ MY_INF(" ring container of %s is found in the SGPE image container && ring offset %d \n",
+ o_ringName, chiplet_offset);
}
memcpy( (uint8_t*)(*io_ringBlockPtr), (uint8_t*)i_ringSection + var,
@@ -658,9 +645,28 @@ int get_ring_from_sgpe_image ( void* i_ringSection, // Ring sectio
if (i_dbgl > 0)
{
- MY_INF(" Hex details (SGPE): Chiplet #%d offset 0x%08x local offset 0x%08x " \
- "ring offset 0x%08x start adr 0x%08x ringSize=0x%08x \n",
- i, var, temp, ring_offset, chiplet_offset, ringSize);
+ MY_INF(" After get_ring_from_sgpe_image Size %d \n", io_ringBlockSize);
+ }
+
+ if (i_dbgl > 1)
+ {
+ MY_INF("Hex details Chiplet offset 0x%08x local offset 0x%08x " \
+ "ring offset 0x%08x start adr 0x%08x size 0x%08x size 0x%08x \n",
+ var, temp, ring_offset, chiplet_offset, next_ring_offset, ringSize);
+ MY_INF("Chiplet %d ChipletRing TOR offset %d %d %d Size %d %d \t\n",
+ i, ring_offset, chiplet_offset, next_ring_offset, ringSize, temp);
+ }
+
+ if (i_dbgl > 2)
+ {
+ deltaRingRS4_4B = (uint32_t*)(*io_ringBlockPtr);
+
+ for (uint32_t m = 0; m < ringSize / sizeof(uint32_t); m++)
+ {
+ MY_INF("compressed data %d --- %08x \t", m, htobe32(deltaRingRS4_4B[m]));
+ }
+
+ MY_INF("\n");
}
return TOR_RING_FOUND;
@@ -669,7 +675,8 @@ int get_ring_from_sgpe_image ( void* i_ringSection, // Ring sectio
{
if (i_dbgl > 0)
{
- MY_INF(" Ring %s not found in the SGPE section \n", o_ringName);
+ MY_INF(" ring container of %s is not found in the SGPE image container \n",
+ o_ringName);
}
return TOR_RING_NOT_FOUND;
@@ -689,11 +696,6 @@ int get_ring_from_sgpe_image ( void* i_ringSection, // Ring sectio
return TOR_RING_FOUND;
}
- else
- {
- MY_ERR("Ring block type (i_RingBlockType=%d) is not supported for SGPE \n", i_RingBlockType);
- return TOR_INVALID_RING_BLOCK_TYPE;
- }
}
local++;
@@ -726,21 +728,22 @@ int get_ring_from_sgpe_image ( void* i_ringSection, // Ring sectio
if ( i == io_instanceId && k == i_RingVariant )
{
strcpy(o_ringName, RING_PROPERTIES[i_ringId].iv_name);
- uint32_t var = CPLT_OFFSET_SIZE + i_ddLevelOffset + temp;
+ uint32_t var = CPLT_OFFSET_SIZE + i_ddLevel + temp;
int temp1 = var / sizeof(uint32_t);
ring_offset = *((uint32_t*)i_ringSection + temp1);
ring_offset = htobe32(ring_offset);
- var = ring_offset + i_ddLevelOffset + temp;
+ var = ring_offset + i_ddLevel + temp;
temp1 = var / sizeof(uint16_t) + local;
chiplet_offset = *((uint16_t*)i_ringSection + temp1);
chiplet_offset = htobe16(chiplet_offset);
if (i_RingBlockType == GET_SINGLE_RING)
{
- var = ring_offset + chiplet_offset + i_ddLevelOffset + temp;
- ringSize = htobe16( ((CompressedScanData*)
- ((uint8_t*)i_ringSection +
- var))->iv_size );
+ var = ring_offset + (chiplet_offset - sizeof(TorPpeBlock_t)) + i_ddLevel + temp;
+ temp1 = var / sizeof(uint32_t);
+ next_ring_offset = *((uint32_t*)i_ringSection + temp1);
+ next_ring_offset = htobe32(next_ring_offset);
+ ringSize = next_ring_offset;
io_RingType = INSTANCE;
if (chiplet_offset)
@@ -778,11 +781,24 @@ int get_ring_from_sgpe_image ( void* i_ringSection, // Ring sectio
MY_INF(" After get_ring_from_sgpe_image Size %d \n", io_ringBlockSize);
}
- if (i_dbgl > 0)
+ if (i_dbgl > 1)
+ {
+ MY_INF(" 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x \n",
+ var, temp, ring_offset, chiplet_offset, next_ring_offset, ringSize);
+ MY_INF("Chiplet %d ChipletRing TOR offset %d %d %d Size %d %d \t\n",
+ i, ring_offset, chiplet_offset, next_ring_offset, ringSize, temp);
+ }
+
+ if (i_dbgl > 2)
{
- MY_INF(" Hex details (SGPE): Chiplet #%d offset 0x%08x local offset 0x%08x " \
- "ring offset 0x%08x start adr 0x%08x ringSize=0x%08x \n",
- i, var, temp, ring_offset, chiplet_offset, ringSize);
+ deltaRingRS4_4B = (uint32_t*)(*io_ringBlockPtr);
+
+ for (uint32_t m = 0; m < ringSize / sizeof(uint32_t); m++)
+ {
+ MY_INF("compressed data %d --- %08x \t", m, htobe32(deltaRingRS4_4B[m]));
+ }
+
+ MY_INF("\n");
}
return TOR_RING_FOUND;
@@ -812,11 +828,6 @@ int get_ring_from_sgpe_image ( void* i_ringSection, // Ring sectio
return TOR_RING_FOUND;
}
- else
- {
- MY_ERR("Ring block type (i_RingBlockType=%d) is not supported for SGPE \n", i_RingBlockType);
- return TOR_INVALID_RING_BLOCK_TYPE;
- }
}
}
else
@@ -848,7 +859,7 @@ static
int get_ring_from_cme_image ( void* i_ringSection, // Ring section ptr
uint64_t i_magic, // Image Magic Number
RingID i_ringId, // Ring ID
- uint16_t i_ddLevelOffset, // DD level offset
+ uint16_t i_ddLevel, // DD level
RingType_t& io_RingType, // Common, Instance
RingVariant_t i_RingVariant, // Base,CC, RL, Ovrd, Ovly
uint8_t& io_instanceId, // instance ID
@@ -861,8 +872,10 @@ int get_ring_from_cme_image ( void* i_ringSection, // Ring section
uint32_t acc_offset = 0; // Accumulating offset to next TOR offset slot
uint32_t ring_offset = 0;
uint16_t chiplet_offset = 0;
+ uint32_t next_ring_offset = 0;
uint32_t ringSize = 0;
- int temp = (i_ddLevelOffset >> 2) + 2; // converting byte to word counter
+ int temp = (i_ddLevel >> 2) + 2; // converting byte to word counter
+ uint32_t* deltaRingRS4_4B;
uint32_t cme_offset = 0;
if (i_magic == P9_XIP_MAGIC_HW)
@@ -873,7 +886,7 @@ int get_ring_from_cme_image ( void* i_ringSection, // Ring section
else if (i_magic == P9_XIP_MAGIC_CME)
{
cme_offset = 0;
- i_ddLevelOffset = 0;
+ i_ddLevel = 0;
temp = htobe32(cme_offset);
}
@@ -891,7 +904,7 @@ int get_ring_from_cme_image ( void* i_ringSection, // Ring section
{
if (i_dbgl > 2)
{
- MY_INF(" Ring %s Cplt common ring id %d Variant id %d\n",
+ MY_INF(" Ring name %s Cplt Common ring id %d Variant id %d",
(ring_id_list_common + i)->ringName, i, j);
}
@@ -899,21 +912,22 @@ int get_ring_from_cme_image ( void* i_ringSection, // Ring section
RING_PROPERTIES[i_ringId].iv_name) == 0) && ( i_RingVariant == j ))
{
strcpy(o_ringName, RING_PROPERTIES[i_ringId].iv_name);
- uint32_t var = 0 + i_ddLevelOffset + temp;
+ uint32_t var = 0 + i_ddLevel + temp;
int temp1 = var / sizeof(uint32_t);
ring_offset = *((uint32_t*)i_ringSection + temp1);
ring_offset = htobe32(ring_offset);
- var = ring_offset + i_ddLevelOffset + temp;
+ var = ring_offset + i_ddLevel + temp;
temp1 = var / sizeof(uint16_t) + local;
chiplet_offset = *((uint16_t*)i_ringSection + temp1);
chiplet_offset = htobe16(chiplet_offset);
if (i_RingBlockType == GET_SINGLE_RING)
{
- var = ring_offset + chiplet_offset + i_ddLevelOffset + temp;
- ringSize = htobe16( ((CompressedScanData*)
- ((uint8_t*)i_ringSection +
- var))->iv_size );
+ var = ring_offset + (chiplet_offset - sizeof(TorPpeBlock_t)) + i_ddLevel + temp;
+ temp1 = var / sizeof(uint32_t);
+ next_ring_offset = *((uint32_t*)i_ringSection + temp1);
+ next_ring_offset = htobe32(next_ring_offset);
+ ringSize = next_ring_offset;
io_RingType = COMMON;
if (chiplet_offset)
@@ -937,7 +951,8 @@ int get_ring_from_cme_image ( void* i_ringSection, // Ring section
if (i_dbgl > 0)
{
- MY_INF(" Ring %s found in the CME section \n", o_ringName);
+ MY_INF(" ring container of %s is found in the CME image container \n",
+ o_ringName);
}
memcpy( (uint8_t*)(*io_ringBlockPtr), (uint8_t*)i_ringSection + var,
@@ -948,9 +963,28 @@ int get_ring_from_cme_image ( void* i_ringSection, // Ring section
if (i_dbgl > 0)
{
- MY_INF(" Hex details (CME): Chiplet #%d offset 0x%08x local offset 0x%08x " \
- "ring offset 0x%08x start adr 0x%08x ringSize=0x%08x \n",
- i, var, temp, ring_offset, chiplet_offset, ringSize);
+ MY_INF(" After get_ring_from_cme_image Size %d \n", io_ringBlockSize);
+ }
+
+ if (i_dbgl > 1)
+ {
+ MY_INF("Hex details Chiplet offset 0x%08x local offset 0x%08x " \
+ "ring offset 0x%08x start adr 0x%08x size 0x%08x size 0x%08x \n",
+ var, temp, ring_offset, chiplet_offset, next_ring_offset, ringSize);
+ MY_INF("Chiplet %d ChipletRing TOR offset %d %d %d Size %d %d \t\n",
+ i, ring_offset, chiplet_offset, next_ring_offset, ringSize, temp);
+ }
+
+ if (i_dbgl > 2)
+ {
+ deltaRingRS4_4B = (uint32_t*)(*io_ringBlockPtr);
+
+ for (uint32_t m = 0; m < ringSize / sizeof(uint32_t); m++)
+ {
+ MY_INF("compressed data %d --- %08x \t", m, htobe32(deltaRingRS4_4B[m]));
+ }
+
+ MY_INF("\n");
}
return TOR_RING_FOUND;
@@ -959,7 +993,8 @@ int get_ring_from_cme_image ( void* i_ringSection, // Ring section
{
if (i_dbgl > 0)
{
- MY_INF(" Ring %s not found in the CME section \n", o_ringName);
+ MY_INF(" ring container of %s is not found in the CME image container \n",
+ o_ringName);
}
return TOR_RING_NOT_FOUND;
@@ -979,11 +1014,6 @@ int get_ring_from_cme_image ( void* i_ringSection, // Ring section
return TOR_RING_FOUND;
}
- else
- {
- MY_ERR("Ring block type (i_RingBlockType=%d) is not supported for CME \n", i_RingBlockType);
- return TOR_INVALID_RING_BLOCK_TYPE;
- }
}
local++;
@@ -1019,21 +1049,22 @@ int get_ring_from_cme_image ( void* i_ringSection, // Ring section
if ( i == io_instanceId && k == i_RingVariant )
{
strcpy(o_ringName, RING_PROPERTIES[i_ringId].iv_name);
- uint32_t var = z * CPLT_OFFSET_SIZE + i_ddLevelOffset + temp + CPLT_OFFSET_SIZE;
+ uint32_t var = z * CPLT_OFFSET_SIZE + i_ddLevel + temp + CPLT_OFFSET_SIZE;
int temp1 = var / CPLT_OFFSET_SIZE;
ring_offset = *((uint32_t*)i_ringSection + temp1);
ring_offset = htobe32(ring_offset);
- var = ring_offset + i_ddLevelOffset + temp;
+ var = ring_offset + i_ddLevel + temp;
temp1 = var / sizeof(uint16_t) + local;
chiplet_offset = *((uint16_t*)i_ringSection + temp1);
chiplet_offset = htobe16(chiplet_offset);
if (i_RingBlockType == GET_SINGLE_RING)
{
- var = ring_offset + chiplet_offset + i_ddLevelOffset + temp;
- ringSize = htobe16( ((CompressedScanData*)
- ((uint8_t*)i_ringSection +
- var))->iv_size );
+ var = ring_offset + (chiplet_offset - sizeof(TorPpeBlock_t)) + i_ddLevel + temp;
+ temp1 = var / sizeof(uint32_t);
+ next_ring_offset = *((uint32_t*)i_ringSection + temp1);
+ next_ring_offset = htobe32(next_ring_offset);
+ ringSize = next_ring_offset;
io_RingType = INSTANCE;
if (chiplet_offset)
@@ -1057,9 +1088,10 @@ int get_ring_from_cme_image ( void* i_ringSection, // Ring section
if (i_dbgl > 0)
{
- MY_INF(" Hex details (CME): Chiplet #%d offset 0x%08x local offset 0x%08x " \
- "ring offset 0x%08x start adr 0x%08x ringSize=0x%08x \n",
- i, var, temp, ring_offset, chiplet_offset, ringSize);
+ MY_INF(" ring container of %s is found in the CME image container %d %d \n",
+ o_ringName, chiplet_offset, ringSize);
+ MY_INF(" 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x \n",
+ var, temp, ring_offset, chiplet_offset, next_ring_offset, ringSize);
}
memcpy( (uint8_t*)(*io_ringBlockPtr), (uint8_t*)i_ringSection + var,
@@ -1074,10 +1106,22 @@ int get_ring_from_cme_image ( void* i_ringSection, // Ring section
if (i_dbgl > 1)
{
- MY_INF(" 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x \n",
- var, temp, ring_offset, chiplet_offset, ringSize);
- MY_INF("Chiplet %d ChipletRing TOR offset %d %d Size %d %d \t\n",
- i, ring_offset, chiplet_offset, ringSize, temp);
+ MY_INF(" 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x \n",
+ var, temp, ring_offset, chiplet_offset, next_ring_offset, ringSize);
+ MY_INF("Chiplet %d ChipletRing TOR offset %d %d %d Size %d %d \t\n",
+ i, ring_offset, chiplet_offset, next_ring_offset, ringSize, temp);
+ }
+
+ if (i_dbgl > 2)
+ {
+ deltaRingRS4_4B = (uint32_t*)(*io_ringBlockPtr);
+
+ for (uint32_t m = 0; m < ringSize / sizeof(uint32_t); m++)
+ {
+ MY_INF("compressed data %d --- %08x \t", m, htobe32(deltaRingRS4_4B[m]));
+ }
+
+ MY_INF("\n");
}
return TOR_RING_FOUND;
@@ -1107,11 +1151,6 @@ int get_ring_from_cme_image ( void* i_ringSection, // Ring section
return TOR_RING_FOUND;
}
- else
- {
- MY_ERR("Ring block type (i_RingBlockType=%d) is not supported for CME \n", i_RingBlockType);
- return TOR_INVALID_RING_BLOCK_TYPE;
- }
}
}
else
@@ -1197,7 +1236,7 @@ int tor_access_ring( void* i_ringSection, // Ring section ptr
if (i_dbgl > 1)
{
- MY_INF( "tor_access_ring(): Local DD level offset: 0x%08x for DD level: 0x%x \n",
+ MY_INF( "tor_access_ring(): DD level offset: 0x%08x DD level: 0x%x \n",
ddLevelOffset, ddLevel );
}
@@ -1876,9 +1915,43 @@ int tor_access_ring( void* i_ringSection, // Ring section ptr
o_ringName,
i_dbgl);
- if (rc)
+ if (rc == TOR_RING_NOT_FOUND)
{
- MY_ERR("get_ring_from_sbe_image failed w/rc=%d\n", rc);
+ if (i_dbgl > 0)
+ {
+ MY_INF("\t After SBE single ring call, %s ring container is not found \n",
+ RING_PROPERTIES[i_ringId].iv_name);
+ }
+
+ return rc;
+ }
+ else if (rc == TOR_INVALID_INSTANCE_ID)
+ {
+ if (i_dbgl > 0)
+ {
+ MY_INF("\t After SBE single ring call, Instance %d is invalid \n",
+ io_instanceId );
+ }
+
+ return rc;
+ }
+ else if (rc == TOR_RING_AVAILABLE_IN_RINGSECTION)
+ {
+ if (i_dbgl > 0)
+ {
+ MY_INF("\t After SBE single ring call, Ring container is available in the image \n");
+ }
+
+ return rc;
+ }
+ else if (rc == TOR_INVALID_RING_ID)
+ {
+ if (i_dbgl > 0)
+ {
+ MY_INF("\t After SBE single ring call, There is no TOR slot for %s %d\n",
+ RING_PROPERTIES[i_ringId].iv_name, i_ringId);
+ }
+
return rc;
}
else
@@ -2198,8 +2271,7 @@ int tor_get_block_of_rings ( void* i_ringSection, // Ring section
//
///////////////////////////////////////////////////////////////////////////////////////
int tor_append_ring( void* i_ringSection, // Ring section ptr
- uint32_t& io_ringSectionSize, // In: Exact size of ring section.
- // Out: Updated size of ring section.
+ uint32_t& io_ringSectionSize, // Max size of ring section buffer
void* i_ringBuffer, // Ring work buffer
const uint32_t i_ringBufferSize, // Max size of ring work buffer
RingID i_ringId, // Ring ID
@@ -2212,12 +2284,12 @@ int tor_append_ring( void* i_ringSection, // Ring section ptr
{
uint32_t rc = 0;
char i_ringName[25];
- uint32_t l_buf = 0;
- uint32_t* l_cpltSection = &l_buf;
+ uint32_t l_ringTypeBuf = 0;
+ uint32_t* l_ringTypeStart = &l_ringTypeBuf;
uint8_t l_instanceId = i_instanceId;
RingType_t l_RingType = i_RingType;
uint32_t l_ringBlockSize;
- uint16_t l_ringOffset16;
+ uint16_t l_ringOffsetAddr16;
uint64_t l_magic;
uint32_t l_torOffsetSlot;
@@ -2225,17 +2297,17 @@ int tor_append_ring( void* i_ringSection, // Ring section ptr
{
l_magic = P9_XIP_MAGIC_SEEPROM;
}
- else if (i_PpeType == CME) // Assign i_magic variant as CME image
+ else if (i_PpeType == CME ) // Assign i_magic variant as CME image
{
l_magic = P9_XIP_MAGIC_CME;
}
- else if (i_PpeType == SGPE) // Assign i_magic variant as SGPE image
+ else if (i_PpeType == SGPE ) // Assign i_magic variant as SGPE image
{
l_magic = P9_XIP_MAGIC_SGPE;
}
else
{
- MY_ERR("PPE type (i_PpeType=%d) is not supported \n", i_PpeType);
+ MY_ERR("TOR_APPEND_RING(2): i_PpeType=%d is an unsupported PPE type\n", i_PpeType);
return TOR_AMBIGUOUS_API_PARMS;
}
@@ -2248,51 +2320,42 @@ int tor_append_ring( void* i_ringSection, // Ring section ptr
i_RingVariant,
l_instanceId,
PUT_SINGLE_RING,
- (void**)&l_cpltSection, // On return, contains offset (wrt ringSection) of
- // chiplet section's common or instance section
- l_torOffsetSlot, // On return, contains offset (wrt ringSection) of
- // TOR offset slot
+ (void**)&l_ringTypeStart, // On return, contains absolute offset addr where RingType starts in TOR
+ l_torOffsetSlot, // On return, contains absolute offset addr where TOR offset slot is located
i_ringName,
i_dbgl);
if (rc)
{
- MY_ERR("tor_access_ring() failed w/rc=0x%x \n", rc);
+ MY_ERR("\tTOR_APPEND_RING(3): Failure on tor_access_ring function call ...\n");
return rc;
}
if (i_dbgl > 1)
{
- MY_INF(" TOR offset slot for ring address %d \n", l_torOffsetSlot );
+ MY_INF(" TOR_APPEND_RING(4): Ring offset address %d \n",
+ l_torOffsetSlot );
}
- // Explanation to the following:
- // tor_append_ring() appends a ring to the end of ringSection. The offset value to
- // that ring is wrt the beginning of the chiplet's TOR section. Below we calculate
- // the offset value and put it into the TOR slot. But first, check that the offset
- // value can be contained within the 2B of the TOR slot.
- if ( (io_ringSectionSize - *l_cpltSection) <= MAX_TOR_RING_OFFSET )
- {
- l_ringOffset16 = htobe16(io_ringSectionSize - *l_cpltSection);
- memcpy( (uint8_t*)i_ringSection + l_torOffsetSlot,
- &l_ringOffset16, sizeof(l_ringOffset16) );
- }
- else
- {
- MY_ERR("Code bug: TOR ring offset (=0x%x) exceeds MAX_TOR_RING_OFFSET (=0x%x)",
- io_ringSectionSize - *l_cpltSection, MAX_TOR_RING_OFFSET);
- return TOR_OFFSET_TOO_BIG;
- }
-
- // Now append the ring to the end of ringSection.
- l_ringBlockSize = htobe16( ((CompressedScanData*)i_rs4Container)->iv_size );
- memcpy( (uint8_t*)i_ringSection + io_ringSectionSize,
- (uint8_t*)i_rs4Container, (size_t)l_ringBlockSize);
-
- // Update the ringSectionSize
+ // Current ring offset address contains old rs4 image starting address.
+ // When tor_append_ring gets new RS4 ring data. It is appended at end of the
+ // .rings section and new ring pointer location is updated at ring offset address
+ l_ringOffsetAddr16 = (uint16_t)(*l_ringTypeStart);
+ l_ringOffsetAddr16 = io_ringSectionSize - l_ringOffsetAddr16;
+ l_ringOffsetAddr16 = htobe16(l_ringOffsetAddr16 + sizeof(RingLayout_t));
+ memcpy( (uint8_t*)i_ringSection + l_torOffsetSlot, &l_ringOffsetAddr16,
+ sizeof(l_ringOffsetAddr16));
+
+ // Attaching RS4 image at end of the ring section
+ // reading first 4 byte of rs4_container which carries size of ring container
+ // memcpy appends rs4_container at end of the .rings section.
+ l_ringBlockSize = ((RingLayout_t*)i_rs4Container)->sizeOfThis;
+ l_ringBlockSize = htobe32(l_ringBlockSize);
+ memcpy( (uint8_t*)i_ringSection + io_ringSectionSize, (uint8_t*)i_rs4Container,
+ (size_t)l_ringBlockSize);
io_ringSectionSize += l_ringBlockSize;
- return TOR_SUCCESS;
+ return TOR_APPEND_RING_DONE;
}
diff --git a/src/import/chips/p9/utils/imageProcs/p9_tor.H b/src/import/chips/p9/utils/imageProcs/p9_tor.H
index c6fc1368d..0ce738836 100644
--- a/src/import/chips/p9/utils/imageProcs/p9_tor.H
+++ b/src/import/chips/p9/utils/imageProcs/p9_tor.H
@@ -28,15 +28,20 @@
#include "p9_ring_id.h"
#include "p9_ringId.H"
-#define MAX_TOR_RING_OFFSET (256*256-1) // Max value of 2Byte uint
-
namespace P9_TOR
{
extern const char* ppeTypeName[];
extern const char* ringVariantName[];
-#define TOR_VERSION 2
+#define TOR_VERSION 1
+
+typedef struct
+{
+ uint32_t sizeOfThis;
+ uint16_t sizeOfCmsk;
+ uint16_t sizeOfMeta; // Exact size of meta data. Arbitrary size. Not null terminated
+} RingLayout_t;
typedef struct
{
@@ -58,28 +63,26 @@ typedef struct
typedef uint16_t TorRingOffset_t; // Ring offset value in TOR offset slot
-#define TOR_SUCCESS 0
#define TOR_RING_FOUND 0
#define TOR_RING_BLOCKS_FOUND 0
+#define TOR_APPEND_RING_DONE 0
#define TOR_RING_NOT_FOUND 1
-#define TOR_AMBIGUOUS_API_PARMS 2
-#define TOR_SECTION_NOT_FOUND 3
-#define TOR_DD_LEVEL_NOT_FOUND 4
-#define TOR_OP_BUFFER_INVALID 5
-#define TOR_OP_BUFFER_SIZE_EXCEEDED 6
-#define TOR_INVALID_RING_ID 7
+#define TOR_INVALID_RING_ID 2
+#define TOR_AMBIGUOUS_API_PARMS 3
+#define TOR_SECTION_NOT_FOUND 4
+#define TOR_DD_LEVEL_NOT_FOUND 5
+#define TOR_OP_BUFFER_INVALID 6
+#define TOR_OP_BUFFER_SIZE_EXCEEDED 7
#define TOR_INVALID_INSTANCE_ID 8
#define TOR_INVALID_CHIPLET 9
-#define TOR_INVALID_RING_BLOCK_TYPE 10
-#define TOR_INVALID_MAGIC_NUMBER 11
-#define TOR_IMAGE_DOES_NOT_SUPPORT_CME 12
-#define TOR_IMAGE_DOES_NOT_SUPPORT_SGPE 13
-#define TOR_IMAGE_DOES_NOT_SUPPORT_DD_LEVEL 14
-#define TOR_IMAGE_DOES_NOT_SUPPORT_PPE_LEVEL 15
-#define TOR_RING_AVAILABLE_IN_RINGSECTION 16 // Ring is already present
-#define TOR_BUFFER_TOO_SMALL 17
-#define TOR_TOO_MANY_DD_LEVELS 18
-#define TOR_OFFSET_TOO_BIG 19
+#define TOR_IMAGE_DOES_NOT_SUPPORT_CME 10
+#define TOR_IMAGE_DOES_NOT_SUPPORT_SGPE 11
+#define TOR_IMAGE_DOES_NOT_SUPPORT_DD_LEVEL 12
+#define TOR_IMAGE_DOES_NOT_SUPPORT_PPE_LEVEL 13
+#define TOR_RING_AVAILABLE_IN_RINGSECTION 14 // Ring is already present
+#define TOR_BUFFER_TOO_SMALL 15
+#define TOR_TOO_MANY_DD_LEVELS 16
+
// Different options to extract data using tor_access_ring API
typedef enum RingBlockType
@@ -384,8 +387,8 @@ int tor_get_block_of_rings ( void* i_ringSection,
/// It contains details of p9 Ring which is used for scanning operation.
/// TOR API supports SEEPROM image format.
///
-/// \param[in/out] io_ringSectionSize In: Exact size of i_ringSection.
-/// Out: Updated size of i_ringSection.
+/// \param[in/out] io_ringSectionSize A value to indicate actual size of
+/// i_ringSection data passed in as input On return, updated size of section.
/// Note: Caller manages this buffer and must make sure the RS4 ring fits
/// before making this call
///
OpenPOWER on IntegriCloud