diff options
author | Mike Jones <mjjones@us.ibm.com> | 2014-01-27 15:33:09 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-02-14 12:41:36 -0600 |
commit | 10a93afdbdd5bccc9a10b797d66b008580ba16bb (patch) | |
tree | caddb050384fe2eb4cd8844c59a28d9ea9e8b7c0 /src/include | |
parent | 5850220077f29041920e83de66ec458dac9c82a7 (diff) | |
download | blackbird-hostboot-10a93afdbdd5bccc9a10b797d66b008580ba16bb.tar.gz blackbird-hostboot-10a93afdbdd5bccc9a10b797d66b008580ba16bb.zip |
Hostboot Serviceability Review Part 2
Resolving TODOs and ensuring error logs have correct callouts
Change-Id: Ic2e65427487fb91553ffe4ed6e3ed922004963ba
RTC: 92837
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/8374
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include')
22 files changed, 697 insertions, 1404 deletions
diff --git a/src/include/usr/ecmddatabuffer/ecmdDataBufferBase.H b/src/include/usr/ecmddatabuffer/ecmdDataBufferBase.H index 7c149d4da..8651cf12e 100644 --- a/src/include/usr/ecmddatabuffer/ecmdDataBufferBase.H +++ b/src/include/usr/ecmddatabuffer/ecmdDataBufferBase.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -20,10 +20,9 @@ /* Origin: 30 */ /* */ /* IBM_PROLOG_END_TAG */ -// IMPORTED FROM eCMD on 11/10/2011 - #ifndef ecmdDataBufferBase_H #define ecmdDataBufferBase_H +/* $Header: /gsa/rchgsa/projects/e/ecmd/.cvsroot/capi/ecmdDataBufferBase.H,v 1.2 2012/09/14 18:52:12 farrugia Exp $ */ // Copyright ********************************************************** // // File ecmdDataBufferBase.H @@ -52,7 +51,7 @@ //-------------------------------------------------------------------- #include <vector> #include <stdint.h> - +//#include <ecmdDefines.H> #ifdef ENABLE_MPATROL #include <mpatrol.h> @@ -96,6 +95,7 @@ extern tracDesc_t g_etrc; /** Trace Descriptor **/ #define ECMD_DBUF_NOT_OWNER (ECMD_ERR_ECMD | 0x2061) ///< Don't own this buffer so can't do this operation #define ECMD_DBUF_XSTATE_NOT_ENABLED (ECMD_ERR_ECMD | 0x2063) ///< Xstate function called on a buffer that doesn't have xstates enabled #define ECMD_DBUF_MISMATCH (ECMD_ERR_ECMD | 0x2065) ///< There was a mismatch between a comparision operation in the buffer + #define ECMD_DBUF_NULL_POINTER (ECMD_ERR_ECMD | 0x2067) ///< Null pointer passed #endif //-------------------------------------------------------------------- @@ -173,6 +173,20 @@ extern tracDesc_t g_etrc; /** Trace Descriptor **/ #define ETRAC9(fmt, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) printf( "%s> ETRC: " fmt "\n", __FUNCTION__, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); #endif +#ifdef FIPSODE +#define ECMD_NULL_PTR_CHECK(ptr) \ + if ( ptr == NULL ) { \ + ETRAC2("**** ERROR : %s : Argument %s is NULL", __PRETTY_FUNCTION__, #ptr); \ + return ECMD_DBUF_NULL_POINTER; \ + }; +#else +#define ECMD_NULL_PTR_CHECK(ptr) \ + if ( ptr == NULL ) { \ + ETRAC1("**** ERROR : Argument %s is NULL",#ptr); \ + return ECMD_DBUF_NULL_POINTER; \ + }; +#endif + //---------------------------------------------------------------------- // Global Variables //---------------------------------------------------------------------- diff --git a/src/include/usr/ecmddatabuffer/prdfCompressBuffer.H b/src/include/usr/ecmddatabuffer/prdfCompressBuffer.H index 9a269e993..61e04825a 100644 --- a/src/include/usr/ecmddatabuffer/prdfCompressBuffer.H +++ b/src/include/usr/ecmddatabuffer/prdfCompressBuffer.H @@ -1,39 +1,45 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/include/usr/ecmddatabuffer/prdfCompressBuffer.H $ -// -// IBM CONFIDENTIAL -// -// COPYRIGHT International Business Machines Corp. 2011 -// -// 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 -// IMPORTED FROM FIPS340 V1.2 on 11/10/2011 - -// Change Log ***************************************************************** -// -// Flag Reason Vers Date Coder Description -// ---- ------- ---- -------- -------- -------------------------------------- -// F478331 f225 10/07/04 iawillia Initial file creation. -// -// End Change Log ************************************************************* +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/ecmddatabuffer/prdfCompressBuffer.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ +/* */ +/* 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 */ + +/** + * @file prdfCompressBuffer.H + * + * @brief Functions to provide the compression/decompression algorithms + * + */ #ifndef __PRDFCOMPRESSBUFFER_H #define __PRDFCOMPRESSBUFFER_H +//-------------------------------------------------------------------- +// Includes +//-------------------------------------------------------------------- + +#ifdef _AIX +#include <inttypes.h> +#else #include <stdint.h> +#endif #include <string.h> #ifndef MIN @@ -42,7 +48,7 @@ /* * Prdf Compression Algorithm: - * The purpose of these compression routines are to compress the register + * The purpose of these compression routines are to compress the register * dumps contained in our error logs. In large systems, we could possibly have * more register data than we could possibly fit in an error log. These * routines will allow us to fit more data into the error logs. In addition, @@ -51,11 +57,11 @@ * had proposed using the Zlib compression algorithms, but they required the * CRC to match and we did not want that requirement. * - * This compression algorithm is based off the LZ77 compression algorithm. - * The algorithm consists of a look-behind buffer of 1024 bytes, and a + * This compression algorithm is based off the LZ77 compression algorithm. + * The algorithm consists of a look-behind buffer of 1024 bytes, and a * look-ahead buffer of 63 bytes. The algorithm attempts to find a match from - * the start of the look-ahead buffer located inside the look-behind buffer. - * If the longest match is bigger than 2 bytes (2 bytes is the break-even + * the start of the look-ahead buffer located inside the look-behind buffer. + * If the longest match is bigger than 2 bytes (2 bytes is the break-even * point), it converts the match into a token (pos in look-behind, length) of * two bytes (12 bits to pos, 6 to length). If no match is found, the first * character is popped from the look-ahead buffer. As matches are found (or @@ -63,13 +69,13 @@ * end of the look-behind buffer (if the buffer increases over 1024, the start * is shifted forward). * - * As the stream (look-ahead buffer) is converted into tokens, they are + * As the stream (look-ahead buffer) is converted into tokens, they are * bundled into groups of 8. A special token is added to the beginning of the * bundle, recording the size of the following 8 tokens (2 or 1 bytes). Once * the token bundle is complete (or end-of-stream), it is added to the output * buffer. * - * To use these routines, #define PRDF_COMPRESSBUFFER_UNCOMPRESS_FUNCTIONS + * To use these routines, #define PRDF_COMPRESSBUFFER_UNCOMPRESS_FUNCTIONS * or PRDF_COMPRESSBUFFER_COMPRESS_FUNCTIONS, depending on usage. These reduce * the code footprint, since only the needed functions are compiled in. * @@ -78,310 +84,334 @@ namespace PrdfCompressBuffer { /* size_t compressedBufferMax(size_t) - * Determines the maximum size of the compressed buffer (worst + * Determines the maximum size of the compressed buffer (worst * case) based on an input buffer size. */ #ifdef PRDF_COMPRESSBUFFER_COMPRESS_FUNCTIONS size_t compressedBufferMax(size_t i_bufSize) - { - return 1 + ((i_bufSize * 9) / 8); - }; + { + return 1 + ((i_bufSize * 9) / 8); + }; #endif - + + #if defined PRDF_COMPRESSBUFFER_COMPRESS_FUNCTIONS || \ + defined PRDF_COMPRESSBUFFER_UNCOMPRESS_FUNCTIONS static size_t COMPRESSION_BREAKEVEN = 3; + #endif + /* class CompressedToken - * Internal class for converting (pos,size) tokens to two char. + * Internal class for converting (pos,size) tokens to two char. */ - class CompressedToken + class CompressedToken { - private: - uint8_t token[2]; - - public: - #ifdef PRDF_COMPRESSBUFFER_UNCOMPRESS_FUNCTIONS - // Default constructor. - CompressedToken() {}; - #endif - - #ifdef PRDF_COMPRESSBUFFER_COMPRESS_FUNCTIONS - /* CompressedToken(size_t, size_t) - * Convert position and size to uint8 tokens. - */ - CompressedToken(size_t i_pos, size_t i_size) - { - uint16_t l_token = (i_pos << 6) - | (i_size - COMPRESSION_BREAKEVEN); - token[1] = l_token & 0xFF; - token[0] = (l_token >> 8) & 0xFF; - }; - #endif - - #ifdef PRDF_COMPRESSBUFFER_UNCOMPRESS_FUNCTIONS - /* void uncompress(uint8_t *, uint8_t *&, size_t&) - * Convert uint8 tokens to pos,size values. Changes - * o_pos to be a pointer to the string inside the buffer and sets - * o_size to be the size of the string. - */ - void uncompress(uint8_t * i_buf, uint8_t * &o_pos, size_t &o_size) - { - uint16_t l_token = (token[0] << 8) | token[1]; - - o_pos = &i_buf[(l_token & 0xFFC0) >> 6]; - o_size = (l_token & 0x3F) + COMPRESSION_BREAKEVEN; - - return; - }; - /* void read(uint8_t *) - * Read two bytes from the buffer to keep as tokens. - * NOTE: Does not modify i_buf. - */ - void read(uint8_t * i_buf) - { - token[0] = i_buf[0]; - token[1] = i_buf[1]; - }; - #endif - - #ifdef PRDF_COMPRESSBUFFER_COMPRESS_FUNCTIONS - /* void write(uint8_t *) - * Copy tokens into the beginning of the buffer. - */ - void write(uint8_t * o_buf) { memcpy(o_buf, token, 2); }; - #endif - - size_t size() { return 2; }; + private: + uint8_t token[2]; + + public: + #ifdef PRDF_COMPRESSBUFFER_UNCOMPRESS_FUNCTIONS + // Default constructor. + CompressedToken() {}; + #endif + + #ifdef PRDF_COMPRESSBUFFER_COMPRESS_FUNCTIONS + /* CompressedToken(size_t, size_t) + * Convert position and size to uint8 tokens. + */ + CompressedToken(size_t i_pos, size_t i_size) + { + uint16_t l_token = (i_pos << 6) + | (i_size - COMPRESSION_BREAKEVEN); + token[1] = l_token & 0xFF; + token[0] = (l_token >> 8) & 0xFF; + }; + #endif + + #ifdef PRDF_COMPRESSBUFFER_UNCOMPRESS_FUNCTIONS + /* void uncompress(uint8_t *, uint8_t *&, size_t&) + * Convert uint8 tokens to pos,size values. Changes + * o_pos to be a pointer to the string inside the buffer and sets + * o_size to be the size of the string. + */ + void uncompress(uint8_t * i_buf, uint8_t * &o_pos, size_t &o_size) + { + uint16_t l_token = (token[0] << 8) | token[1]; + + o_pos = &i_buf[(l_token & 0xFFC0) >> 6]; + o_size = (l_token & 0x3F) + COMPRESSION_BREAKEVEN; + + return; + }; + /* void read(uint8_t *) + * Read two bytes from the buffer to keep as tokens. + * NOTE: Does not modify i_buf. + */ + void read(uint8_t * i_buf) + { + token[0] = i_buf[0]; + token[1] = i_buf[1]; + }; + #endif + + #ifdef PRDF_COMPRESSBUFFER_COMPRESS_FUNCTIONS + /* void write(uint8_t *) + * Copy tokens into the beginning of the buffer. + */ + void write(uint8_t * o_buf) { memcpy(o_buf, token, 2); }; + #endif + + size_t size() { return 2; }; + + /* static size_t minSize() + * This function returns minimum size of token. + * + * NOTE: This function will be used for buffer size validation. + * Currently token size is fixed in nature. But in future + * we may go for variable length tokens. Therefore we dont + * want to make function "size" static. + */ + static size_t minSize() { return 2; }; }; #ifdef PRDF_COMPRESSBUFFER_COMPRESS_FUNCTIONS /* void compressBuffer(uint8_t *, size_t, uint8_t *, size_t &) - * Compresses i_buf and stores result into o_buf. - * - * i_buf : pointer to input buffer. - * i_size : size of input buffer. - * o_buf : pointer to output buffer (supplied by caller). - * o_size : max size of output buffer. After function, size of - * compressed buffer. + * Compresses i_buf and stores result into o_buf. + * + * i_buf : pointer to input buffer. + * i_size : size of input buffer. + * o_buf : pointer to output buffer (supplied by caller). + * o_size : max size of output buffer. After function, size of + * compressed buffer. * * NOTE: The size of the output buffer should be 1 + ((i_size * 9) / 8) - * to guarentee no data is lost (worst case for compression). + * to guarentee no data is lost (worst case for compression). */ - void compressBuffer(uint8_t * i_buf, size_t i_size, - uint8_t * o_buf, size_t &o_size) + void compressBuffer(uint8_t * i_buf, size_t i_size, + uint8_t * o_buf, size_t &o_size) { - // Asserts. - if ((i_buf == NULL) || (o_buf == NULL)) - { - o_size = 0; - return; - } - - uint8_t * l_lookahead = i_buf; // Pointer to the look-behind buf. - size_t l_laSize = 0; // Size of look-behind. - - size_t l_tokPos = 0; // Number of tokens in the bundle. - uint8_t * l_tokC = o_buf++; // Store compress bits and advance ptr. - size_t l_outputSize = 1; // start with l_tokC. - - while((i_size > 0) && (l_outputSize < o_size)) - { - size_t l_curLen = 1; - uint8_t * l_match = NULL; - - // Find the longest match. (2 is our break-even pt, - // but 3 will provide better compression). - for (size_t i = 3; - i < MIN(i_size, l_laSize) && (i < (64 + COMPRESSION_BREAKEVEN)) - ; i++) - { - uint8_t * l_tmpMatch = NULL; - - l_tmpMatch = (uint8_t *) memmem(l_lookahead, l_laSize, - i_buf, i); - - if (l_tmpMatch != NULL) // found match. - { - l_match = l_tmpMatch; - l_curLen = i; - } - else - i = i_size + l_laSize; // abort for loop. - } - - // Create token. - if (l_match != NULL) - { - // found match, make sure there is room for the token. - if (o_size - l_outputSize >= 2) - { - CompressedToken l_token(l_match - l_lookahead, l_curLen); - - l_token.write(o_buf); - o_buf += 2; - l_outputSize += 2; - - (*l_tokC) = (*l_tokC << 1) | 0x1; - l_tokPos++; - - i_buf += l_curLen; - l_laSize += l_curLen; - i_size -= l_curLen; - } - else - { - l_outputSize = o_size; - } - } - else - { - // no match, copy if room in the buffer. - if (o_size - l_outputSize >= 1) - { - o_buf[0] = i_buf[0]; - o_buf++; - l_outputSize++; - - (*l_tokC) = (*l_tokC << 1) | 0x0; - l_tokPos++; - - i_buf++; - l_laSize++; - i_size--; - } - // else <= 0, so don't mess with l_outputSize. - } - - // flush out lookahead. (keep at 1024 bytes) - while(l_laSize >= 1024) - { - l_laSize--; - l_lookahead++; - } - - // check if bundle complete, create new bundle. - if (l_tokPos == 8) - { - l_tokPos = 0; - l_tokC = o_buf++; - l_outputSize++; - } - - } // end while. - - // Shift our bundle bits correctly. (the uncompressor doesn't know if - // the bundle was complete, so always assumes so. - if (l_tokPos != 0) - (*l_tokC) = (*l_tokC) << (8 - l_tokPos); - - // We never _really_ go past our buffer, but sometimes our size says - // we did, so fix that up... - if (l_outputSize <= o_size) - o_size = l_outputSize; - - return; + // Asserts. + if ((i_buf == NULL) || (o_buf == NULL)) + { + o_size = 0; + return; + } + + uint8_t * l_lookahead = i_buf; // Pointer to the look-behind buf. + size_t l_laSize = 0; // Size of look-behind. + + size_t l_tokPos = 0; // Number of tokens in the bundle. + uint8_t * l_tokC = o_buf++; // Store compress bits and advance ptr. + size_t l_outputSize = 1; // start with l_tokC. + + while((i_size > 0) && (l_outputSize < o_size)) + { + size_t l_curLen = 1; + uint8_t * l_match = NULL; + + // Find the longest match. (2 is our break-even pt, + // but 3 will provide better compression). + for (size_t i = 3; + i < MIN(i_size, l_laSize) && (i < (64 + COMPRESSION_BREAKEVEN)) + ; i++) + { + uint8_t * l_tmpMatch = NULL; + + l_tmpMatch = (uint8_t *) memmem(l_lookahead, l_laSize, + i_buf, i); + + if (l_tmpMatch != NULL) // found match. + { + l_match = l_tmpMatch; + l_curLen = i; + } + else + i = i_size + l_laSize; // abort for loop. + } + + // Create token. + if (l_match != NULL) + { + // found match, make sure there is room for the token. + if (o_size - l_outputSize >= 2) + { + CompressedToken l_token(l_match - l_lookahead, l_curLen); + + l_token.write(o_buf); + o_buf += 2; + l_outputSize += 2; + + (*l_tokC) = (*l_tokC << 1) | 0x1; + l_tokPos++; + + i_buf += l_curLen; + l_laSize += l_curLen; + i_size -= l_curLen; + } + else + { + l_outputSize = o_size; + } + } + else + { + // no match, copy if room in the buffer. + if (o_size - l_outputSize >= 1) + { + o_buf[0] = i_buf[0]; + o_buf++; + l_outputSize++; + + (*l_tokC) = (*l_tokC << 1) | 0x0; + l_tokPos++; + + i_buf++; + l_laSize++; + i_size--; + } + // else <= 0, so don't mess with l_outputSize. + } + + // flush out lookahead. (keep at 1024 bytes) + while(l_laSize >= 1024) + { + l_laSize--; + l_lookahead++; + } + + // check if bundle complete, create new bundle. + if (l_tokPos == 8) + { + l_tokPos = 0; + l_tokC = o_buf++; + l_outputSize++; + } + + } // end while. + + // Shift our bundle bits correctly. (the uncompressor doesn't know if + // the bundle was complete, so always assumes so. + if (l_tokPos != 0) + (*l_tokC) = (*l_tokC) << (8 - l_tokPos); + + // We never _really_ go past our buffer, but sometimes our size says + // we did, so fix that up... + if (l_outputSize <= o_size) + o_size = l_outputSize; + + return; }; #endif - + #ifdef PRDF_COMPRESSBUFFER_UNCOMPRESS_FUNCTIONS /* void uncompressBuffer(uint8_t *, size_t, uint8_t *, size_t &) - * Uncompresses i_buf and stores result into o_buf. - * - * i_buf : pointer to input buffer. - * i_size : size of input buffer. - * o_buf : pointer to output buffer (supplied by caller). - * o_size : max size of output buffer. After function, size of - * uncompressed buffer. + * Uncompresses i_buf and stores result into o_buf. + * + * i_buf : pointer to input buffer. + * i_size : size of input buffer. + * o_buf : pointer to output buffer (supplied by caller). + * o_size : max size of output buffer. After function, size of + * uncompressed buffer. * * NOTE: The size is never stored in an compressed or uncompressed buffer. - * The caller needs to keep track of those kind of things and add - * whatever kind of header they need. If o_size isn't big enough - * you're not going to get the whole stream. These functions will - * not overrun the buffer. + * The caller needs to keep track of those kind of things and add + * whatever kind of header they need. If o_size isn't big enough + * you're not going to get the whole stream. These functions will + * not overrun the buffer. */ void uncompressBuffer(uint8_t * i_buf, size_t i_size, - uint8_t * o_buf, size_t & o_size) + uint8_t * o_buf, size_t & o_size) { - // Asserts. - if ((i_buf == NULL) || (o_buf == NULL)) - { - o_size = 0; - return; - } - - uint8_t * l_lookahead = o_buf; // Look-behind buffer. - size_t l_laSize = 0; // look-behind size. - - uint8_t l_tokC = 0; // Bundle bits. - uint8_t l_tokPos = 8; // Number of tokens from the bundle - // thus far. (start at 8 to get a new - // bundle right away). - - size_t l_outputSize = 0; // Size of output buffer. - - while ((i_size > 0) & (o_size > 0)) // while we're at the end of a buf. - { - // Check if we need to get a new bundle. - if (l_tokPos == 8) - { - l_tokPos = 0; - l_tokC = i_buf[0]; - i_buf++; - i_size--; - continue; - } - - - // Check if token was compressed or not. - if ((l_tokC >> (7 - l_tokPos)) & 0x1) - { - // compressed token... - - size_t l_matchSize; - uint8_t * l_match; - CompressedToken l_tok; - - // read token from stream. - l_tok.read(i_buf); - i_buf += l_tok.size(); - i_size -= l_tok.size(); - - // get pointer to lookahead buffer, copy into output buffer. - l_tok.uncompress(l_lookahead, l_match, l_matchSize); - memcpy(o_buf, l_match, MIN(l_matchSize, o_size)); - - // fix up all our sizes and pointers. - l_laSize += l_matchSize; - l_outputSize += MIN (l_matchSize, o_size); - o_size -= MIN (l_matchSize, o_size); - o_buf += l_matchSize; - } - else - { - // uncompressed token... just copy the byte. - - o_buf[0] = i_buf[0]; - o_size--; - o_buf++; - i_buf++; - i_size--; - - l_laSize++; - l_outputSize++; - } - l_tokPos++; // just did a token, so inc the bundle count. - - // Advance the look-behind buffer as needed. - while (l_laSize >= 1024) - { - l_lookahead++; - l_laSize--; - } - } - - // fix up o_size (since we've been decrementing it...) - o_size = l_outputSize; + // Asserts. + if ((i_buf == NULL) || (o_buf == NULL)) + { + o_size = 0; + return; + } + + // Initilize output buffer with 0 + memset( o_buf, 0, o_size); + + uint8_t * l_lookahead = o_buf; // Look-behind buffer. + size_t l_laSize = 0; // look-behind size. + + uint8_t l_tokC = 0; // Bundle bits. + uint8_t l_tokPos = 8; // Number of tokens from the bundle + // thus far. (start at 8 to get a new + // bundle right away). + + size_t l_outputSize = 0; // Size of output buffer. + + while ((i_size > 0) && (o_size > 0)) // while we're at the end of a buf. + { + // Check if we need to get a new bundle. + if (l_tokPos == 8) + { + l_tokPos = 0; + l_tokC = i_buf[0]; + i_buf++; + i_size--; + continue; + } + + + // Check if token was compressed or not. + if ((l_tokC >> (7 - l_tokPos)) & 0x1) + { + // check if input buffer has tokens + if ( i_size < CompressedToken::minSize() ) + { + // set exit condition + i_size = 0; + continue; + } + // compressed token... + + size_t l_matchSize; + uint8_t * l_match; + CompressedToken l_tok; + + // read token from stream. + l_tok.read(i_buf); + i_buf += l_tok.size(); + i_size -= l_tok.size(); + + // get pointer to lookahead buffer, copy into output buffer. + l_tok.uncompress(l_lookahead, l_match, l_matchSize); + memcpy(o_buf, l_match, MIN(l_matchSize, o_size)); + + // fix up all our sizes and pointers. + l_laSize += l_matchSize; + l_outputSize += MIN (l_matchSize, o_size); + o_size -= MIN (l_matchSize, o_size); + o_buf += l_matchSize; + } + else + { + // uncompressed token... just copy the byte. + + o_buf[0] = i_buf[0]; + o_size--; + o_buf++; + i_buf++; + i_size--; + + l_laSize++; + l_outputSize++; + } + l_tokPos++; // just did a token, so inc the bundle count. + + // Advance the look-behind buffer as needed. + while (l_laSize >= 1024) + { + l_lookahead++; + l_laSize--; + } + } + + // fix up o_size (since we've been decrementing it...) + o_size = l_outputSize; }; #endif - + }; // end namespace. #endif diff --git a/src/include/usr/errl/errlentry.H b/src/include/usr/errl/errlentry.H index 78a084a7f..d9d39cb51 100644 --- a/src/include/usr/errl/errlentry.H +++ b/src/include/usr/errl/errlentry.H @@ -541,7 +541,7 @@ private: * * @return subsystem ID */ - epubSubSystem_t getSubSystem( TARGETING::TYPE ); + epubSubSystem_t getSubSystem( TARGETING::TYPE i_target ) const; /** * @brief maps the procedure to a corresponding subsystem ID @@ -550,35 +550,25 @@ private: * * @return subsystem ID */ - epubSubSystem_t getSubSystem( HWAS::epubProcedureID i_procedureId ); + epubSubSystem_t getSubSystem( HWAS::epubProcedureID i_procedureId ) const; -#if 0 /** - * @brief Adds a software section to the log which is - * mostly used as a stack call indicator + * @brief maps a bus type to a subsystem ID * - * @param[in] i_cid Component for which the section is being logged - * @param[in] i_returnCode User supplied return code. - * @param[in] i_fileId User supplied file identifier - * @param[in] i_codeloc User supplied code location ( line # ) - * @param[in] i_objId User supplied object identifier + * @param[in] i_busType Bus Type. * - * @return Token which identifies the newly added section - * A negative token is considered to be invalid - * - * @note The section may be dropped if there is not enough - * room available to contain it + * @return subsystem ID + */ + epubSubSystem_t getSubSystem( HWAS::busTypeEnum i_busType ) const; + + /** + * @brief maps a clock type to a subsystem ID * + * @param[in] i_clockType Bus Type. * + * @return subsystem ID */ - void addSwErr(const compId_t i_cid, - const uint32_t i_returnCode, - const uint16_t i_fileId, - const uint16_t i_codeLoc, - const uint32_t i_objId = 0); - -#endif - + epubSubSystem_t getSubSystem( HWAS::clockTypeEnum i_clockType ) const; /** * @brief The ErrlManager will call here to ask the diff --git a/src/include/usr/errl/errlprvt.H b/src/include/usr/errl/errlprvt.H index 1f4e1e401..36bae4df0 100644 --- a/src/include/usr/errl/errlprvt.H +++ b/src/include/usr/errl/errlprvt.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -112,8 +112,10 @@ private: ErrlSctnHdr iv_header; // section header for any/all sections - uint64_t iv_created; // TODO Expects BCD_time8_t, but using timebase - uint64_t iv_committed; // TODO Expects BCD_time8_t, but using timebase + uint64_t iv_created; // TODO RTC 35258 Expects BCD_time8_t, but using + // timebase + uint64_t iv_committed; // TODO RTC 35258 Expects BCD_time8_t, but using + // timebase uint8_t iv_cid; // Creator 'B' (enum errlCreator) uint8_t iv_sctns; // count of sections uint32_t iv_plid; // platform log id diff --git a/src/include/usr/errl/hberrltypes.H b/src/include/usr/errl/hberrltypes.H index b8e9c220a..be0201ead 100644 --- a/src/include/usr/errl/hberrltypes.H +++ b/src/include/usr/errl/hberrltypes.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -477,9 +477,9 @@ typedef struct peluserheadersection uint8_t sev; // severity uint8_t etype; // event type uint32_t reserved0; // for error log return code - uint8_t domain; // TODO not used in Hostboot - uint8_t vector; // TODO not used in Hostboot - uint16_t actions; // TODO not used in Hostboot + uint8_t domain; // not used in Hostboot + uint8_t vector; // not used in Hostboot + uint16_t actions; // TODO RTC 93631 uint32_t reserved1; } __attribute__((packed)) pelUserHeaderSection_t; diff --git a/src/include/usr/hwpf/fapi/fapiReturnCode.H b/src/include/usr/hwpf/fapi/fapiReturnCode.H index 9265d0750..37fe73465 100644 --- a/src/include/usr/hwpf/fapi/fapiReturnCode.H +++ b/src/include/usr/hwpf/fapi/fapiReturnCode.H @@ -23,7 +23,6 @@ // $Id: fapiReturnCode.H,v 1.19 2013/11/11 19:33:31 mjjones Exp $ // $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/hwpf/working/fapi/fapiReturnCode.H,v $ - /** * @file fapiReturnCode.H * @@ -46,6 +45,7 @@ * mjjones 02/22/2012 Allow user to add Target FFDC * mjjones 03/16/2012 Add type to FFDC data * mjjones 03/16/2012 Allow different PLAT errors + * mjjones 04/20/2012 Remove deprecated int assign * brianh 07/31/2012 performance/size optimizations * mjjones 08/14/2012 Created getCreateReturnCodeDataRef * mjjones 09/19/2012 Add FFDC ID to error info @@ -175,21 +175,6 @@ public: ReturnCode & operator=(const ReturnCode & i_right); /** - * @brief ***DEPRECATED*** Assignment Operator. - * - * TODO - * This function will be deleted to prevent invalid usage of ReturnCode - * Use setFapiError, setPlatError, setEcmdError or FAPI_SET_HWP_ERROR - * - * @param[in] i_rc rcValue to assign - * - * If FAPI_RC_SUCCESS (zero) is assigned then any associated data is deleted - * - * @return Reference to 'this' ReturnCode - */ - ReturnCode & operator=(const uint32_t i_rcValue); - - /** * @brief Returns if the return code indicates success * * @return bool. True if ok, else false diff --git a/src/include/usr/initservice/initsvcstructs.H b/src/include/usr/initservice/initsvcstructs.H index 49114e5d5..036369e9c 100644 --- a/src/include/usr/initservice/initsvcstructs.H +++ b/src/include/usr/initservice/initsvcstructs.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -149,16 +149,11 @@ struct TaskFlags * - execution flags, see TaskFlags above * */ -/** - * @todo store a pointer to the taskname string here instead of allocating - * 64 bytes for each entry? - */ struct TaskInfo { - const char taskname[VFS_MODULE_NAME_MAX]; + const char * const taskname; void* (*taskfn)(void *ptr); const TaskFlags taskflags; - }; @@ -167,18 +162,13 @@ struct TaskInfo * * Holds information on other modules that need to be loaded so that this * istep will run. - * - * @todo This is a placeholder right now */ struct DepModInfo { - const char modulename[MAX_DEPENDENT_MODULES][VFS_MODULE_NAME_MAX]; - + const char * const modulename[MAX_DEPENDENT_MODULES]; }; - - /** * @struct ExtTaskInfo * diff --git a/src/include/usr/isteps/istep06list.H b/src/include/usr/isteps/istep06list.H index 4ab331ac4..ac0a3d077 100644 --- a/src/include/usr/isteps/istep06list.H +++ b/src/include/usr/isteps/istep06list.H @@ -80,167 +80,90 @@ const TaskInfo g_istep06[] = { { "", // dummy, index 0 NULL, - { - NONE, - EXT_IMAGE, - IPL_NOOP, - false, - } + { NONE, EXT_IMAGE, IPL_NOOP, false } }, { ISTEPNAME(06,01,""), // not used. NULL, - { - NONE, - EXT_IMAGE, - IPL_NOOP, - false, - } + { NONE, EXT_IMAGE, IPL_NOOP, false } }, { ISTEPNAME(06,02,""), // not used. NULL, - { - NONE, - EXT_IMAGE, - IPL_NOOP, - false, - } + { NONE, EXT_IMAGE, IPL_NOOP, false } }, { - ISTEPNAME(06,03,"host_init_fsi"), // substep name - HWAS::host_init_fsi, // pointer to fn - { - START_FN, // task type - EXT_IMAGE, // Extended Module - NORMAL_IPL_OP | MPIPL_OP, - false, // true = check for attentions - } + ISTEPNAME(06,03,"host_init_fsi"), + HWAS::host_init_fsi, + { START_FN, EXT_IMAGE, NORMAL_IPL_OP | MPIPL_OP, false } }, { ISTEPNAME(06,04,"host_set_ipl_parms"), HWAS::host_set_ipl_parms, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP | MPIPL_OP, - false, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP | MPIPL_OP, false } }, { - ISTEPNAME(06,05,"host_discover_targets"), // substep name - HWAS::host_discover_targets, // pointer to fn - { - START_FN, // task type - EXT_IMAGE, // Extended Module - NORMAL_IPL_OP | MPIPL_OP, - false, - } + ISTEPNAME(06,05,"host_discover_targets"), + HWAS::host_discover_targets, + { START_FN, EXT_IMAGE, NORMAL_IPL_OP | MPIPL_OP, false } }, { - ISTEPNAME(06,06, "host_gard"), // substep name - HWAS::host_gard, // pointer to fn - { - START_FN, // task type - EXT_IMAGE, // Extended Module - NORMAL_IPL_OP | MPIPL_OP, - false, - } + ISTEPNAME(06,06, "host_gard"), + HWAS::host_gard, + { START_FN, EXT_IMAGE, NORMAL_IPL_OP | MPIPL_OP, false } }, { ISTEPNAME(06,07,"host_cancontinue_clear"), HWAS::host_cancontinue_clear, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - false, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, false } }, { ISTEPNAME(06,08,"proc_revert_sbe_mcs_setup"), SLAVE_SBE::call_proc_revert_sbe_mcs_setup, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - false, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, false } }, { ISTEPNAME(06,09,"proc_cen_ref_clk_enable"), SLAVE_SBE::call_proc_cen_ref_clk_enable, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - false, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, false } }, { ISTEPNAME(06,10,"host_slave_sbe_config"), SLAVE_SBE::call_host_slave_sbe_config, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - false, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, false } }, - { ISTEPNAME(06,11,"host_sbe_start"), SLAVE_SBE::call_host_sbe_start, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - false, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, false } }, - { ISTEPNAME(06,12,"proc_check_slave_sbe_seeprom_complete"), SLAVE_SBE::call_proc_check_slave_sbe_seeprom_complete, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP | MPIPL_OP, - false, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP | MPIPL_OP, false } }, { ISTEPNAME(06,13,"proc_xmit_sbe"), SLAVE_SBE::call_proc_xmit_sbe, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - false, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, false } }, - - // END OF LIST! }; - const DepModInfo g_istep06Dependancies = { { DEP_LIB(libbuild_winkle_images.so), //proc_mailbox_utils DEP_LIB(libslave_sbe.so), DEP_LIB(libsbe.so), - { 0 }, + NULL } }; -// make a struct from the above with the number of items included -const ExtTaskInfo g_istep06TaskList = { - &(g_istep06[0]), - ( sizeof(g_istep06)/sizeof(TaskInfo) ), - &(g_istep06Dependancies), - }; - +const ExtTaskInfo g_istep06TaskList = { + &(g_istep06[0]), + ( sizeof(g_istep06)/sizeof(TaskInfo) ), + &(g_istep06Dependancies), +}; }; // end namespace diff --git a/src/include/usr/isteps/istep07list.H b/src/include/usr/isteps/istep07list.H index c407a963a..6b0682443 100644 --- a/src/include/usr/isteps/istep07list.H +++ b/src/include/usr/isteps/istep07list.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* COPYRIGHT International Business Machines Corp. 2012,2014 */ /* */ /* p1 */ /* */ @@ -62,131 +62,71 @@ namespace INITSERVICE { const TaskInfo g_istep07[] = { - { - "", // dummy, index 0 NULL, - { - NONE, - EXT_IMAGE, - IPL_NOOP, - false, // true = check for attentions - } + { NONE, EXT_IMAGE, IPL_NOOP, false } }, { ISTEPNAME(07,01,"proc_attr_update"), NEST_CHIPLETS::call_proc_attr_update, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - false, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, false } }, { ISTEPNAME(07,02,"proc_a_x_pci_dmi_pll_initf"), NEST_CHIPLETS::call_proc_a_x_pci_dmi_pll_initf, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - false, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, false } }, - { ISTEPNAME(07,03,"proc_a_x_pci_dmi_pll_setup"), NEST_CHIPLETS::call_proc_a_x_pci_dmi_pll_setup, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - false, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, false } }, - { ISTEPNAME(07,04,"proc_startclock_chiplets"), NEST_CHIPLETS::call_proc_startclock_chiplets, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - false, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, false } }, - - { ISTEPNAME(07,05,"proc_chiplet_scominit"), NEST_CHIPLETS::call_proc_chiplet_scominit, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - false, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, false } }, { ISTEPNAME(07,06,"proc_xbus_scominit"), NEST_CHIPLETS::call_proc_xbus_scominit, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - false, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, false } }, { ISTEPNAME(07,07,"proc_abus_scominit"), NEST_CHIPLETS::call_proc_abus_scominit, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - false, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, false } }, { ISTEPNAME(07,08,"proc_pcie_scominit"), NEST_CHIPLETS::call_proc_pcie_scominit, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - false, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, false } }, { ISTEPNAME(07,09,"proc_scomoverride_chiplets"), NEST_CHIPLETS::call_proc_scomoverride_chiplets, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - false, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, false } }, - - - // END OF LIST! }; -const DepModInfo g_istep07Dependancies = { +const DepModInfo g_istep07Dependancies = { { DEP_LIB(libnest_chiplets.so), - { 0 }, + NULL } }; -// make a struct from the above with the number of items included -const ExtTaskInfo g_istep07TaskList = { - &(g_istep07[0]), - ( sizeof(g_istep07)/sizeof(TaskInfo) ), - &g_istep07Dependancies // later, depModules struct +const ExtTaskInfo g_istep07TaskList = { + &(g_istep07[0]), + ( sizeof(g_istep07)/sizeof(TaskInfo) ), + &g_istep07Dependancies }; }; // end namespace diff --git a/src/include/usr/isteps/istep08list.H b/src/include/usr/isteps/istep08list.H index 77825284c..c5362c882 100644 --- a/src/include/usr/isteps/istep08list.H +++ b/src/include/usr/isteps/istep08list.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* COPYRIGHT International Business Machines Corp. 2012,2014 */ /* */ /* p1 */ /* */ @@ -64,132 +64,66 @@ namespace INITSERVICE { const TaskInfo g_istep08[] = { - { - "", // dummy, index 0 NULL, - { - NONE, - EXT_IMAGE, - IPL_NOOP, - false, // true = check for attentions - } + { NONE, EXT_IMAGE, IPL_NOOP, false } }, - { ISTEPNAME(08,01,"fabric_erepair"), EDI_EI_INITIALIZATION::call_fabric_erepair, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - false, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, false } }, - - { ISTEPNAME(08,02,"fabric_io_dccal"), EDI_EI_INITIALIZATION::call_fabric_io_dccal, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - false, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, false } }, - - { ISTEPNAME(08,03,"fabric_pre_trainadv"), EDI_EI_INITIALIZATION::call_fabric_pre_trainadv, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - false, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, false } }, - - { ISTEPNAME(08,04,"fabric_io_run_training"), EDI_EI_INITIALIZATION::call_fabric_io_run_training, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - false, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, false } }, - - { ISTEPNAME(08,05,"fabric_post_trainadv"), EDI_EI_INITIALIZATION::call_fabric_post_trainadv, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - false, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, false } }, - - { ISTEPNAME(08,06,"host_startprd_pbus"), EDI_EI_INITIALIZATION::call_host_startprd_pbus, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - false, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, false } }, - - { ISTEPNAME(08,07,"host_attnlisten_proc"), EDI_EI_INITIALIZATION::call_host_attnlisten_proc, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - false, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, false } }, - - { ISTEPNAME(08,08,"proc_fab_iovalid"), EDI_EI_INITIALIZATION::call_proc_fab_iovalid, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, - - - // END OF LIST! }; -const DepModInfo g_istep08Dependancies = { +const DepModInfo g_istep08Dependancies = { { DEP_LIB(libedi_ei_initialization.so), DEP_LIB(libdmi_training.so), DEP_LIB(libnest_chiplets.so), - { 0 }, + NULL } }; -// make a struct from the above with the number of items included -const ExtTaskInfo g_istep08TaskList = { - &(g_istep08[0]), - ( sizeof(g_istep08)/sizeof(TaskInfo) ), - &g_istep08Dependancies // later, depModules struct +const ExtTaskInfo g_istep08TaskList = { + &(g_istep08[0]), + ( sizeof(g_istep08)/sizeof(TaskInfo) ), + &g_istep08Dependancies }; }; // end namespace diff --git a/src/include/usr/isteps/istep09list.H b/src/include/usr/isteps/istep09list.H index 87a018f21..cf6cb88ce 100644 --- a/src/include/usr/isteps/istep09list.H +++ b/src/include/usr/isteps/istep09list.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* COPYRIGHT International Business Machines Corp. 2012,2014 */ /* */ /* p1 */ /* */ @@ -53,42 +53,21 @@ namespace INITSERVICE { const TaskInfo g_istep09[] = { - { - "", // dummy, index 0 NULL, - { - NONE, - EXT_IMAGE, - IPL_NOOP, - false, //true = check for attentions - } + { NONE, EXT_IMAGE, IPL_NOOP, false } }, - { ISTEPNAME(09,01,"proc_build_smp"), ACTIVATE_POWERBUS::call_proc_build_smp, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { ISTEPNAME(09,02,"host_slave_sbe_update"), ACTIVATE_POWERBUS::call_host_slave_sbe_update, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, - - - // END OF LIST! }; const DepModInfo g_istep09Dependancies = { @@ -97,16 +76,14 @@ const DepModInfo g_istep09Dependancies = { DEP_LIB(libdram_initialization.so), DEP_LIB(libsbe.so), DEP_LIB(libbuild_winkle_images.so), - { 0 }, + NULL } }; - -// make a struct from the above with the number of items included -const ExtTaskInfo g_istep09TaskList = { - &(g_istep09[0]), - ( sizeof(g_istep09)/sizeof(TaskInfo) ), - &g_istep09Dependancies // later, depModules struct +const ExtTaskInfo g_istep09TaskList = { + &(g_istep09[0]), + ( sizeof(g_istep09)/sizeof(TaskInfo) ), + &g_istep09Dependancies }; }; // end namespace diff --git a/src/include/usr/isteps/istep10list.H b/src/include/usr/isteps/istep10list.H index eea23b4f4..dd7ba50e1 100644 --- a/src/include/usr/isteps/istep10list.H +++ b/src/include/usr/isteps/istep10list.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* COPYRIGHT International Business Machines Corp. 2012,2014 */ /* */ /* p1 */ /* */ @@ -74,165 +74,84 @@ namespace INITSERVICE { const TaskInfo g_istep10[] = { - { "", // dummy, index 0 NULL, - { - NONE, - EXT_IMAGE, - IPL_NOOP, - false, // true = check for attentions - } + { NONE, EXT_IMAGE, IPL_NOOP, false } }, { ISTEPNAME(10,01,"host_prd_hwreconfig"), HWAS::host_prd_hwreconfig, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { ISTEPNAME(10,02,"cen_sbe_tp_chiplet_init1"), SBE_CENTAUR_INIT::call_sbe_centaur_init, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { ISTEPNAME(10,03,"cen_sbe_pll_initf"), HWAS::host_stub, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { ISTEPNAME(10,04,"cen_sbe_pll_setup"), HWAS::host_stub, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, - { ISTEPNAME(10,05,"cen_sbe_tp_chiplet_init2"), HWAS::host_stub, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { ISTEPNAME(10,06,"cen_sbe_tp_arrayinit"), HWAS::host_stub, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { ISTEPNAME(10,07,"cen_sbe_tp_chiplet_init3"), HWAS::host_stub, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { ISTEPNAME(10,08,"cen_sbe_chiplet_init"), HWAS::host_stub, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { ISTEPNAME(10,09,"cen_sbe_tp_arrayinit"), HWAS::host_stub, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { ISTEPNAME(10,10,"cen_sbe_dts_init"), HWAS::host_stub, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { ISTEPNAME(10,11,"cen_sbe_initf"), HWAS::host_stub, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { ISTEPNAME(10,12,"cen_sbe_do_manual_inits"), HWAS::host_stub, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { ISTEPNAME(10,13,"cen_sbe_nest_startclocks"), HWAS::host_stub, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { - ISTEPNAME(10,14,"cen_sbe_scominits"), HWAS::host_stub, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, - - - // END OF LIST! }; -const DepModInfo g_istep10Dependancies = { +const DepModInfo g_istep10Dependancies = { { DEP_LIB(libsbe_centaur_init.so), DEP_LIB(libfapiporeve.so), @@ -240,16 +159,14 @@ const DepModInfo g_istep10Dependancies = { DEP_LIB(libbuild_winkle_images.so), DEP_LIB(libsbe.so), DEP_LIB(libproc_hwreconfig.so), - { 0 }, + NULL } }; - -// make a struct from the above with the number of items included -const ExtTaskInfo g_istep10TaskList = { - &(g_istep10[0]), - ( sizeof(g_istep10)/sizeof(TaskInfo) ), - &g_istep10Dependancies +const ExtTaskInfo g_istep10TaskList = { + &(g_istep10[0]), + ( sizeof(g_istep10)/sizeof(TaskInfo) ), + &g_istep10Dependancies }; }; // end namespace diff --git a/src/include/usr/isteps/istep11list.H b/src/include/usr/isteps/istep11list.H index ac18b193a..28ff7e035 100644 --- a/src/include/usr/isteps/istep11list.H +++ b/src/include/usr/isteps/istep11list.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -73,171 +73,92 @@ namespace INITSERVICE { - const TaskInfo g_istep11[] = { - { "", // dummy, index 0 NULL, - { - NONE, - EXT_IMAGE, - IPL_NOOP, - false, // true = check for attentions - } + { NONE, EXT_IMAGE, IPL_NOOP, false } }, { - ISTEPNAME(11,01,"mss_getecid"), // substep name - DMI_TRAINING::call_mss_getecid, // pointer to fn - { - START_FN, // task type - EXT_IMAGE, // Extended Module - NORMAL_IPL_OP, - true, - } + ISTEPNAME(11,01,"mss_getecid"), + DMI_TRAINING::call_mss_getecid, + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { - ISTEPNAME(11,02,"dmi_attr_update"), // substep name - DMI_TRAINING::call_dmi_attr_update, // pointer to fn - { - START_FN, // task type - EXT_IMAGE, // Extended Module - NORMAL_IPL_OP, - true, - } + ISTEPNAME(11,02,"dmi_attr_update"), + DMI_TRAINING::call_dmi_attr_update, + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, - { - ISTEPNAME(11,03,"proc_dmi_scominit"), // substep name - DMI_TRAINING::call_proc_dmi_scominit, // pointer to fn - { - START_FN, // task type - EXT_IMAGE, // Extended Module - NORMAL_IPL_OP, - true, - } + ISTEPNAME(11,03,"proc_dmi_scominit"), + DMI_TRAINING::call_proc_dmi_scominit, + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, - { - ISTEPNAME(11,04,"dmi_scominit"), // substep name - DMI_TRAINING::call_dmi_scominit, // pointer to fn - { - START_FN, // task type - EXT_IMAGE, // Extended Module - NORMAL_IPL_OP, - true, - } + ISTEPNAME(11,04,"dmi_scominit"), + DMI_TRAINING::call_dmi_scominit, + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, - { - ISTEPNAME(11,05,"dmi_erepair"), // substep name - DMI_TRAINING::call_dmi_erepair, // pointer to fn - { - START_FN, // task type - EXT_IMAGE, // Extended Module - NORMAL_IPL_OP, - true, - } + ISTEPNAME(11,05,"dmi_erepair"), + DMI_TRAINING::call_dmi_erepair, + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { - ISTEPNAME(11,06,"dmi_io_dccal"), // substep name - DMI_TRAINING::call_dmi_io_dccal, // pointer to fn - { - START_FN, // task type - EXT_IMAGE, // Extended Module - NORMAL_IPL_OP, - true, - } + ISTEPNAME(11,06,"dmi_io_dccal"), + DMI_TRAINING::call_dmi_io_dccal, + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { - ISTEPNAME(11,07,"dmi_pre_trainadv"), // substep name - DMI_TRAINING::call_dmi_pre_trainadv, // pointer to fn - { - START_FN, // task type - EXT_IMAGE, // Extended Module - NORMAL_IPL_OP, - true, - } + ISTEPNAME(11,07,"dmi_pre_trainadv"), + DMI_TRAINING::call_dmi_pre_trainadv, + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { - ISTEPNAME(11,08,"dmi_io_run_training"), // substep name - DMI_TRAINING::call_dmi_io_run_training, // pointer to fn - { - START_FN, // task type - EXT_IMAGE, // Extended Module - NORMAL_IPL_OP, - true, - } + ISTEPNAME(11,08,"dmi_io_run_training"), + DMI_TRAINING::call_dmi_io_run_training, + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { - ISTEPNAME(11,09,"dmi_post_trainadv"), // substep name - DMI_TRAINING::call_dmi_post_trainadv, // pointer to fn - { - START_FN, // task type - EXT_IMAGE, // Extended Module - NORMAL_IPL_OP, - true, - } + ISTEPNAME(11,09,"dmi_post_trainadv"), + DMI_TRAINING::call_dmi_post_trainadv, + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { - ISTEPNAME(11,10,"proc_cen_framelock"), // substep name - DMI_TRAINING::call_proc_cen_framelock, // pointer to fn - { - START_FN, // task type - EXT_IMAGE, // Extended Module - NORMAL_IPL_OP, - true, - } + ISTEPNAME(11,10,"proc_cen_framelock"), + DMI_TRAINING::call_proc_cen_framelock, + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { - ISTEPNAME(11,11,"host_startprd_dmi"), // substep name - DMI_TRAINING::call_host_startprd_dmi, // pointer to fn - { - START_FN, // task type - EXT_IMAGE, // Extended Module - NORMAL_IPL_OP, - true, - } + ISTEPNAME(11,11,"host_startprd_dmi"), + DMI_TRAINING::call_host_startprd_dmi, + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { - ISTEPNAME(11,12,"host_attnlisten_cen"), // substep name - DMI_TRAINING::call_host_attnlisten_cen, // pointer to fn - { - START_FN, // task type - EXT_IMAGE, // Extended Module - NORMAL_IPL_OP, - true, - } + ISTEPNAME(11,12,"host_attnlisten_cen"), + DMI_TRAINING::call_host_attnlisten_cen, + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { - ISTEPNAME(11,13,"cen_set_inband_addr"), // substep name - DMI_TRAINING::call_cen_set_inband_addr, // pointer to fn - { - START_FN, // task type - EXT_IMAGE, // Extended Module - NORMAL_IPL_OP, - true, - } + ISTEPNAME(11,13,"cen_set_inband_addr"), + DMI_TRAINING::call_cen_set_inband_addr, + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, - - // END OF LIST! }; -const DepModInfo g_istep11Dependancies = { +const DepModInfo g_istep11Dependancies = { { DEP_LIB(libdmi_training.so), DEP_LIB(libedi_ei_initialization.so), DEP_LIB(libnest_chiplets.so), - { 0 }, + NULL } }; - -// make a struct from the above with the number of items included -const ExtTaskInfo g_istep11TaskList = { - &(g_istep11[0]), - ( sizeof(g_istep11)/sizeof(TaskInfo) ), - &g_istep11Dependancies +const ExtTaskInfo g_istep11TaskList = { + &(g_istep11[0]), + ( sizeof(g_istep11)/sizeof(TaskInfo) ), + &g_istep11Dependancies }; }; // end namespace diff --git a/src/include/usr/isteps/istep12list.H b/src/include/usr/isteps/istep12list.H index 93c7fbe65..6ec07ce9e 100644 --- a/src/include/usr/isteps/istep12list.H +++ b/src/include/usr/isteps/istep12list.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* COPYRIGHT International Business Machines Corp. 2012,2014 */ /* */ /* p1 */ /* */ @@ -62,83 +62,46 @@ const TaskInfo g_istep12[] = { { "", // dummy, index 0 NULL, - { - NONE, - EXT_IMAGE, - IPL_NOOP, - false, // true = check for attentions - } + { NONE, EXT_IMAGE, IPL_NOOP, false } }, - { ISTEPNAME(12,01,"host_collect_dimm_spd"), MC_CONFIG::call_host_collect_dimm_spd, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { ISTEPNAME(12,02,"mss_volt"), MC_CONFIG::call_mss_volt, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { ISTEPNAME(12,03,"mss_freq"), MC_CONFIG::call_mss_freq, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { ISTEPNAME(12,04,"mss_eff_config"), MC_CONFIG::call_mss_eff_config, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { ISTEPNAME(12,05,"mss_attr_update"), MC_CONFIG::call_mss_attr_update, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, - - - // END OF LIST! }; -const DepModInfo g_istep12Dependancies = { +const DepModInfo g_istep12Dependancies = { { DEP_LIB(libmc_config.so), - { 0 }, + NULL } }; - - -// make a struct from the above with the number of items included -const ExtTaskInfo g_istep12TaskList = { - &(g_istep12[0]), - ( sizeof(g_istep12)/sizeof(TaskInfo) ), - &g_istep12Dependancies // later, depModules struct +const ExtTaskInfo g_istep12TaskList = { + &(g_istep12[0]), + ( sizeof(g_istep12)/sizeof(TaskInfo) ), + &g_istep12Dependancies }; }; // end namespace diff --git a/src/include/usr/isteps/istep13list.H b/src/include/usr/isteps/istep13list.H index 4193f17bd..852b35e83 100644 --- a/src/include/usr/isteps/istep13list.H +++ b/src/include/usr/isteps/istep13list.H @@ -72,157 +72,85 @@ namespace INITSERVICE { const TaskInfo g_istep13[] = { - { "", // dummy, index 0 NULL, - { - NONE, - EXT_IMAGE, - IPL_NOOP, - false, // true = check for attentions - } + { NONE, EXT_IMAGE, IPL_NOOP, false } }, - { ISTEPNAME(13,01,"host_disable_vddr"), DRAM_TRAINING::call_host_disable_vddr, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { ISTEPNAME(13,02,"mem_pll_initf"), DRAM_TRAINING::call_mem_pll_initf, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { ISTEPNAME(13,03,"mem_pll_setup"), DRAM_TRAINING::call_mem_pll_setup, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { ISTEPNAME(13,04,"mem_startclocks"), DRAM_TRAINING::call_mem_startclocks, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { ISTEPNAME(13,05,"host_enable_vddr"), DRAM_TRAINING::call_host_enable_vddr, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { ISTEPNAME(13,06,"mss_scominit"), DRAM_TRAINING::call_mss_scominit, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { ISTEPNAME(13,07,"mss_ddr_phy_reset"), DRAM_TRAINING::call_mss_ddr_phy_reset, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { ISTEPNAME(13,08,"mss_draminit"), DRAM_TRAINING::call_mss_draminit, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { ISTEPNAME(13,09,"mss_draminit_training"), DRAM_TRAINING::call_mss_draminit_training, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { ISTEPNAME(13,10,"mss_draminit_trainadv"), DRAM_TRAINING::call_mss_draminit_trainadv, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { ISTEPNAME(13,11,"mss_draminit_mc"), DRAM_TRAINING::call_mss_draminit_mc, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { ISTEPNAME(13,12,"mss_dimm_power_test"), DRAM_TRAINING::call_mss_dimm_power_test, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, - - // END OF LIST! }; -const DepModInfo g_istep13Dependancies = { +const DepModInfo g_istep13Dependancies = { { DEP_LIB(libdram_training.so), DEP_LIB(libdram_initialization.so), - { 0 }, + NULL } }; - - -// make a struct from the above with the number of items included -const ExtTaskInfo g_istep13TaskList = { - &(g_istep13[0]), - ( sizeof(g_istep13)/sizeof(TaskInfo) ), - &g_istep13Dependancies // later, depModules struct +const ExtTaskInfo g_istep13TaskList = { + &(g_istep13[0]), + ( sizeof(g_istep13)/sizeof(TaskInfo) ), + &g_istep13Dependancies }; }; // end namespace diff --git a/src/include/usr/isteps/istep14list.H b/src/include/usr/isteps/istep14list.H index 8bb10ab89..f47608345 100644 --- a/src/include/usr/isteps/istep14list.H +++ b/src/include/usr/isteps/istep14list.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* COPYRIGHT International Business Machines Corp. 2012,2014 */ /* */ /* p1 */ /* */ @@ -63,141 +63,71 @@ namespace INITSERVICE { const TaskInfo g_istep14[] = { - { - "", // dummy, index 0 NULL, - { - NONE, - EXT_IMAGE, - IPL_NOOP, - false, // true = check for attentions - } + { NONE, EXT_IMAGE, IPL_NOOP, false } }, - { ISTEPNAME(14,01,"host_startprd_dram"), DRAM_INITIALIZATION::call_host_startprd_dram, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { ISTEPNAME(14,02,"mss_extent_setup"), DRAM_INITIALIZATION::call_mss_extent_setup, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, { ISTEPNAME(14,03,"mss_memdiag"), DRAM_INITIALIZATION::call_mss_memdiag, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, - - { ISTEPNAME(14,04,"mss_thermal_init"), DRAM_INITIALIZATION::call_mss_thermal_init, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, - - { ISTEPNAME(14,05,"proc_pcie_config"), DRAM_INITIALIZATION::call_proc_pcie_config, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, - { ISTEPNAME(14,06,"mss_power_cleanup"), DRAM_INITIALIZATION::call_mss_power_cleanup, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, - - { ISTEPNAME(14,07,"proc_setup_bars"), DRAM_INITIALIZATION::call_proc_setup_bars, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } }, - - { ISTEPNAME(14,08,"proc_exit_cache_contained"), DRAM_INITIALIZATION::call_proc_exit_cache_contained, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP | MPIPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP | MPIPL_OP, true } }, - - { ISTEPNAME(14,09,"host_mpipl_service"), DRAM_INITIALIZATION::call_host_mpipl_service, - { - START_FN, - EXT_IMAGE, - MPIPL_OP, - true, - } + { START_FN, EXT_IMAGE, MPIPL_OP, true } }, + }; - - // END OF LIST! -}; - -const DepModInfo g_istep14Dependancies = { +const DepModInfo g_istep14Dependancies = { { DEP_LIB(libdram_initialization.so), DEP_LIB(libdram_training.so), DEP_LIB(libdump.so), - { 0 }, + NULL } }; - - -// make a struct from the above with the number of items included -const ExtTaskInfo g_istep14TaskList = { - &(g_istep14[0]), - ( sizeof(g_istep14)/sizeof(TaskInfo) ), - &g_istep14Dependancies // later, depModules struct +const ExtTaskInfo g_istep14TaskList = { + &(g_istep14[0]), + ( sizeof(g_istep14)/sizeof(TaskInfo) ), + &g_istep14Dependancies }; }; // end namespace diff --git a/src/include/usr/isteps/istep15list.H b/src/include/usr/isteps/istep15list.H index e463d3ce5..eae652d07 100644 --- a/src/include/usr/isteps/istep15list.H +++ b/src/include/usr/isteps/istep15list.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* COPYRIGHT International Business Machines Corp. 2012,2014 */ /* */ /* p1 */ /* */ @@ -51,68 +51,41 @@ namespace INITSERVICE { const TaskInfo g_istep15[] = { - { - "", // dummy, index 0 NULL, - { - NONE, - EXT_IMAGE, - IPL_NOOP, - false, // true = check for attentions - } + { NONE, EXT_IMAGE, IPL_NOOP, false } }, - { ISTEPNAME(15,01,"host_build_winkle"), BUILD_WINKLE_IMAGES::call_host_build_winkle, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP | MPIPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP | MPIPL_OP, true } }, { ISTEPNAME(15,02,"proc_set_pore_bar"), BUILD_WINKLE_IMAGES::call_proc_set_pore_bar, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP | MPIPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP | MPIPL_OP, true } }, { ISTEPNAME(15,03,"p8_poreslw_init"), BUILD_WINKLE_IMAGES::call_p8_poreslw_init, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP | MPIPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP | MPIPL_OP, true } }, - - // END OF LIST! }; -const DepModInfo g_istep15Dependancies = { +const DepModInfo g_istep15Dependancies = { { DEP_LIB(libocc.so), DEP_LIB(libbuild_winkle_images.so), - { 0 }, + NULL } }; - -// make a struct from the above with the number of items included -const ExtTaskInfo g_istep15TaskList = { - &(g_istep15[0]), - ( sizeof(g_istep15)/sizeof(TaskInfo) ), - &g_istep15Dependancies // later, depModules struct +const ExtTaskInfo g_istep15TaskList = { + &(g_istep15[0]), + ( sizeof(g_istep15)/sizeof(TaskInfo) ), + &g_istep15Dependancies }; }; // end namespace diff --git a/src/include/usr/isteps/istep16list.H b/src/include/usr/isteps/istep16list.H index 43821c786..26b555936 100644 --- a/src/include/usr/isteps/istep16list.H +++ b/src/include/usr/isteps/istep16list.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* COPYRIGHT International Business Machines Corp. 2012,2014 */ /* */ /* p1 */ /* */ @@ -57,84 +57,45 @@ namespace INITSERVICE { const TaskInfo g_istep16[] = { - { - "", // dummy, index 0 NULL, - { - NONE, - EXT_IMAGE, - IPL_NOOP, - false, // true = check for attentions - } + { NONE, EXT_IMAGE, IPL_NOOP, false } }, - { ISTEPNAME(16,01,"host_activate_master"), CORE_ACTIVATE::call_host_activate_master, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP | MPIPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP | MPIPL_OP, true } }, - - { ISTEPNAME(16,02,"host_activate_slave_cores"), CORE_ACTIVATE::call_host_activate_slave_cores, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP | MPIPL_OP, - true, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP | MPIPL_OP, true } }, - - { ISTEPNAME(16,03,"mss_scrub"), CORE_ACTIVATE::call_mss_scrub, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - false, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, false } }, - - { ISTEPNAME(16,04,"host_ipl_complete"), CORE_ACTIVATE::call_host_ipl_complete, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP | MPIPL_OP, - false, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP | MPIPL_OP, false } }, - - - // END OF LIST! }; -const DepModInfo g_istep16Dependancies = { +const DepModInfo g_istep16Dependancies = { { DEP_LIB(libcore_activate.so), DEP_LIB(libbuild_winkle_images.so), - { 0 }, + NULL } }; - -// make a struct from the above with the number of items included const ExtTaskInfo g_istep16TaskList = { - &(g_istep16[0]), - ( sizeof(g_istep16)/sizeof(TaskInfo) ), - &g_istep16Dependancies // later, depModules struct + &(g_istep16[0]), + ( sizeof(g_istep16)/sizeof(TaskInfo) ), + &g_istep16Dependancies }; }; // end namespace diff --git a/src/include/usr/isteps/istep18list.H b/src/include/usr/isteps/istep18list.H index 0d9720780..9701b1d54 100644 --- a/src/include/usr/isteps/istep18list.H +++ b/src/include/usr/isteps/istep18list.H @@ -52,183 +52,95 @@ namespace INITSERVICE { const TaskInfo g_istep18[] = { - { - "", // dummy, index 0 NULL, - { - NONE, - EXT_IMAGE, - IPL_NOOP, - false, // true = check for attentions - } + { NONE, EXT_IMAGE, IPL_NOOP, false } }, - { ISTEPNAME(18,01,""), NULL, - { - NONE, - EXT_IMAGE, - IPL_NOOP, - false, - } + { NONE, EXT_IMAGE, IPL_NOOP, false } }, - { ISTEPNAME(18,02,""), NULL, - { - NONE, - EXT_IMAGE, - IPL_NOOP, - false, - } + { NONE, EXT_IMAGE, IPL_NOOP, false } }, - { ISTEPNAME(18,03,""), NULL, - { - NONE, - EXT_IMAGE, - IPL_NOOP, - false, - } + { NONE, EXT_IMAGE, IPL_NOOP, false } }, - { ISTEPNAME(18,04,""), NULL, - { - NONE, - EXT_IMAGE, - IPL_NOOP, - false, - } + { NONE, EXT_IMAGE, IPL_NOOP, false } }, - { ISTEPNAME(18,05,""), NULL, - { - NONE, - EXT_IMAGE, - IPL_NOOP, - false, - } + { NONE, EXT_IMAGE, IPL_NOOP, false } }, - { ISTEPNAME(18,06,""), NULL, - { - NONE, - EXT_IMAGE, - IPL_NOOP, - false, - } + { NONE, EXT_IMAGE, IPL_NOOP, false } }, - { ISTEPNAME(18,07,""), NULL, - { - NONE, - EXT_IMAGE, - IPL_NOOP, - false, - } + { NONE, EXT_IMAGE, IPL_NOOP, false } }, { ISTEPNAME(18,08,""), NULL, - { - NONE, - EXT_IMAGE, - IPL_NOOP, - false, - } + { NONE, EXT_IMAGE, IPL_NOOP, false } }, { ISTEPNAME(18,09,"sys_proc_fab_iovalid"), NULL, - { - NONE, - EXT_IMAGE, - IPL_NOOP, - false, - } + { NONE, EXT_IMAGE, IPL_NOOP, false } }, { - ISTEPNAME(18,10,""), NULL, - { - NONE, - EXT_IMAGE, - IPL_NOOP, - false, - } + { NONE, EXT_IMAGE, IPL_NOOP, false } }, { ISTEPNAME(18,11,""), NULL, - { - NONE, - EXT_IMAGE, - IPL_NOOP, - false, - } + { NONE, EXT_IMAGE, IPL_NOOP, false } }, { ISTEPNAME(18,12,""), NULL, - { - NONE, - EXT_IMAGE, - IPL_NOOP, - false, - } + { NONE, EXT_IMAGE, IPL_NOOP, false } }, { ISTEPNAME(18,13,"proc_tod_setup"), TOD::call_tod_setup, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - false, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, false } }, { ISTEPNAME(18,14,"proc_tod_init"), TOD::call_tod_init, - { - START_FN, - EXT_IMAGE, - NORMAL_IPL_OP, - false, - } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, false } }, - - // END OF LIST! }; -const DepModInfo g_istep18Dependancies = { +const DepModInfo g_istep18Dependancies = { { DEP_LIB(libtod_init.so), - { 0 }, + NULL } }; -// make a struct from the above with the number of items included -const ExtTaskInfo g_istep18TaskList = { - &(g_istep18[0]), - ( sizeof(g_istep18)/sizeof(TaskInfo) ), - &g_istep18Dependancies // later, depModules struct +const ExtTaskInfo g_istep18TaskList = { + &(g_istep18[0]), + ( sizeof(g_istep18)/sizeof(TaskInfo) ), + &g_istep18Dependancies }; }; // end namespace diff --git a/src/include/usr/isteps/istep21list.H b/src/include/usr/isteps/istep21list.H index 6a689b37c..5b64e65ba 100644 --- a/src/include/usr/isteps/istep21list.H +++ b/src/include/usr/isteps/istep21list.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* COPYRIGHT International Business Machines Corp. 2012,2014 */ /* */ /* p1 */ /* */ @@ -55,52 +55,26 @@ namespace INITSERVICE { const TaskInfo g_istep21[] = { - { - "", // dummy, index 0 NULL, - { - NONE, - EXT_IMAGE, - IPL_NOOP, - false, // true = check for attentions - } + { NONE, EXT_IMAGE, IPL_NOOP, false } }, - { ISTEPNAME(21,01,"host_runtime_setup"), START_PAYLOAD::call_host_runtime_setup, - { - START_FN, - EXT_IMAGE, - MPIPL_OP | NORMAL_IPL_OP, - false, - } + { START_FN, EXT_IMAGE, MPIPL_OP | NORMAL_IPL_OP, false } }, { ISTEPNAME(21,02,"host_verify_hdat"), START_PAYLOAD::call_host_verify_hdat, - { - START_FN, - EXT_IMAGE, - MPIPL_OP | NORMAL_IPL_OP, - false, - } + { START_FN, EXT_IMAGE, MPIPL_OP | NORMAL_IPL_OP, false } }, { ISTEPNAME(21,03,"host_start_payload"), START_PAYLOAD::call_host_start_payload, - { - START_FN, - EXT_IMAGE, - MPIPL_OP | NORMAL_IPL_OP, - false, - } + { START_FN, EXT_IMAGE, MPIPL_OP | NORMAL_IPL_OP, false } }, - - - // END OF LIST! }; const DepModInfo g_istep21Dependancies = { @@ -115,16 +89,14 @@ const DepModInfo g_istep21Dependancies = { DEP_LIB(libocc.so), */ - { 0 }, + NULL } }; - -// make a struct from the above with the number of items included -const ExtTaskInfo g_istep21TaskList = { - &(g_istep21[0]), - ( sizeof(g_istep21)/sizeof(TaskInfo) ), - &g_istep21Dependancies // later, depModules struct +const ExtTaskInfo g_istep21TaskList = { + &(g_istep21[0]), + ( sizeof(g_istep21)/sizeof(TaskInfo) ), + &g_istep21Dependancies }; }; // end namespace diff --git a/src/include/usr/isteps/istepmasterlist.H b/src/include/usr/isteps/istepmasterlist.H index 74b296be8..66160c555 100644 --- a/src/include/usr/isteps/istepmasterlist.H +++ b/src/include/usr/isteps/istepmasterlist.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -56,7 +56,7 @@ #include <initservice/initsvcstructs.H> // macro to expand library dependancies -#define DEP_LIB(x) { #x } +#define DEP_LIB(x) #x // ----- istep include files ----- diff --git a/src/include/usr/targeting/common/target.H b/src/include/usr/targeting/common/target.H index b85e80667..168528983 100644 --- a/src/include/usr/targeting/common/target.H +++ b/src/include/usr/targeting/common/target.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -129,16 +129,7 @@ class Target * @retval false Attribute not found; o_attValue not valid */ template<const ATTRIBUTE_ID A> - inline bool tryGetAttr( - typename AttributeTraits<A>::Type& o_attrValue) const - { - // Note: the compiler optimizes the following check (which fails - // at compile time if the attribute is not readable) away - if(AttributeTraits<A>::readable) { } - if(AttributeTraits<A>::notHbMutex) { } - if(AttributeTraits<A>::notFspMutex) { } - return _tryGetAttr(A,sizeof(o_attrValue),&o_attrValue); - } + bool tryGetAttr(typename AttributeTraits<A>::Type& o_attrValue) const; /** * @brief Get the target's specified attribute value @@ -201,15 +192,7 @@ class Target * @retval false Attribute not updated */ template<const ATTRIBUTE_ID A> - bool trySetAttr( - typename AttributeTraits<A>::Type const& i_attrValue) - { - // Note: the compiler optimizes the following check (which fails - // at compile time if the attribute is not writable) away - if(AttributeTraits<A>::writeable) { } - if(AttributeTraits<A>::notHbMutex) { } - return _trySetAttr(A,sizeof(i_attrValue),&i_attrValue); - } + bool trySetAttr(typename AttributeTraits<A>::Type const& i_attrValue); /** * @brief Returns pointer to a mutex attribute associated with the @@ -257,8 +240,7 @@ class Target * @retval false Attribute was not found, o_pMutex was not updated */ template<const ATTRIBUTE_ID A> - bool tryGetHbMutexAttr( - mutex_t*& o_pMutex) const; + bool tryGetHbMutexAttr(mutex_t*& o_pMutex) const; /** * @brief Sets the target's specified attribute value @@ -273,14 +255,7 @@ class Target * routine asserts */ template<const ATTRIBUTE_ID A> - void setAttr( - typename AttributeTraits<A>::Type const& i_attrValue) - { - bool l_wrote = trySetAttr<A>(i_attrValue); - - //@TODO: Remove assert once release has stabilized - TARG_ASSERT(l_wrote,"TARGETING::Target::setAttr<0x%7x>: trySetAttr returned false",A); - } + void setAttr(typename AttributeTraits<A>::Type const& i_attrValue); /** * @brief Perform FFDC for the target instance @@ -518,6 +493,33 @@ class Target */ uint8_t getAttrTankTargetUnitPos() const; + /** + * @brief enumeration of assert reasons + */ + enum TargAssertReason + { + SET_ATTR, + GET_ATTR, + GET_ATTR_AS_STRING, + GET_HB_MUTEX_ATTR, + }; + + /** + * @brief Invokes a standard assert to end the task + * + * This is called when a function does not want the code size overhead + * of the assert macro expansion. This is especially useful for the + * asserts performed by the inline attribute + * + * @param[in] i_reason Reason for assertion + * @param[in] i_ffdc FDDC Data (usually the attribute id) + */ +#ifdef NO_RETURN + NO_RETURN +#endif + static void targAssert(TargAssertReason i_reason, + uint32_t i_ffdc); + private: // Function pointer variable declaration static pCallbackFuncPtr cv_pCallbackFuncPtr; @@ -590,17 +592,45 @@ class Target } PACKED; template<const ATTRIBUTE_ID A> +bool Target::tryGetAttr(typename AttributeTraits<A>::Type& o_attrValue) const +{ + if(AttributeTraits<A>::readable) { } + if(AttributeTraits<A>::notHbMutex) { } + if(AttributeTraits<A>::notFspMutex) { } + return _tryGetAttr(A,sizeof(o_attrValue),&o_attrValue); +} + +template<const ATTRIBUTE_ID A> +bool Target::trySetAttr(typename AttributeTraits<A>::Type const& i_attrValue) +{ + if(AttributeTraits<A>::writeable) { } + if(AttributeTraits<A>::notHbMutex) { } + return _trySetAttr(A,sizeof(i_attrValue),&i_attrValue); +} + +template<const ATTRIBUTE_ID A> typename AttributeTraits<A>::Type Target::getAttr() const { typename AttributeTraits<A>::Type l_attrValue; bool l_read = tryGetAttr<A>(l_attrValue); - - //@TODO Remove assert once release has stablized - TARG_ASSERT(l_read,"TARGETING::Target::getAttr<0x%7x>: tryGetAttr returned false",A); + if (unlikely(!l_read)) + { + targAssert(GET_ATTR, A); + } return l_attrValue; } template<const ATTRIBUTE_ID A> +void Target::setAttr(typename AttributeTraits<A>::Type const& i_attrValue) +{ + bool l_wrote = trySetAttr<A>(i_attrValue); + if (unlikely(!l_wrote)) + { + targAssert(SET_ATTR, A); + } +} + +template<const ATTRIBUTE_ID A> mutex_t* Target::getHbMutexAttr() const { if(AttributeTraits<A>::hbMutex) { } @@ -637,9 +667,10 @@ const char* Target::getAttrAsString() const if(AttributeTraits<A>::hasStringConversion) { } typename AttributeTraits<A>::Type l_attrValue; bool l_read = tryGetAttr<A>(l_attrValue); - - //@TODO Remove assert once release has stabilized - TARG_ASSERT(l_read,"TARGETING::Target::getAttrAsString<0x%7x>: tryGetAttr returned false",A); + if (unlikely(!l_read)) + { + targAssert(GET_ATTR_AS_STRING, A); + } return attrToString<A>(l_attrValue); } |