diff options
author | Mark Wenning <wenning@us.ibm.com> | 2012-08-21 17:12:43 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-08-27 17:01:08 -0500 |
commit | 149c0e9fc8990bf219d9ba7cd8b91cb9a33006ca (patch) | |
tree | 8ac06d667f21ad1d0eaca5390af4c26653d35120 /src/usr/hwpf/hwp/build_winkle_images | |
parent | c89cb3ef7ec86dbc0585489744092794d3c286da (diff) | |
download | talos-hostboot-149c0e9fc8990bf219d9ba7cd8b91cb9a33006ca.tar.gz talos-hostboot-149c0e9fc8990bf219d9ba7cd8b91cb9a33006ca.zip |
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 <vanlee@us.ibm.com>
Reviewed-by: Thi N. Tran <thi@us.ibm.com>
Reviewed-by: Terry J. Opie <opiet@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf/hwp/build_winkle_images')
-rw-r--r-- | src/usr/hwpf/hwp/build_winkle_images/proc_slw_build/p8_scan_compression.C | 64 | ||||
-rw-r--r-- | src/usr/hwpf/hwp/build_winkle_images/proc_slw_build/p8_scan_compression.H | 33 |
2 files changed, 52 insertions, 45 deletions
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 -/// +/// /// <rs4_string> ::= <rotate> <terminate> | /// <rotate> <scan> <rs4_string> -/// +/// /// <rotate> ::= <octal_stop> | /// <octal_go> <rotate> -/// +/// /// <octal_go> ::= '0x0' | ... | '0x7' -/// +/// /// <octal_stop> ::= '0x8' | ... | '0xf' -/// +/// /// <scan> ::= <scan_count(N)> <data(N)> -/// +/// /// <scan_count(N)> ::= * 0bnnnn, for N = 0bnnnn, N != 0 * -/// +/// /// <data(N)> ::= * N nibbles of uncompressed data * -/// +/// /// <terminate> ::= '0x0' <terminal_count(0)> | /// '0x0' <terminal_count(T, T > 0)> <terminal_data(T)> -/// +/// /// <terminal_count(T)> ::= * 0b00nn, for T = 0bnn * -/// +/// /// <terminal_data(1)> ::= '0x0' | '0x8' /// /// <terminal_data(2)> ::= '0x0' | '0x4' | '0x8' | '0xc' /// /// <terminal_data(3)> ::= '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<i_i>, 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<i> 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__ |