From 149c0e9fc8990bf219d9ba7cd8b91cb9a33006ca Mon Sep 17 00:00:00 2001 From: Mark Wenning Date: Tue, 21 Aug 2012 17:12:43 -0500 Subject: Support for p8_xip_customize Change-Id: I25f9071250f7330fd0da987e9590c70a89318ce6 RTC: 47293 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1577 Tested-by: Jenkins Server Reviewed-by: Van H. Lee Reviewed-by: Thi N. Tran Reviewed-by: Terry J. Opie Reviewed-by: A. Patrick Williams III --- src/usr/hwpf/hwp/RepairRingFunc.C | 87 +++++--------- .../proc_slw_build/p8_scan_compression.C | 64 +++++----- .../proc_slw_build/p8_scan_compression.H | 33 +++--- src/usr/hwpf/hwp/makefile | 48 ++++---- src/usr/hwpf/test/fapiwinkletest.H | 132 ++++++++++----------- src/usr/mvpd/makefile | 2 +- 6 files changed, 172 insertions(+), 194 deletions(-) (limited to 'src/usr') diff --git a/src/usr/hwpf/hwp/RepairRingFunc.C b/src/usr/hwpf/hwp/RepairRingFunc.C index 3b84f19f6..713deba1b 100644 --- a/src/usr/hwpf/hwp/RepairRingFunc.C +++ b/src/usr/hwpf/hwp/RepairRingFunc.C @@ -1,4 +1,4 @@ -/* IBM_PROLOG_BEGIN_TAG + /* IBM_PROLOG_BEGIN_TAG * This is an automatically generated prolog. * * $Source: src/usr/hwpf/hwp/RepairRingFunc.C $ @@ -36,40 +36,19 @@ #include -// -// @todo : -// pull in CompressedScanData def from proc_slw_build HWP and then remove -// the definitions below -// #include -// -/** - * @struct RS4 Compressed Scan Header - */ -typedef struct { - uint32_t magic; // "RSA" + version 01 signature - uint32_t size; // Total size in bytes, including the header - uint32_t algorithReserved; // "reserved to the algorithm" - uint32_t length; // len of original scan chain in BITS - uint32_t scanSelect; // hi 32 bits of the scan select reg - uint8_t reserved[3]; - uint8_t chipletId; // 7-bit pervasive chiplet Id + Multicast bit -} CompressedScanData; - -/** - * @def RSA_MAGIC signature - "RSA"+0x01 - */ -const uint32_t RS4_MAGIC = 0x52533401; - +// pull in CompressedScanData def from proc_slw_build HWP +#include extern "C" { using namespace fapi; -fapi::ReturnCode getRepairRing( const fapi::Target &i_fapiTarget, - const uint32_t i_ringModifier, - uint8_t *io_pRingBuf, - uint32_t &io_rRingBufsize ) +fapi::ReturnCode getRepairRing( const fapi::Target &i_fapiTarget, + const uint8_t i_chipletId, + const uint8_t i_ringId, + uint8_t *io_pRingBuf, + uint32_t &io_rRingBufsize) { fapi::ReturnCode l_fapirc( fapi::FAPI_RC_SUCCESS ); uint8_t *l_pRing = NULL; @@ -80,8 +59,9 @@ fapi::ReturnCode getRepairRing( const fapi::Target &i_fapiTarget, bool l_foundflag = false; - FAPI_DBG(" getRepairRing: entry ringModifier=0x%x, size=0x%x ", - i_ringModifier, + FAPI_DBG(" getRepairRing: entry ringId=0x%x, chipletId=0x%x, size=0x%x ", + i_ringId, + i_chipletId, io_rRingBufsize ); do { @@ -167,17 +147,17 @@ fapi::ReturnCode getRepairRing( const fapi::Target &i_fapiTarget, reinterpret_cast( l_pRing+l_offset ); // dump record info for debug - FAPI_DBG( "getRepairRing: %d scanSelect=0x%x, size=0x%x, chipletId=0x%x", + FAPI_DBG( "getRepairRing: %d ringId=0x%x, size=0x%x, chipletId=0x%x", l_offset, - l_pScanData->scanSelect, - l_pScanData->size, - l_pScanData->chipletId ); + l_pScanData->iv_ringId, + l_pScanData->iv_chipletId, + l_pScanData->iv_size ); // Check magic key to make sure this is a valid record. - if ( l_pScanData->magic != RS4_MAGIC ) + if ( l_pScanData->iv_magic != RS4_MAGIC ) { FAPI_ERR( "getRepairRing: Header 0x%x at offset 0x%x, break", - l_pScanData->magic, + l_pScanData->iv_magic, l_offset ); // @todo @@ -193,31 +173,27 @@ fapi::ReturnCode getRepairRing( const fapi::Target &i_fapiTarget, break; } - // - // @TODO Need to do Leon's translation here?? - // It's not certain that the scanSelect/ringModifier may be - // passed in here; if so we will have to do some translating. - // Leon Freimour has the translation algorithm. - // This will have to wait until Phase II . - if ( l_pScanData->scanSelect == i_ringModifier ) + if ( (l_pScanData->iv_ringId == i_ringId) + && (l_pScanData->iv_chipletId == i_chipletId) ) { - FAPI_DBG( "getRepairRing: Found it: 0x%x, 0x%x", - i_ringModifier, - l_pScanData->size ); + FAPI_DBG( "getRepairRing: Found it: 0x%x.0x%x, 0x%x", + i_ringId, + i_chipletId, + l_pScanData->iv_size ); l_foundflag = true; // check if we have enough space - if ( io_rRingBufsize < l_pScanData->size ) + if ( io_rRingBufsize < l_pScanData->iv_size ) { FAPI_ERR( "getRepairRing: output buffer too small: 0x%x < 0x%x", io_rRingBufsize, - l_pScanData->size + l_pScanData->iv_size ); // return actual size of data, so caller can re-try with // the correct value - io_rRingBufsize = l_pScanData->size; + io_rRingBufsize = l_pScanData->iv_size; FAPI_SET_HWP_ERROR(l_fapirc, RC_REPAIR_RING_INVALID_SIZE ); // break out of do block with fapi rc set @@ -225,12 +201,13 @@ fapi::ReturnCode getRepairRing( const fapi::Target &i_fapiTarget, } // Goodness, return ring and actual size of data. - io_rRingBufsize = l_pScanData->size; + io_rRingBufsize = l_pScanData->iv_size; // we're good, copy data into the passed-in buffer memcpy( io_pRingBuf, l_pScanData, io_rRingBufsize ); - FAPI_DBG( "getRepairRing: return record: 0x%x 0x%p, 0x%x", - i_ringModifier, + FAPI_DBG( "getRepairRing: return record: 0x%x.0x%x %p, 0x%x", + i_ringId, + i_chipletId, l_pScanData, io_rRingBufsize ); @@ -239,7 +216,7 @@ fapi::ReturnCode getRepairRing( const fapi::Target &i_fapiTarget, } // bump to next ring - l_offset += l_pScanData->size ; + l_offset += l_pScanData->iv_size ; } // end while scan loop @@ -249,7 +226,7 @@ fapi::ReturnCode getRepairRing( const fapi::Target &i_fapiTarget, // if ( ! l_foundflag ) { - const uint32_t & RING_MODIFIER = i_ringModifier; + const uint32_t & RING_MODIFIER = i_ringId; FAPI_SET_HWP_ERROR(l_fapirc, RC_REPAIR_RING_NOT_FOUND ); io_rRingBufsize = 0; diff --git a/src/usr/hwpf/hwp/build_winkle_images/proc_slw_build/p8_scan_compression.C b/src/usr/hwpf/hwp/build_winkle_images/proc_slw_build/p8_scan_compression.C index 1cf8f8f46..339b8da01 100644 --- a/src/usr/hwpf/hwp/build_winkle_images/proc_slw_build/p8_scan_compression.C +++ b/src/usr/hwpf/hwp/build_winkle_images/proc_slw_build/p8_scan_compression.C @@ -1,4 +1,4 @@ -/* IBM_PROLOG_BEGIN_TAG + /* IBM_PROLOG_BEGIN_TAG * This is an automatically generated prolog. * * $Source: src/usr/hwpf/hwp/build_winkle_images/proc_slw_build/p8_scan_compression.C $ @@ -21,7 +21,7 @@ * * IBM_PROLOG_END_TAG */ -// $Id: p8_scan_compression.C,v 1.3 2012/05/22 15:57:28 bcbrock Exp $ +// $Id: p8_scan_compression.C,v 1.4 2012/08/17 16:19:44 cmolsen Exp $ // $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/utils/p8_scan_compression.C,v $ //------------------------------------------------------------------------------ // *! (C) Copyright International Business Machines Corp. 2011 @@ -31,7 +31,7 @@ // *! OWNER NAME: Bishop Brock Email: Bishop Brock; bcbrock@us.ibm.com // *! // *! General Description: -// *! +// *! // *! See below. //------------------------------------------------------------------------------ // @@ -39,7 +39,7 @@ // for revision history of p8_scan_compression.c. /// \file p8_scan_compression.C -/// \brief APIs related to scan chain compression. +/// \brief APIs related to scan chain compression. /// /// RS4 Compression Format /// ====================== @@ -103,34 +103,34 @@ /// (R S)* (R E) T D? /// /// \code -/// +/// /// ::= | /// -/// +/// /// ::= | /// -/// +/// /// ::= '0x0' | ... | '0x7' -/// +/// /// ::= '0x8' | ... | '0xf' -/// +/// /// ::= -/// +/// /// ::= * 0bnnnn, for N = 0bnnnn, N != 0 * -/// +/// /// ::= * N nibbles of uncompressed data * -/// +/// /// ::= '0x0' | /// '0x0' 0)> -/// +/// /// ::= * 0b00nn, for T = 0bnn * -/// +/// /// ::= '0x0' | '0x8' /// /// ::= '0x0' | '0x4' | '0x8' | '0xc' /// /// ::= '0x0' | '0x2' | '0x4' | ... | '0xe' -/// +/// /// \endcode @@ -198,7 +198,7 @@ revle32(const uint32_t i_x) #endif return rx; } - + #if COMPRESSED_SCAN_DATA_VERSION != 1 #error This code assumes CompressedScanData structure version 1 layout @@ -215,6 +215,7 @@ compressed_scan_data_translate(CompressedScanData* o_data, o_data->iv_scanSelect = revle32(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; } @@ -235,7 +236,7 @@ get_nibble(const uint8_t* i_string, const uint32_t i_i) } return nibble; } - + // Set a big-endian-indexed nibble in a byte string @@ -256,7 +257,7 @@ set_nibble(uint8_t* io_string, const uint32_t i_i, const int i_nibble) // Encode an unsigned integer into a 4-bit octal stop code directly into a // nibble stream at io_string, returning the number of nibbles in the -// resulting code. +// resulting code. static int stop_encode(const uint32_t i_count, uint8_t* io_string, const uint32_t i_i) @@ -316,7 +317,7 @@ stop_decode(uint32_t* o_count, const uint8_t* i_string, const uint32_t i_i) return digits; } - + // RS4 compression algorithm notes: // // RS4 compression processes i_string as a string of nibbles. Final @@ -335,7 +336,7 @@ stop_decode(uint32_t* o_count, const uint8_t* i_string, const uint32_t i_i) static uint32_t _rs4_compress(CompressedScanData* o_data, - const uint8_t* i_string, + const uint8_t* i_string, const uint32_t i_length) { int state; /* 0 : Rotate, 1 : Scan */ @@ -355,7 +356,7 @@ _rs4_compress(CompressedScanData* o_data, data = (uint8_t*)o_data + sizeof(CompressedScanData); count = 0; state = 0; - + // Process the bulk of the string. Note that state changes do not // increment 'i' - the nibble at i_data is always scanned again. @@ -410,8 +411,8 @@ _rs4_compress(CompressedScanData* o_data, j++; // Insert the remainder count nibble, and if non-0, the remainder data - // nibble. - + // nibble. + set_nibble(data, j, r); j++; if (r != 0) { @@ -419,7 +420,7 @@ _rs4_compress(CompressedScanData* o_data, j++; } - // Return the number of nibbles in the compressed string. + // Return the number of nibbles in the compressed string. return j; } @@ -435,9 +436,10 @@ _rs4_compress(CompressedScanData* o_data, int rs4_compress(CompressedScanData** o_data, uint32_t* o_size, - const uint8_t* i_string, + const uint8_t* i_string, const uint32_t i_length, const uint64_t i_scanSelect, + const uint8_t i_ringId, const uint8_t i_chipletId, const uint8_t i_flushOptimization) { @@ -464,7 +466,7 @@ rs4_compress(CompressedScanData** o_data, (*o_data)->iv_scanSelect = revle32((uint32_t)(i_scanSelect >> 32)); (*o_data)->iv_headerVersion = COMPRESSED_SCAN_DATA_VERSION; (*o_data)->iv_flushOptimization = i_flushOptimization; - (*o_data)->iv_reserved = 0; + (*o_data)->iv_ringId = i_ringId; (*o_data)->iv_chipletId = i_chipletId; *o_size = bytes; @@ -482,8 +484,8 @@ rs4_compress(CompressedScanData** o_data, // Returns a scan compression return code. static int -_rs4_decompress(uint8_t* o_string, - const uint8_t* i_string, +_rs4_decompress(uint8_t* o_string, + const uint8_t* i_string, const uint32_t i_length) { int rc; @@ -589,12 +591,12 @@ rs4_decompress(uint8_t** o_string, break; } - rc = _rs4_decompress(*o_string, + rc = _rs4_decompress(*o_string, (uint8_t*)i_data + sizeof(CompressedScanData), *o_length); } while (0); return rc; } - - + + diff --git a/src/usr/hwpf/hwp/build_winkle_images/proc_slw_build/p8_scan_compression.H b/src/usr/hwpf/hwp/build_winkle_images/proc_slw_build/p8_scan_compression.H index 73585572f..6e48f6b4b 100644 --- a/src/usr/hwpf/hwp/build_winkle_images/proc_slw_build/p8_scan_compression.H +++ b/src/usr/hwpf/hwp/build_winkle_images/proc_slw_build/p8_scan_compression.H @@ -1,4 +1,4 @@ -/* IBM_PROLOG_BEGIN_TAG + /* IBM_PROLOG_BEGIN_TAG * This is an automatically generated prolog. * * $Source: src/usr/hwpf/hwp/build_winkle_images/proc_slw_build/p8_scan_compression.H $ @@ -24,7 +24,7 @@ #ifndef __P8_SCAN_COMPRESSION_H__ #define __P8_SCAN_COMPRESSION_H__ -// $Id: p8_scan_compression.H,v 1.1 2012/04/16 23:56:00 bcbrock Exp $ +// $Id: p8_scan_compression.H,v 1.2 2012/08/17 16:20:15 cmolsen Exp $ // $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/utils/p8_scan_compression.H,v $ //------------------------------------------------------------------------------ // *! (C) Copyright International Business Machines Corp. 2011 @@ -34,7 +34,7 @@ // *! OWNER NAME: Bishop Brock Email: Bishop Brock; bcbrock@us.ibm.com // *! // *! General Description: -// *! +// *! // *! See below. //------------------------------------------------------------------------------ // @@ -43,7 +43,7 @@ /// \file p8_scan_compression.H /// \brief Structure definitions and protoypes related to scan chain -/// compression. +/// compression. /// /// This header declares and documents the entry points defined in /// p8_scan_compression.C. Some constants are also required by the scan @@ -65,7 +65,7 @@ /// decompression algorithms. /// /// Bytes - Content -/// +/// /// 0:3 - A 32-bit "magic number" that identifies and validates the /// compression algorithm and algorithm version used to compress the data. /// @@ -81,14 +81,14 @@ /// /// 16:19 - 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. +/// bits. /// /// 20 - The Scan Chain Data Structure version number /// /// 21 - Flush-optimize : Is this byte is non-zero, the ring state to be /// modified is the flush state of the ring. /// -/// 22 - Reserved +/// 22 - The ring ID uniquely identifying the repair ring name. /// /// 23 - The 7-bit pervasive chiplet Id + Multicast bit of the chiplet to /// scan. This value is loaded directly into P0. The decompression @@ -131,8 +131,9 @@ typedef struct { /// the Scan Data Register rather than using a read-XOR-write. uint8_t iv_flushOptimization; - /// Alignment padding - uint8_t iv_reserved; + /// 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 /// @@ -184,8 +185,11 @@ compressed_scan_data_translate(CompressedScanData* o_data, /// \param 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 i_ringId The ring ID that uniquely identifies the ring name of +/// a repair ring. (See p8_ring_identification.c for more info.) +/// /// \param i_chipletId The 7-bit value for the iv_chipletId field of the -/// CompressedScanData. +/// CompressedScanData. /// /// \param 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 @@ -197,12 +201,13 @@ compressed_scan_data_translate(CompressedScanData* o_data, int rs4_compress(CompressedScanData** o_data, uint32_t* o_size, - const uint8_t* i_string, + const uint8_t* i_string, const uint32_t i_length, 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 /// @@ -215,12 +220,12 @@ rs4_compress(CompressedScanData** o_data, /// bytes. /// /// \param i_data A pointer to the CompressedScanData header + data to be -/// decompressed. +/// decompressed. int rs4_decompress(uint8_t** o_string, uint32_t* o_length, const CompressedScanData* i_data); - + #endif // __ASSEMBLER__ diff --git a/src/usr/hwpf/hwp/makefile b/src/usr/hwpf/hwp/makefile index f78c6f7f6..757bcee45 100644 --- a/src/usr/hwpf/hwp/makefile +++ b/src/usr/hwpf/hwp/makefile @@ -1,25 +1,25 @@ -# IBM_PROLOG_BEGIN_TAG -# This is an automatically generated prolog. -# -# $Source: src/usr/hwpf/hwp/makefile $ -# -# IBM CONFIDENTIAL -# -# COPYRIGHT International Business Machines Corp. 2011-2012 -# -# p1 -# -# Object Code Only (OCO) source materials -# Licensed Internal Code Source Materials -# IBM HostBoot Licensed Internal Code -# -# The source code for this program is not published or other- -# wise divested of its trade secrets, irrespective of what has -# been deposited with the U.S. Copyright Office. -# -# Origin: 30 -# -# IBM_PROLOG_END_TAG +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: src/usr/hwpf/hwp/makefile $ +# +# IBM CONFIDENTIAL +# +# COPYRIGHT International Business Machines Corp. 2011,2012 +# +# p1 +# +# Object Code Only (OCO) source materials +# Licensed Internal Code Source Materials +# IBM HostBoot Licensed Internal Code +# +# The source code for this program is not published or otherwise +# divested of its trade secrets, irrespective of what has been +# deposited with the U.S. Copyright Office. +# +# Origin: 30 +# +# IBM_PROLOG_END_TAG ROOTPATH = ../../../.. MODULE = hwp @@ -28,6 +28,10 @@ EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/hwp EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/fapi EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/plat +# CompressedScanData struct needed for getRepairRings() +EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/include +EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/build_winkle_images/proc_slw_build + OBJS = fapiTestHwp.o \ fapiTestHwpError.o \ fapiTestHwpAnalyzeError.o \ diff --git a/src/usr/hwpf/test/fapiwinkletest.H b/src/usr/hwpf/test/fapiwinkletest.H index f9bd7c0c5..da11c9347 100644 --- a/src/usr/hwpf/test/fapiwinkletest.H +++ b/src/usr/hwpf/test/fapiwinkletest.H @@ -59,11 +59,6 @@ public: uint8_t *l_pdRRecord = NULL; uint32_t l_pdRLen = 0; - // test value, coreesponds to procmvpd.dat:e23067dae839f5b434ec12b5c86d2ae4fbb51259 - // @todo change test when we get valid data in procpore.dat - const uint32_t MVPD_PDR_TEST_SIZE = 0x5f74; - - TS_TRACE( "testGetMvpdPdr entry" ); TARGETING::TargetHandleList l_cpuTargetList; @@ -102,16 +97,8 @@ public: return; } - // this will change when MVPD is changed, and will need to be changed - // above. - if ( l_pdRLen != MVPD_PDR_TEST_SIZE ) - { - TS_FAIL( "fapiGetMvpdField: expected size = 0x%x, received 0x%x", - MVPD_PDR_TEST_SIZE, - l_pdRLen ); - fapiLogError(l_fapirc); - return; - } + TS_TRACE( "fapiGetMvpdField: size or #R record = 0x%x", + l_pdRLen ); // do a malloc instead of a new just for variety l_pdRRecord = reinterpret_cast(malloc(l_pdRLen) ); @@ -138,7 +125,6 @@ public: TS_TRACE( "testGetMvpdPdr exit" ); } - // @note: // ring modifiers are from MVPD #R record, 2012-05-22. // This will change and the unit test will need to be changed... @@ -151,41 +137,34 @@ public: fapi::ReturnCode l_fapirc = fapi::FAPI_RC_SUCCESS; uint8_t *l_pRingBuf = NULL; uint32_t l_ringBufsize = 0; - uint32_t l_ringModifier = 0; + uint32_t l_ringId = 0; + uint32_t l_chipletId = 0; struct _testRRstr { - uint32_t val; + uint32_t ringIdval; + uint32_t chipletIdval; uint32_t size; } l_ringModifiers[] = { - { 0x8036006, 0x20, }, - { 0x11033006, 0x20, }, - { 0x12033006, 0x20, }, - { 0x13033006, 0x20, }, - { 0x14033006, 0x20, }, - { 0x15033006, 0x20, }, - { 0x18033006, 0x20, }, - { 0x19033006, 0x20, }, - { 0x1a033006, 0x20, }, - { 0x1b033006, 0x20, }, - { 0x1c033006, 0x20, }, - { 0x1d033006, 0x20, }, - { 0x1e033006, 0x20, }, - { 0x11034f86, 0x20, }, - { 0x12034f86, 0x20, }, - { 0x13034f86, 0x20, }, - { 0x14034f86, 0x20, }, - { 0x15034f86, 0x20, }, - { 0x18034f86, 0x20, }, - { 0x19034f86, 0x20, }, - { 0x1a034f86, 0x20, }, - { 0x1b034f86, 0x20, }, - { 0x1c034f86, 0x20, }, - { 0x1d034f86, 0x20, }, - { 0x1e034f86, 0x20, }, - { 0x2036e06, 0x20, }, - { 0x2031006, 0x20, }, - { 0x9037d06, 0x20, }, - { 0x1034806, 0x20, }, - { 0x3034806, 0x20, }, + { 0xe0, 0x8 , 0x20 }, + { 0xe1, 0x11 , 0x20 }, + { 0xe1, 0x12 , 0x20 }, + { 0xe1, 0x13 , 0x20 }, + { 0xe1, 0x14 , 0x20 }, + { 0xe1, 0x15 , 0x20 }, + { 0xe1, 0x18 , 0x20 }, + { 0xe2, 0x11 , 0x20 }, + { 0xe2, 0x12 , 0x20 }, + { 0xe2, 0x13 , 0x20 }, + { 0xe2, 0x14 , 0x20 }, + { 0xe2, 0x15 , 0x20 }, + { 0xe2, 0x18 , 0x20 }, + { 0xe3, 0x2 , 0x20 }, + { 0xe5, 0x2 , 0x20 }, + { 0xe6, 0x2 , 0x20 }, + { 0xe7, 0x9 , 0x20 }, + { 0xe8, 0x1 , 0x20 }, + { 0xe9, 0x1 , 0x20 }, + { 0xea, 0x1 , 0x20 }, + { 0xeb, 0x4 , 0x20 }, }; TS_TRACE( "testRepairRings entry" ); @@ -220,13 +199,15 @@ public: // ---------------------------------------------------------------- TS_TRACE( "testRepairRings: pass in NULL ptr" ); l_ringBufsize = 0x0; - l_ringModifier = 0; + l_ringId = 0; + l_chipletId = 0; l_fapirc = getRepairRing( l_fapi_cpu_target, - l_ringModifier, + l_chipletId, + l_ringId, NULL, l_ringBufsize ); - TS_TRACE( "testRepairRings: ring modifier=0x%x: l_ringBufsize=0x%x", - l_ringModifier, l_ringBufsize ); + TS_TRACE( "testRepairRings: ringId=0x%x, chipletId=0x%x: l_ringBufsize=0x%x", + l_ringId, l_chipletId, l_ringBufsize ); if ( l_fapirc != fapi::RC_REPAIR_RING_INVALID_RINGBUF_PTR ) { // note: "uint32_t" below is an _operator_ of fapi::ReturnCode @@ -240,15 +221,18 @@ public: // Pass in 0 for the ring modifier, should return with "not found" // error // ---------------------------------------------------------------- - TS_TRACE( "testRepairRings: pass in invalid ringModifier" ); + TS_TRACE( "testRepairRings: pass in invalid ringId" ); l_ringBufsize = 0x100; - l_ringModifier = 0; // ringModifier picked at random + l_ringId = 0; // ringId + l_chipletId = 0; // chipletId l_fapirc = getRepairRing( l_fapi_cpu_target, - l_ringModifier, + l_chipletId, + l_ringId, l_pRingBuf, l_ringBufsize ); - TS_TRACE( "testRepairRings: ring modifier=0x%x: l_ringBufsize=0x%x", - l_ringModifier, + TS_TRACE( "testRepairRings: ringId=0x%x, chipletId=0x%x: l_ringBufsize=0x%x", + l_ringId, + l_chipletId, l_ringBufsize ); if ( l_fapirc != fapi::RC_REPAIR_RING_NOT_FOUND ) { @@ -263,18 +247,21 @@ public: // loop takes too long, test ring 5 uint8_t i = 5; // ---------------------------------------------------------------- - // Pass in 0 length with a valid ringModifier, should return with - // correct length and no buffer. + // Pass in 0 length with a valid ringId/chipletId, should return + // with correct length and no buffer. // ---------------------------------------------------------------- TS_TRACE( "testRepairRings: get size of ring %d ", i ); l_ringBufsize = 0x0; - l_ringModifier = l_ringModifiers[i].val; - l_fapirc = getRepairRing( l_fapi_cpu_target, - l_ringModifier, - l_pRingBuf, - l_ringBufsize ); - TS_TRACE( "testRepairRings: ring modifier=0x%x: l_ringBufsize=0x%x", - l_ringModifier, + l_ringId = l_ringModifiers[i].ringIdval; + l_chipletId = l_ringModifiers[i].chipletIdval; + l_fapirc = getRepairRing( l_fapi_cpu_target, + l_chipletId, + l_ringId, + l_pRingBuf, + l_ringBufsize ); + TS_TRACE( "testRepairRings: ringId=0x%x, chipletId=0x%x: l_ringBufsize=0x%x", + l_ringId, + l_chipletId, l_ringBufsize ); if ( l_fapirc != fapi::RC_REPAIR_RING_INVALID_SIZE ) { @@ -301,13 +288,15 @@ public: TS_TRACE( "testRepairRings: get ring %d", i ); // l_ringBufsize set from above... - l_ringModifier = l_ringModifiers[i].val; + l_ringId = l_ringModifiers[i].ringIdval; + l_chipletId = l_ringModifiers[i].chipletIdval; l_fapirc = getRepairRing( l_fapi_cpu_target, - l_ringModifier, + l_chipletId, + l_ringId, l_pRingBuf, l_ringBufsize ); - TS_TRACE( "testRepairRings: ring modifier=0x%x: l_ringBufsize=0x%x", - l_ringModifier, l_ringBufsize ); + TS_TRACE( "testRepairRings: ringId=0x%x, chipletId=0x%x: l_ringBufsize=0x%x", + l_ringId, l_chipletId, l_ringBufsize ); if ( l_fapirc != fapi::FAPI_RC_SUCCESS ) { @@ -335,9 +324,10 @@ public: delete[] l_pRingBuf; } + TS_TRACE( "testRepairRings exit" ); } -}; +}; // end class FapiWinkleTest #endif diff --git a/src/usr/mvpd/makefile b/src/usr/mvpd/makefile index 15186def4..1b930e8ab 100644 --- a/src/usr/mvpd/makefile +++ b/src/usr/mvpd/makefile @@ -27,6 +27,6 @@ OBJS = mvpd.o SUBDIRS = test.d -BINARY_FILES = $(IMGDIR)/procmvpd.dat:2bdc54f37808b225a08a3a324f01e1b0d84b2277 +BINARY_FILES = $(IMGDIR)/procmvpd.dat:61c0a4ccc34ad78eca24591e5884c19157a4a4d6 include ${ROOTPATH}/config.mk -- cgit v1.2.1