From 10a93afdbdd5bccc9a10b797d66b008580ba16bb Mon Sep 17 00:00:00 2001 From: Mike Jones Date: Mon, 27 Jan 2014 15:33:09 -0600 Subject: 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 --- .../usr/ecmddatabuffer/ecmdDataBufferBase.H | 22 +- .../usr/ecmddatabuffer/prdfCompressBuffer.H | 658 +++++++++++---------- src/include/usr/errl/errlentry.H | 36 +- src/include/usr/errl/errlprvt.H | 8 +- src/include/usr/errl/hberrltypes.H | 8 +- src/include/usr/hwpf/fapi/fapiReturnCode.H | 17 +- src/include/usr/initservice/initsvcstructs.H | 16 +- src/include/usr/isteps/istep06list.H | 129 +--- src/include/usr/isteps/istep07list.H | 94 +-- src/include/usr/isteps/istep08list.H | 98 +-- src/include/usr/isteps/istep09list.H | 41 +- src/include/usr/isteps/istep10list.H | 127 +--- src/include/usr/isteps/istep11list.H | 173 ++---- src/include/usr/isteps/istep12list.H | 63 +- src/include/usr/isteps/istep13list.H | 110 +--- src/include/usr/isteps/istep14list.H | 106 +--- src/include/usr/isteps/istep15list.H | 49 +- src/include/usr/isteps/istep16list.H | 61 +- src/include/usr/isteps/istep18list.H | 130 +--- src/include/usr/isteps/istep21list.H | 48 +- src/include/usr/isteps/istepmasterlist.H | 4 +- src/include/usr/targeting/common/target.H | 103 ++-- src/usr/ecmddatabuffer/ecmdDataBufferBase.C | 102 +++- src/usr/errl/errlentry.C | 124 +++- src/usr/errl/errlprvt.C | 4 +- src/usr/errl/errlsctn.H | 49 +- src/usr/errl/errlsrc.C | 7 +- src/usr/errl/test/errltest.H | 2 - src/usr/hwas/common/deconfigGard.C | 26 +- src/usr/hwas/hostbootIstep.C | 100 +--- src/usr/hwas/hwasPlatDeconfigGard.C | 19 +- src/usr/hwpf/fapi/fapiReturnCode.C | 21 +- .../hwp/mvpd_accessors/accessMBvpdL4BankDelete.C | 5 +- .../hwp/mvpd_accessors/getMBvpdAddrMirrorData.C | 5 +- .../hwp/mvpd_accessors/getMBvpdDram2NModeEnabled.C | 5 +- .../hwp/mvpd_accessors/getMBvpdPhaseRotatorData.C | 5 +- .../hwpf/hwp/mvpd_accessors/getMBvpdSensorMap.C | 7 +- .../mvpd_accessors/getMBvpdSlopeInterceptData.C | 12 +- .../hwp/mvpd_accessors/getMBvpdSpareDramData.C | 5 +- src/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.C | 5 +- src/usr/hwpf/hwp/mvpd_accessors/getMBvpdVersion.C | 5 +- src/usr/hwpf/hwp/mvpd_accessors/mvpdRingFuncs.C | 11 +- src/usr/hwpf/hwp/mvpd_accessors/mvpd_errors.xml | 108 +++- src/usr/hwpf/hwp/proc_mvpd_attributes.xml | 39 -- src/usr/hwpf/makefile | 1 - src/usr/hwpf/plat/fapiPlatAttributeService.C | 44 +- src/usr/hwpf/plat/fapiPlatHwAccess.C | 13 +- src/usr/hwpf/plat/fapiPlatMBvpdAccess.C | 10 +- src/usr/hwpf/plat/fapiPlatMvpdAccess.C | 8 +- src/usr/hwpf/plat/fapiPlatSystemConfig.C | 93 ++- src/usr/hwpf/plat/fapiPlatUtil.C | 28 +- src/usr/hwpf/test/fapiRcTest.C | 12 +- src/usr/initservice/baseinitsvc/initservice.C | 51 +- src/usr/initservice/baseinitsvc/initservice.H | 16 - src/usr/initservice/extinitsvc/extinitsvc.C | 25 +- src/usr/initservice/extinitsvc/extinitsvctasks.H | 4 +- .../initservice/istepdispatcher/istepdispatcher.C | 8 +- .../initservice/istepdispatcher/istepdispatcher.H | 4 +- src/usr/initservice/istepdispatcher/sptask.C | 9 +- src/usr/initservice/test/initservicetest.H | 46 +- src/usr/targeting/attrrp.C | 25 +- src/usr/targeting/attrrp_common.C | 3 - src/usr/targeting/common/genHwsvMrwXml.pl | 3 - src/usr/targeting/common/target.C | 44 +- .../targeting/common/test/testcommontargeting.H | 69 +-- .../targeting/common/xmltohb/attribute_types.xml | 51 +- src/usr/targeting/common/xmltohb/common.mk | 3 +- src/usr/targeting/common/xmltohb/target_types.xml | 2 - src/usr/targeting/common/xmltohb/xmltohb.pl | 1 - 69 files changed, 1349 insertions(+), 1991 deletions(-) delete mode 100644 src/usr/hwpf/hwp/proc_mvpd_attributes.xml (limited to 'src') 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 #include - +//#include #ifdef ENABLE_MPATROL #include @@ -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 +#else #include +#endif #include #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 @@ -174,21 +174,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 * 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 // 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 - inline bool tryGetAttr( - typename AttributeTraits::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::readable) { } - if(AttributeTraits::notHbMutex) { } - if(AttributeTraits::notFspMutex) { } - return _tryGetAttr(A,sizeof(o_attrValue),&o_attrValue); - } + bool tryGetAttr(typename AttributeTraits::Type& o_attrValue) const; /** * @brief Get the target's specified attribute value @@ -201,15 +192,7 @@ class Target * @retval false Attribute not updated */ template - bool trySetAttr( - typename AttributeTraits::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::writeable) { } - if(AttributeTraits::notHbMutex) { } - return _trySetAttr(A,sizeof(i_attrValue),&i_attrValue); - } + bool trySetAttr(typename AttributeTraits::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 - 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 - void setAttr( - typename AttributeTraits::Type const& i_attrValue) - { - bool l_wrote = trySetAttr(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::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; @@ -589,17 +591,45 @@ class Target } PACKED; +template +bool Target::tryGetAttr(typename AttributeTraits::Type& o_attrValue) const +{ + if(AttributeTraits::readable) { } + if(AttributeTraits::notHbMutex) { } + if(AttributeTraits::notFspMutex) { } + return _tryGetAttr(A,sizeof(o_attrValue),&o_attrValue); +} + +template +bool Target::trySetAttr(typename AttributeTraits::Type const& i_attrValue) +{ + if(AttributeTraits::writeable) { } + if(AttributeTraits::notHbMutex) { } + return _trySetAttr(A,sizeof(i_attrValue),&i_attrValue); +} + template typename AttributeTraits::Type Target::getAttr() const { typename AttributeTraits::Type l_attrValue; bool l_read = tryGetAttr(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 +void Target::setAttr(typename AttributeTraits::Type const& i_attrValue) +{ + bool l_wrote = trySetAttr(i_attrValue); + if (unlikely(!l_wrote)) + { + targAssert(SET_ATTR, A); + } +} + template mutex_t* Target::getHbMutexAttr() const { @@ -637,9 +667,10 @@ const char* Target::getAttrAsString() const if(AttributeTraits::hasStringConversion) { } typename AttributeTraits::Type l_attrValue; bool l_read = tryGetAttr(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(l_attrValue); } diff --git a/src/usr/ecmddatabuffer/ecmdDataBufferBase.C b/src/usr/ecmddatabuffer/ecmdDataBufferBase.C index 7ef29de82..7be29ca6c 100644 --- a/src/usr/ecmddatabuffer/ecmdDataBufferBase.C +++ b/src/usr/ecmddatabuffer/ecmdDataBufferBase.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -20,35 +20,6 @@ /* Origin: 30 */ /* */ /* IBM_PROLOG_END_TAG */ -// IMPORTED FROM eCMD on 11/10/2011 - -// Copyright *********************************************************** -// -// File ecmdDataBufferBase.C -// -// IBM Confidential -// OCO Source Materials -// 9400 Licensed Internal Code -// (C) COPYRIGHT IBM CORP. 2002 -// -// 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. -// -// End Copyright ******************************************************* - -// Change Log ********************************************************* -// -// Flag Reason Vers Date Coder Description -// ---- -------- ---- -------- ----- ----------------------------- -// @01 STG4466 03/10/05 Prahl Fix up Beam errors -// End Change Log ***************************************************** - -// Get rid of some annoying lint errors that aren't real - cje -//lint -e613 Possible use of null pointer, lint doesn't understand we use iv_NumBits to check length and pointer validity -//lint -e668 Possible passing of a null pointer, same thing as above -//lint -e527 Lint doesn't understand that iv_UserOwned is changed in shareBuffer - //---------------------------------------------------------------------- // Includes //---------------------------------------------------------------------- @@ -56,6 +27,7 @@ #include #include #include +//#include #include #include @@ -1090,6 +1062,9 @@ uint32_t ecmdDataBufferBase::applyInversionMask(const ecmdDataBufferBase & i_inv uint32_t ecmdDataBufferBase::applyInversionMask(const uint32_t * i_invMask, uint32_t i_invByteLen) { + + ECMD_NULL_PTR_CHECK(i_invMask); + uint32_t rc = ECMD_DBUF_SUCCESS; /* Do the smaller of data provided or size of buffer */ @@ -1187,7 +1162,8 @@ uint32_t ecmdDataBufferBase::insert(const ecmdDataBufferBase &i_bufferIn, uint32 } uint32_t ecmdDataBufferBase::insert(const uint32_t * i_data, uint32_t i_targetStart, uint32_t i_len, uint32_t i_sourceStart) { - + ECMD_NULL_PTR_CHECK(i_data); + uint32_t rc = ECMD_DBUF_SUCCESS; if (i_targetStart+i_len > iv_NumBits) { @@ -1228,6 +1204,9 @@ uint32_t ecmdDataBufferBase::insert(uint32_t i_data, uint32_t i_targetStart, uin } uint32_t ecmdDataBufferBase::insertFromRight(const uint32_t * i_data, uint32_t i_start, uint32_t i_len) { + + ECMD_NULL_PTR_CHECK(i_data); + uint32_t rc = ECMD_DBUF_SUCCESS; int offset; @@ -1274,6 +1253,7 @@ uint32_t ecmdDataBufferBase::insertFromRight(uint32_t i_data, uint32_t i_start, } uint32_t ecmdDataBufferBase::insert(const uint16_t * i_data, uint32_t i_targetStart, uint32_t i_len, uint32_t i_sourceStart) { + ECMD_NULL_PTR_CHECK(i_data); uint32_t rc = ECMD_DBUF_SUCCESS; @@ -1323,6 +1303,9 @@ uint32_t ecmdDataBufferBase::insert(uint16_t i_data, uint32_t i_targetStart, uin } uint32_t ecmdDataBufferBase::insertFromRight(const uint16_t * i_data, uint32_t i_start, uint32_t i_len) { + + ECMD_NULL_PTR_CHECK(i_data); + uint32_t rc = ECMD_DBUF_SUCCESS; if (i_start+i_len > iv_NumBits) { @@ -1369,6 +1352,9 @@ uint32_t ecmdDataBufferBase::insertFromRight(uint16_t i_data, uint32_t i_start, } uint32_t ecmdDataBufferBase::insert(const uint8_t *i_data, uint32_t i_targetStart, uint32_t i_len, uint32_t i_sourceStart) { + + ECMD_NULL_PTR_CHECK(i_data); + uint32_t rc = ECMD_DBUF_SUCCESS; if (i_targetStart+i_len > iv_NumBits) { @@ -1412,6 +1398,9 @@ uint32_t ecmdDataBufferBase::insert(uint8_t i_data, uint32_t i_targetStart, uint } uint32_t ecmdDataBufferBase::insertFromRight(const uint8_t *i_data, uint32_t i_start, uint32_t i_len) { + + ECMD_NULL_PTR_CHECK(i_data); + uint32_t rc = ECMD_DBUF_SUCCESS; int offset; @@ -1482,6 +1471,9 @@ uint32_t ecmdDataBufferBase::extract(ecmdDataBufferBase& o_bufferOut, uint32_t i } uint32_t ecmdDataBufferBase::extract(uint32_t *o_data, uint32_t i_start, uint32_t i_len) const { + + ECMD_NULL_PTR_CHECK(o_data); + uint32_t rc = ECMD_DBUF_SUCCESS; // ecmdExtract can't make good input checks, so we have to do that here @@ -1507,6 +1499,9 @@ uint32_t ecmdDataBufferBase::extract(uint32_t *o_data, uint32_t i_start, uint32_ } uint32_t ecmdDataBufferBase::extract(uint16_t *o_data, uint32_t i_start, uint32_t i_len) const { + + ECMD_NULL_PTR_CHECK(o_data); + uint32_t rc = ECMD_DBUF_SUCCESS; // ecmdExtract can't make good input checks, so we have to do that here @@ -1541,6 +1536,9 @@ uint32_t ecmdDataBufferBase::extract(uint16_t *o_data, uint32_t i_start, uint32_ } uint32_t ecmdDataBufferBase::extract(uint8_t * o_data, uint32_t i_start, uint32_t i_bitLen) const { + + ECMD_NULL_PTR_CHECK(o_data); + uint32_t rc = ECMD_DBUF_SUCCESS; // Error checking @@ -1713,6 +1711,9 @@ uint32_t ecmdDataBufferBase::extractToRight(ecmdDataBufferBase & o_bufferOut, ui } uint32_t ecmdDataBufferBase::extractToRight(uint32_t * o_data, uint32_t i_start, uint32_t i_len) const { + + ECMD_NULL_PTR_CHECK(o_data); + uint32_t rc = ECMD_DBUF_SUCCESS; // input checks done in the extract function @@ -1724,6 +1725,9 @@ uint32_t ecmdDataBufferBase::extractToRight(uint32_t * o_data, uint32_t i_start, } uint32_t ecmdDataBufferBase::extractToRight(uint16_t * o_data, uint32_t i_start, uint32_t i_len) const { + + ECMD_NULL_PTR_CHECK(o_data); + uint32_t rc = ECMD_DBUF_SUCCESS; // input checks done in the extract function @@ -1737,6 +1741,9 @@ uint32_t ecmdDataBufferBase::extractToRight(uint16_t * o_data, uint32_t i_start, } uint32_t ecmdDataBufferBase::extractToRight(uint8_t * o_data, uint32_t i_start, uint32_t i_len) const { + + ECMD_NULL_PTR_CHECK(o_data); + uint32_t rc = ECMD_DBUF_SUCCESS; // input checks done in the extract function rc = this->extract(o_data, i_start, i_len); @@ -1782,6 +1789,9 @@ uint32_t ecmdDataBufferBase::setOr(const ecmdDataBufferBase& i_bufferIn, uint32_ } uint32_t ecmdDataBufferBase::setOr(const uint32_t * i_data, uint32_t i_startBit, uint32_t i_len) { + + ECMD_NULL_PTR_CHECK(i_data); + uint32_t rc = ECMD_DBUF_SUCCESS; if (i_startBit + i_len > iv_NumBits) { @@ -1820,6 +1830,9 @@ uint32_t ecmdDataBufferBase::setXor(const ecmdDataBufferBase& i_bufferIn, uint32 } uint32_t ecmdDataBufferBase::setXor(const uint32_t * i_data, uint32_t i_startBit, uint32_t i_len) { + + ECMD_NULL_PTR_CHECK(i_data); + uint32_t rc = ECMD_DBUF_SUCCESS; if (i_startBit + i_len > iv_NumBits) { @@ -1865,6 +1878,9 @@ uint32_t ecmdDataBufferBase::setAnd(const ecmdDataBufferBase& i_bufferIn, uint32 } uint32_t ecmdDataBufferBase::setAnd(const uint32_t * i_data, uint32_t i_startBit, uint32_t i_len) { + + ECMD_NULL_PTR_CHECK(i_data); + uint32_t rc = ECMD_DBUF_SUCCESS; if (i_startBit + i_len > iv_NumBits) { @@ -2006,6 +2022,9 @@ ecmdDataBufferBase& ecmdDataBufferBase::operator=(const ecmdDataBufferBase & i_m uint32_t ecmdDataBufferBase::memCopyIn(const uint32_t* i_buf, uint32_t i_bytes) { /* Does a memcpy from supplied buffer into ecmdDataBufferBase */ + + ECMD_NULL_PTR_CHECK(i_buf); + uint32_t rc = ECMD_DBUF_SUCCESS; uint32_t cbytes = i_bytes < getByteLength() ? i_bytes : getByteLength(); @@ -2028,6 +2047,9 @@ uint32_t ecmdDataBufferBase::memCopyIn(const uint32_t* i_buf, uint32_t i_bytes) } uint32_t ecmdDataBufferBase::memCopyOut(uint32_t* o_buf, uint32_t i_bytes) const { /* Does a memcpy from ecmdDataBufferBase into supplied buffer */ + + ECMD_NULL_PTR_CHECK(o_buf); + uint32_t rc = ECMD_DBUF_SUCCESS; uint32_t cbytes = i_bytes < getByteLength() ? i_bytes : getByteLength(); if (cbytes == 0) { @@ -2041,6 +2063,9 @@ uint32_t ecmdDataBufferBase::memCopyOut(uint32_t* o_buf, uint32_t i_bytes) const } uint32_t ecmdDataBufferBase::memCopyIn(const uint16_t* i_buf, uint32_t i_bytes) { /* Does a memcpy from supplied buffer into ecmdDataBufferBase */ + + ECMD_NULL_PTR_CHECK(i_buf); + uint32_t rc = ECMD_DBUF_SUCCESS; uint32_t cbytes = i_bytes < getByteLength() ? i_bytes : getByteLength(); uint32_t numHalfWords = (cbytes + 1) / 2; @@ -2057,6 +2082,9 @@ uint32_t ecmdDataBufferBase::memCopyIn(const uint16_t* i_buf, uint32_t i_bytes) } uint32_t ecmdDataBufferBase::memCopyOut(uint16_t* o_buf, uint32_t i_bytes) const { /* Does a memcpy from ecmdDataBufferBase into supplied buffer */ + + ECMD_NULL_PTR_CHECK(o_buf); + uint32_t rc = ECMD_DBUF_SUCCESS; uint32_t cbytes = i_bytes < getByteLength() ? i_bytes : getByteLength(); uint32_t numHalfWords = (cbytes + 1) / 2; @@ -2073,6 +2101,9 @@ uint32_t ecmdDataBufferBase::memCopyOut(uint16_t* o_buf, uint32_t i_bytes) const } uint32_t ecmdDataBufferBase::memCopyIn(const uint8_t* i_buf, uint32_t i_bytes) { /* Does a memcpy from supplied buffer into ecmdDataBufferBase */ + + ECMD_NULL_PTR_CHECK(i_buf); + uint32_t rc = ECMD_DBUF_SUCCESS; uint32_t cbytes = i_bytes < getByteLength() ? i_bytes : getByteLength(); if (cbytes == 0) { @@ -2088,6 +2119,9 @@ uint32_t ecmdDataBufferBase::memCopyIn(const uint8_t* i_buf, uint32_t i_bytes) { } uint32_t ecmdDataBufferBase::memCopyOut(uint8_t* o_buf, uint32_t i_bytes) const { /* Does a memcpy from supplied buffer into ecmdDataBufferBase */ + + ECMD_NULL_PTR_CHECK(o_buf); + uint32_t rc = ECMD_DBUF_SUCCESS; uint32_t cbytes = i_bytes < getByteLength() ? i_bytes : getByteLength(); if (cbytes == 0) { @@ -2103,6 +2137,9 @@ uint32_t ecmdDataBufferBase::memCopyOut(uint8_t* o_buf, uint32_t i_bytes) const } uint32_t ecmdDataBufferBase::flatten(uint8_t * o_data, uint32_t i_len) const { + + ECMD_NULL_PTR_CHECK(o_data); + uint32_t rc = ECMD_DBUF_SUCCESS; uint32_t * o_ptr = (uint32_t *) o_data; @@ -2124,6 +2161,9 @@ uint32_t ecmdDataBufferBase::flatten(uint8_t * o_data, uint32_t i_len) const { } uint32_t ecmdDataBufferBase::unflatten(const uint8_t * i_data, uint32_t i_len) { + + ECMD_NULL_PTR_CHECK(i_data); + uint32_t rc = ECMD_DBUF_SUCCESS; uint32_t newCapacity; diff --git a/src/usr/errl/errlentry.C b/src/usr/errl/errlentry.C index a03c17333..bbb9c93fb 100644 --- a/src/usr/errl/errlentry.C +++ b/src/usr/errl/errlentry.C @@ -57,7 +57,6 @@ struct epubProcToSub_t epubSubSystem_t xSubSys; }; - // Procedure to subsystem table. static const epubProcToSub_t PROCEDURE_TO_SUBSYS_TABLE[] = { @@ -100,6 +99,35 @@ static const epubTargetTypeToSub_t TARGET_TO_SUBSYS_TABLE[] = { TARGETING::TYPE_ABUS , EPUB_PROCESSOR_SUBSYS }, }; +struct epubBusTypeToSub_t +{ + HWAS::busTypeEnum xType; + epubSubSystem_t xSubSys; +}; +// Bus type to subsystem table +static const epubBusTypeToSub_t BUS_TO_SUBSYS_TABLE[] = +{ + { HWAS::FSI_BUS_TYPE , EPUB_CEC_HDW_CHIP_INTF }, + { HWAS::DMI_BUS_TYPE , EPUB_MEMORY_BUS }, + { HWAS::A_BUS_TYPE , EPUB_PROCESSOR_BUS_CTL }, + { HWAS::X_BUS_TYPE , EPUB_PROCESSOR_BUS_CTL }, + { HWAS::I2C_BUS_TYPE , EPUB_CEC_HDW_I2C_DEVS }, + { HWAS::PSI_BUS_TYPE , EPUB_CEC_HDW_SP_PHYP_INTF }, +}; + +struct epubClockTypeToSub_t +{ + HWAS::clockTypeEnum xType; + epubSubSystem_t xSubSys; +}; +// Clock type to subsystem table +static const epubClockTypeToSub_t CLOCK_TO_SUBSYS_TABLE[] = +{ + { HWAS::TODCLK_TYPE , EPUB_CEC_HDW_TOD_HDW }, + { HWAS::MEMCLK_TYPE , EPUB_CEC_HDW_CLK_CTL }, + { HWAS::OSCREFCLK_TYPE , EPUB_CEC_HDW_CLK_CTL }, + { HWAS::OSCPCICLK_TYPE , EPUB_CEC_HDW_CLK_CTL }, +}; namespace ERRORLOG { @@ -484,8 +512,8 @@ void ErrlEntry::addHbBuildId() // for use by ErrlManager void ErrlEntry::commit( compId_t i_committerComponent ) { - // TODO need a better timepiece, or else apply a transform onto timebase - // for an approximation of real time. + // TODO RTC 35258 need a better timepiece, or else apply a transform onto + // timebase for an approximation of real time. iv_Private.iv_committed = getTB(); // User header contains the component ID of the committer. @@ -589,18 +617,36 @@ void ErrlEntry::setSubSystemIdBasedOnCallouts() iv_User.setSubSys( EPUB_PROCESSOR_SUBSYS ); } } - else // ( pData->type == HWAS::PROCEDURE_CALLOUT ) + else if ( pData->type == HWAS::PROCEDURE_CALLOUT ) { // for procedures, map the procedure to a subsystem TRACFCOMP(g_trac_errl, INFO_MRK "mapping highest priority procedure 0x%x " "callout to determine SSID", pData->procedure); - iv_User.setSubSys(getSubSystem( pData->procedure)); } - - // $TODO RTC72950 need to add support for HWAS::BUS_CALLOUT also + else if ( pData->type == HWAS::BUS_CALLOUT ) + { + TRACFCOMP(g_trac_errl, INFO_MRK + "mapping highest priority bus 0x%x " + "callout to determine SSID", pData->busType); + iv_User.setSubSys(getSubSystem(pData->busType)); + } + else if ( pData->type == HWAS::CLOCK_CALLOUT ) + { + TRACFCOMP(g_trac_errl, INFO_MRK + "mapping highest priority clock 0x%x " + "callout to determine SSID", pData->clockType); + iv_User.setSubSys(getSubSystem(pData->clockType)); + } + else + { + TRACFCOMP(g_trac_errl, ERR_MRK + "Unknown callout type 0x%x, setting subsys to unknown", + pData->type); + iv_User.setSubSys(EPUB_UNKNOWN); + } } // add ssid to the SRC too, it is defined in the ErrlUH in FSP land // in hb code it has been defined in both places and is also used @@ -640,7 +686,7 @@ bool ErrlEntry::isTerminateLog() const /////////////////////////////////////////////////////////////////////////////// // Map the target type to correct subsystem ID using a binary search -epubSubSystem_t ErrlEntry::getSubSystem( TARGETING::TYPE i_target ) +epubSubSystem_t ErrlEntry::getSubSystem( TARGETING::TYPE i_target ) const { TRACDCOMP(g_trac_errl, ENTER_MRK"getSubSystem()" @@ -691,7 +737,7 @@ epubSubSystem_t ErrlEntry::getSubSystem( TARGETING::TYPE i_target ) /////////////////////////////////////////////////////////////////////////////// // Map the procedure type to correct subsystem ID using a binary search -epubSubSystem_t ErrlEntry::getSubSystem( epubProcedureID i_procedure ) +epubSubSystem_t ErrlEntry::getSubSystem( epubProcedureID i_procedure ) const { TRACDCOMP(g_trac_errl, ENTER_MRK"getSubSystem()" " from procedure 0x%x", i_procedure ); @@ -738,7 +784,67 @@ epubSubSystem_t ErrlEntry::getSubSystem( epubProcedureID i_procedure ) return (subsystem); } +/////////////////////////////////////////////////////////////////////////////// +// Map a bus type to a subsystem ID +epubSubSystem_t ErrlEntry::getSubSystem( HWAS::busTypeEnum i_busType ) const +{ + TRACDCOMP(g_trac_errl, ENTER_MRK"getSubSystem() from bus type 0x%x", + i_busType); + + epubSubSystem_t subsystem = EPUB_MISC_UNKNOWN; + + const uint32_t BUS_TO_SUBSYS_TABLE_ENTRIES = + sizeof(BUS_TO_SUBSYS_TABLE)/sizeof(BUS_TO_SUBSYS_TABLE[0]); + + for (uint32_t i = 0; i < BUS_TO_SUBSYS_TABLE_ENTRIES; i++) + { + if (BUS_TO_SUBSYS_TABLE[i].xType == i_busType) + { + subsystem = BUS_TO_SUBSYS_TABLE[i].xSubSys; + break; + } + } + + if(subsystem == EPUB_MISC_UNKNOWN) + { + TRACFCOMP(g_trac_errl,"WRN>> Failed to find subsystem ID for bus type 0x%x", + i_busType); + } + + TRACDCOMP(g_trac_errl, EXIT_MRK"getSubSystem() ssid 0x%x", subsystem); + return subsystem; +} + +/////////////////////////////////////////////////////////////////////////////// +// Map a clock type to a subsystem ID +epubSubSystem_t ErrlEntry::getSubSystem( HWAS::clockTypeEnum i_clockType ) const +{ + TRACDCOMP(g_trac_errl, ENTER_MRK"getSubSystem() from clock type 0x%x", + i_clockType); + epubSubSystem_t subsystem = EPUB_MISC_UNKNOWN; + + const uint32_t CLOCK_TO_SUBSYS_TABLE_ENTRIES = + sizeof(CLOCK_TO_SUBSYS_TABLE)/sizeof(CLOCK_TO_SUBSYS_TABLE[0]); + + for (uint32_t i = 0; i < CLOCK_TO_SUBSYS_TABLE_ENTRIES; i++) + { + if (CLOCK_TO_SUBSYS_TABLE[i].xType == i_clockType) + { + subsystem = CLOCK_TO_SUBSYS_TABLE[i].xSubSys; + break; + } + } + + if(subsystem == EPUB_MISC_UNKNOWN) + { + TRACFCOMP(g_trac_errl,"WRN>> Failed to find subsystem ID for clock type 0x%x", + i_clockType); + } + + TRACDCOMP(g_trac_errl, EXIT_MRK"getSubSystem() ssid 0x%x", subsystem); + return subsystem; +} /////////////////////////////////////////////////////////////////////////////// // for use by ErrlManager diff --git a/src/usr/errl/errlprvt.C b/src/usr/errl/errlprvt.C index f64301645..c4cb1bb4d 100644 --- a/src/usr/errl/errlprvt.C +++ b/src/usr/errl/errlprvt.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -66,7 +66,7 @@ ErrlPrvt::ErrlPrvt( compId_t i_CreatorCompId ) : iv_plid = iv_eid = ERRORLOG::theErrlManager::instance().getUniqueErrId(); // Set the time of creation. - // TODO The field iv_created and iv_committed expect an 8-byte + // TODO RTC 35258 The field iv_created and iv_committed expect an 8-byte // BCD-encoded timestamp. However, the FSP errl tool does not complain // about displaying the timebase value. Perhaps we can apply a transform // on time base to get an approximation of real time. diff --git a/src/usr/errl/errlsctn.H b/src/usr/errl/errlsctn.H index 67fa0f7c2..f3262473e 100644 --- a/src/usr/errl/errlsctn.H +++ b/src/usr/errl/errlsctn.H @@ -1,25 +1,25 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/usr/errl/errlsctn.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 +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/errl/errlsctn.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 */ #ifndef ERRLSCTN_H #define ERRLSCTN_H /** @@ -75,11 +75,6 @@ public: */ virtual ~ErrlSctn(); - //@todo - Need to add serialization interfaces for ErrlSctn object. - // Serialization method (boost serialization?) for HostBoot - // is currently not yet determined. - // Note: stream is currently not supported - /** * @brief Get section's version * diff --git a/src/usr/errl/errlsrc.C b/src/usr/errl/errlsrc.C index 10f5834d2..3a99ccd51 100644 --- a/src/usr/errl/errlsrc.C +++ b/src/usr/errl/errlsrc.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -125,9 +125,8 @@ uint64_t ErrlSrc::flatten( void * o_pBuffer, const uint64_t i_cbBuffer ) // psrc->flags = 0; // psrc->wordcount = ErrlSrc::WORDCOUNT; // 9; - // TODO FSP firmware puts zero here. Cheat and put reasonCode here. - // Makes for easier retrieval than teasing it out of the SRC - // ascii string. (Am I missing something?) + // Use reserved1 word to stash the reason code for easy extract in + // unflatten rather than parsing srcString psrc->reserved1 = iv_reasonCode; CPPASSERT( ErrlSrc::SLEN == sizeof(pelSRCSection_t)-iv_header.flatSize()); diff --git a/src/usr/errl/test/errltest.H b/src/usr/errl/test/errltest.H index d061355ae..cd1aaf2fa 100644 --- a/src/usr/errl/test/errltest.H +++ b/src/usr/errl/test/errltest.H @@ -195,8 +195,6 @@ public: // Normal buffer sizes are 0x800 (2048), so passing // something bigger is not expected to be an error. - // TODO: maybe after story "user selectable trace buffer sizes" - // TRAC_DEFAULT_BUFFER_SIZE (0x800) will be publicly available. fOK = l_err->collectTrace( "TARG" , 4003 ); if( !fOK ) { diff --git a/src/usr/hwas/common/deconfigGard.C b/src/usr/hwas/common/deconfigGard.C index fe51d0914..522ba02b6 100644 --- a/src/usr/hwas/common/deconfigGard.C +++ b/src/usr/hwas/common/deconfigGard.C @@ -40,24 +40,6 @@ // Trace definition #define __COMP_TD__ g_trac_deconf -// TODO The DeconfigGard code needs to trace a target. The current recommended -// way is to get the Target's PHYS_PATH attribute and do a binary trace. -// However, the size of a EntityPath is more than 16 bytes. This code -// will trace only the first 16 bytes (which in most cases is enough) to avoid a -// multi-line binary trace. This all seems a little convoluted. Is there a -// better way to trace a Target -#define DG_DBG_TARGET(string, pPath) \ - HWAS_DBG_BIN(string, pPath, sizeof(EntityPath) - 1) -#define DG_INF_TARGET(string, pPath) \ - HWAS_INF_BIN(string, pPath, sizeof(EntityPath) - 1) -#define DG_ERR_TARGET(string, pPath) \ - HWAS_ERR_BIN(string, pPath, sizeof(EntityPath) - 1) - -// TODO There are a number of error logs created in this file. Most of them -// should include the target identifier (PHYS_PATH). There is a plan in RTC -// story 4110 to provide a way to easily add a target to an error log. When that -// is done need to update the error logs - namespace HWAS { @@ -266,8 +248,10 @@ errlHndl_t DeconfigGard::deconfigureTargetsFromGardRecordsForIpl( { // could be a platform specific target for the other // ie, we are hostboot and this is an FSP target, or vice-versa - DG_INF_TARGET("Could not find Target for", - &(l_gardRecord.iv_targetId)); + // Binary trace the iv_targetId (EntityPath) + HWAS_INF_BIN("Could not find Target for:", + &(l_gardRecord.iv_targetId), + sizeof(l_gardRecord.iv_targetId)); continue; } @@ -1343,7 +1327,7 @@ void DeconfigGard::_deconfigureTarget(Target & i_target, //****************************************************************************** void DeconfigGard::_doDeconfigureActions(Target & i_target) { - // TODO + // Placeholder for any necessary deconfigure actions } //****************************************************************************** diff --git a/src/usr/hwas/hostbootIstep.C b/src/usr/hwas/hostbootIstep.C index c7b5bff79..15d587357 100644 --- a/src/usr/hwas/hostbootIstep.C +++ b/src/usr/hwas/hostbootIstep.C @@ -108,50 +108,30 @@ void* host_discover_targets( void *io_pArgs ) // Check whether we're in MPIPL mode TARGETING::Target* l_pTopLevel = NULL; targetService().getTopLevelTarget( l_pTopLevel ); + HWAS_ASSERT(l_pTopLevel, "HWAS host_discover_targets: no TopLevelTarget"); - if( l_pTopLevel == NULL ) + if (l_pTopLevel->getAttr()) { - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "Top level handle was NULL" ); - - /*@ - * @errortype - * @severity ERRORLOG::ERRL_SEV_UNRECOVERABLE - * @moduleid HWAS::MOD_HOST_DISCOVER_TARGETS - * @reasoncode HWAS::RC_TOP_LEVEL_TARGET_NULL - * @devdesc Call to get top level targeting handle - * returned NULL - */ - errl = hwasError( ERRORLOG::ERRL_SEV_UNRECOVERABLE, - HWAS::MOD_HOST_DISCOVER_TARGETS, - HWAS::RC_TOP_LEVEL_TARGET_NULL ); + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "MPIPL mode"); + + // Sync attributes from Fsp + errl = syncAllAttributesFromFsp(); } else { - if (l_pTopLevel->getAttr()) - { - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "MPIPL mode"); + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "Normal IPL mode"); - // Sync attributes from Fsp - errl = syncAllAttributesFromFsp(); + errl = discoverTargets(); - } - else + // also if SP doesn't support change detection, call + // function to do it here. + if (!errl && + !l_pTopLevel->getAttr() + .hardwareChangeDetection) { - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "Normal IPL mode"); - - errl = discoverTargets(); - - // also if SP doesn't support change detection, call - // function to do it here. - if (!errl && - !l_pTopLevel->getAttr() - .hardwareChangeDetection) - { - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, - "calling hwasChangeDetection"); - errl = hwasChangeDetection(); - } + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "calling hwasChangeDetection"); + errl = hwasChangeDetection(); } } @@ -173,47 +153,27 @@ void* host_gard( void *io_pArgs ) // Check whether we're in MPIPL mode TARGETING::Target* l_pTopLevel = NULL; targetService().getTopLevelTarget( l_pTopLevel ); + HWAS_ASSERT(l_pTopLevel, "HWAS host_gard: no TopLevelTarget"); - if( l_pTopLevel == NULL ) + if (l_pTopLevel->getAttr()) { - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "Top level handle was NULL" ); - - /*@ - * @errortype - * @severity ERRORLOG::ERRL_SEV_UNRECOVERABLE - * @moduleid HWAS::MOD_HOST_GARD - * @reasoncode HWAS::RC_TOP_LEVEL_TARGET_NULL - * @devdesc Call to get top level targeting handle - * returned NULL - */ - errl = hwasError( ERRORLOG::ERRL_SEV_UNRECOVERABLE, - HWAS::MOD_HOST_GARD, - HWAS::RC_TOP_LEVEL_TARGET_NULL ); + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "MPIPL mode"); + + // we only want EX units to be processed + TARGETING::PredicateCTM l_exFilter(TARGETING::CLASS_UNIT, + TARGETING::TYPE_EX); + errl = collectGard(&l_exFilter); } else { - if (l_pTopLevel->getAttr()) - { - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "MPIPL mode"); - - // we only want EX units to be processed - TARGETING::PredicateCTM l_exFilter(TARGETING::CLASS_UNIT, - TARGETING::TYPE_EX); - errl = collectGard(&l_exFilter); - } - else - { - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "Normal IPL mode"); + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "Normal IPL mode"); - errl = collectGard(); + errl = collectGard(); - // if no error, - if (errl == NULL) - { - // check and see if we still have enough hardware to continue - errl = checkMinimumHardware(); - } + if (errl == NULL) + { + // check and see if we still have enough hardware to continue + errl = checkMinimumHardware(); } // If targets are deconfigured as a result of host_gard, they are // done so using the PLID as the reason for deconfiguration. This diff --git a/src/usr/hwas/hwasPlatDeconfigGard.C b/src/usr/hwas/hwasPlatDeconfigGard.C index 551373a15..99c679bbb 100644 --- a/src/usr/hwas/hwasPlatDeconfigGard.C +++ b/src/usr/hwas/hwasPlatDeconfigGard.C @@ -213,12 +213,12 @@ errlHndl_t DeconfigGard::platCreateGardRecord( (static_cast(get_huid(i_pTarget)) << 32) | i_errlEid; const uint64_t userdata2 = (static_cast(lDeconfigGardable) << 32) | lPresent; - l_pErr = hwasError( - ERRL_SEV_UNRECOVERABLE, + const bool hbSwError = true; + l_pErr = new ERRORLOG::ErrlEntry( + ERRORLOG::ERRL_SEV_UNRECOVERABLE, HWAS::MOD_PLAT_DECONFIG_GARD, HWAS::RC_TARGET_NOT_GARDABLE, - userdata1, - userdata2); + userdata1, userdata2, hbSwError); break; } @@ -308,6 +308,13 @@ errlHndl_t DeconfigGard::platCreateGardRecord( { HWAS_ERR("GARD Record Repository full"); + // TODO RTC 96397 + // Hostboot will only write GARD Records to PNOR when it is the + // gardRecordMaster. An error will be logged if GARD Record storage + // exceeds 90% and the GARD Record will not be written if full. The + // error will have a new procedure callout requesting that the + // machine be serviced. Right now, this error log has no callouts. + /*@ * @errortype * @moduleid HWAS::MOD_PLAT_DECONFIG_GARD @@ -319,8 +326,8 @@ errlHndl_t DeconfigGard::platCreateGardRecord( const uint64_t userdata1 = (static_cast (get_huid(i_pTarget)) << 32) | i_errlEid; - l_pErr = hwasError( - ERRL_SEV_UNRECOVERABLE, + l_pErr = new ERRORLOG::ErrlEntry( + ERRORLOG::ERRL_SEV_UNRECOVERABLE, HWAS::MOD_PLAT_DECONFIG_GARD, HWAS::RC_GARD_REPOSITORY_FULL, userdata1); diff --git a/src/usr/hwpf/fapi/fapiReturnCode.C b/src/usr/hwpf/fapi/fapiReturnCode.C index 0b5312379..a40f02b9f 100644 --- a/src/usr/hwpf/fapi/fapiReturnCode.C +++ b/src/usr/hwpf/fapi/fapiReturnCode.C @@ -46,6 +46,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 * mjjones 05/02/2012 Only trace setEcmdError on err * mjjones 07/11/2012 Remove a trace * brianh 07/31/2012 performance/size optimizations @@ -62,6 +63,7 @@ #include #include #include +#include namespace fapi { @@ -126,19 +128,6 @@ ReturnCode & ReturnCode::operator=(const ReturnCode & i_right) return *this; } -//****************************************************************************** -// Assignment Operator -//****************************************************************************** -ReturnCode & ReturnCode::operator=(const uint32_t i_rcValue) -{ - iv_rcValue = i_rcValue; - - // Forget about any associated data - forgetData(); - - return *this; -} - //****************************************************************************** // setFapiError function //****************************************************************************** @@ -149,6 +138,9 @@ void ReturnCode::setFapiError(const ReturnCodes i_rcValue) // Forget about any associated data (this is a new error) forgetData(); + + // Errors generated by FAPI code are a small set, all are firmware issues + addEIProcedureCallout(ProcedureCallouts::CODE, CalloutPriorities::HIGH); } //****************************************************************************** @@ -167,6 +159,9 @@ void ReturnCode::setEcmdError(const uint32_t i_rcValue) // Forget about any associated data (this is a new error) forgetData(); + + // Callout firmware + addEIProcedureCallout(ProcedureCallouts::CODE, CalloutPriorities::HIGH); } //****************************************************************************** diff --git a/src/usr/hwpf/hwp/mvpd_accessors/accessMBvpdL4BankDelete.C b/src/usr/hwpf/hwp/mvpd_accessors/accessMBvpdL4BankDelete.C index cb2ade3ee..f7da89caa 100644 --- a/src/usr/hwpf/hwp/mvpd_accessors/accessMBvpdL4BankDelete.C +++ b/src/usr/hwpf/hwp/mvpd_accessors/accessMBvpdL4BankDelete.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* COPYRIGHT International Business Machines Corp. 2013,2014 */ /* */ /* p1 */ /* */ @@ -20,7 +20,7 @@ /* Origin: 30 */ /* */ /* IBM_PROLOG_END_TAG */ -// $Id: accessMBvpdL4BankDelete.C,v 1.2 2013/11/21 17:17:59 whs Exp $ +// $Id: accessMBvpdL4BankDelete.C,v 1.3 2014/02/12 22:11:26 mjjones Exp $ /** * @file accessMBvpdL4BankDelete.C * @@ -74,6 +74,7 @@ fapi::ReturnCode accessMBvpdL4BankDelete( l_bufSize, sizeof(l_l4BankDelete)); const uint32_t & KEYWORD = sizeof(l_l4BankDelete); const uint32_t & RETURNED_SIZE = l_bufSize; + const fapi::Target & CHIP_TARGET = i_mbTarget; FAPI_SET_HWP_ERROR(l_fapirc,RC_MBVPD_INSUFFICIENT_VPD_RETURNED); break; // break out with fapirc } diff --git a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdAddrMirrorData.C b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdAddrMirrorData.C index 6d4d3b2cd..571692f69 100644 --- a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdAddrMirrorData.C +++ b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdAddrMirrorData.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* COPYRIGHT International Business Machines Corp. 2013,2014 */ /* */ /* p1 */ /* */ @@ -20,7 +20,7 @@ /* Origin: 30 */ /* */ /* IBM_PROLOG_END_TAG */ -// $Id: getMBvpdAddrMirrorData.C,v 1.2 2013/07/18 15:33:35 whs Exp $ +// $Id: getMBvpdAddrMirrorData.C,v 1.4 2014/02/12 22:11:32 mjjones Exp $ /** * @file getMBvpdAddrMirrorData.C * @@ -116,6 +116,7 @@ fapi::ReturnCode getMBvpdAddrMirrorData( l_MaBufsize, AM_KEYWORD_SIZE); const uint32_t & KEYWORD = fapi::MBVPD_KEYWORD_AM; const uint32_t & RETURNED_SIZE = l_MaBufsize; + const fapi::Target & CHIP_TARGET = l_mbTarget; FAPI_SET_HWP_ERROR(l_fapirc, RC_MBVPD_INSUFFICIENT_VPD_RETURNED ); break; // break out with fapirc } diff --git a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdDram2NModeEnabled.C b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdDram2NModeEnabled.C index b5140e2e0..0386bb203 100644 --- a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdDram2NModeEnabled.C +++ b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdDram2NModeEnabled.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* COPYRIGHT International Business Machines Corp. 2013,2014 */ /* */ /* p1 */ /* */ @@ -20,7 +20,7 @@ /* Origin: 30 */ /* */ /* IBM_PROLOG_END_TAG */ -// $Id: getMBvpdDram2NModeEnabled.C,v 1.2 2013/10/31 18:06:17 whs Exp $ +// $Id: getMBvpdDram2NModeEnabled.C,v 1.3 2014/02/12 22:11:39 mjjones Exp $ /** * @file getMBvpdDram2NModeEnabled.C * @@ -69,6 +69,7 @@ fapi::ReturnCode getMBvpdDram2NModeEnabled( l_dram2NMode[0],l_dram2NMode[1]); const uint32_t & PORT0 = l_dram2NMode[0]; const uint32_t & PORT1 = l_dram2NMode[1]; + const fapi::Target & MBA_TARGET = i_mbaTarget; FAPI_SET_HWP_ERROR(l_fapirc,RC_MBVPD_DRAM_2N_MODE_NOT_EQUAL); break; // break out with fapirc } diff --git a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdPhaseRotatorData.C b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdPhaseRotatorData.C index 34cbbe774..d7d26700c 100644 --- a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdPhaseRotatorData.C +++ b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdPhaseRotatorData.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ +/* COPYRIGHT International Business Machines Corp. 2013,2014 */ /* */ /* p1 */ /* */ @@ -20,7 +20,7 @@ /* Origin: 30 */ /* */ /* IBM_PROLOG_END_TAG */ -// $Id: getMBvpdPhaseRotatorData.C,v 1.7 2014/01/11 13:35:43 whs Exp $ +// $Id: getMBvpdPhaseRotatorData.C,v 1.8 2014/02/12 22:11:46 mjjones Exp $ /** * @file getMBvpdPhaseRotatorData.C * @@ -163,6 +163,7 @@ fapi::ReturnCode getMBvpdPhaseRotatorData( l_MrBufsize, MR_KEYWORD_SIZE); const uint32_t & KEYWORD = fapi::MBVPD_KEYWORD_MR; const uint32_t & RETURNED_SIZE = l_MrBufsize; + const fapi::Target & CHIP_TARGET = l_mbTarget; FAPI_SET_HWP_ERROR(l_fapirc, RC_MBVPD_INSUFFICIENT_VPD_RETURNED ); break; // break out with fapirc } diff --git a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdSensorMap.C b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdSensorMap.C index 37d20d311..a455b0970 100644 --- a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdSensorMap.C +++ b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdSensorMap.C @@ -1,11 +1,11 @@ /* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ -/* $Source: src/usr/hwpf/hwp/mvpd_accessors/getMBvpdSensorMap.C $ */ +/* $Source: src/usr/hwpf/hwp/mvpd_accessors/getMBvpdSensorMap.C $ */ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* COPYRIGHT International Business Machines Corp. 2013,2014 */ /* */ /* p1 */ /* */ @@ -20,7 +20,7 @@ /* Origin: 30 */ /* */ /* IBM_PROLOG_END_TAG */ -// $Id: getMBvpdSensorMap.C,v 1.1 2013/11/20 22:37:38 whs Exp $ +// $Id: getMBvpdSensorMap.C,v 1.2 2014/02/12 22:11:52 mjjones Exp $ /** * @file getMBvpdSensorMap.C @@ -92,6 +92,7 @@ fapi::ReturnCode getMBvpdSensorMap( l_MwBufsize, MW_KEYWORD_SIZE); const uint32_t & KEYWORD = fapi::MBVPD_KEYWORD_MW; const uint32_t & RETURNED_SIZE = l_MwBufsize; + const fapi::Target & CHIP_TARGET = i_mbTarget; FAPI_SET_HWP_ERROR(l_fapirc, RC_MBVPD_INSUFFICIENT_VPD_RETURNED ); break; // break out with fapirc } diff --git a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdSlopeInterceptData.C b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdSlopeInterceptData.C index f2b2e06ef..bd30909ed 100644 --- a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdSlopeInterceptData.C +++ b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdSlopeInterceptData.C @@ -1,11 +1,11 @@ /* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ -/* $Source: src/usr/hwpf/hwp/mvpd_accessors/getMBvpdSlopeInterceptData.C $ */ +/* $Source: src/usr/hwpf/hwp/mvpd_accessors/getMBvpdSlopeInterceptData.C $ */ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* COPYRIGHT International Business Machines Corp. 2013,2014 */ /* */ /* p1 */ /* */ @@ -20,7 +20,7 @@ /* Origin: 30 */ /* */ /* IBM_PROLOG_END_TAG */ -// $Id: getMBvpdSlopeInterceptData.C,v 1.3 2013/11/22 22:14:11 whs Exp $ +// $Id: getMBvpdSlopeInterceptData.C,v 1.4 2014/02/12 22:12:00 mjjones Exp $ /** * @file getMBvpdSlopeInterceptData.C * @@ -148,6 +148,7 @@ fapi::ReturnCode getMBvpdMasterData( l_MwBufsize, MW_KEYWORD_SIZE); const uint32_t & KEYWORD = fapi::MBVPD_KEYWORD_MW; const uint32_t & RETURNED_SIZE = l_MwBufsize; + const fapi::Target & CHIP_TARGET = i_mbTarget; FAPI_SET_HWP_ERROR(l_fapirc, RC_MBVPD_INSUFFICIENT_VPD_RETURNED ); break; // break out with fapirc } @@ -281,6 +282,7 @@ fapi::ReturnCode getMBvpdSupplierData( l_pdIBufsize, PDI_DDR3_KEYWORD_SIZE); const uint32_t & KEYWORD = fapi::MBVPD_KEYWORD_PDI; const uint32_t & RETURNED_SIZE = l_pdIBufsize; + const fapi::Target & CHIP_TARGET = i_mbTarget; FAPI_SET_HWP_ERROR(l_fapirc,RC_MBVPD_INSUFFICIENT_VPD_RETURNED); break; // break out with fapirc } @@ -299,6 +301,7 @@ fapi::ReturnCode getMBvpdSupplierData( l_pdIBufsize, PDI_DDR4_KEYWORD_SIZE); const uint32_t & KEYWORD = fapi::MBVPD_KEYWORD_PDI; const uint32_t & RETURNED_SIZE = l_pdIBufsize; + const fapi::Target & CHIP_TARGET = i_mbTarget; FAPI_SET_HWP_ERROR(l_fapirc,RC_MBVPD_INSUFFICIENT_VPD_RETURNED); break; // break out with fapirc } @@ -312,6 +315,7 @@ fapi::ReturnCode getMBvpdSupplierData( FAPI_ERR("getMBvpdSupplierData:" " unexpected memory type in #I"); const uint8_t & MEM_TYPE = l_pPdIBuffer->pdI.common.mem_type; + const fapi::Target & MEMBUF_TARGET = i_mbTarget; FAPI_SET_HWP_ERROR(l_fapirc,RC_MBVPD_UNEXPECTED_MEM_TYPE); break; // break out with fapirc } @@ -360,6 +364,7 @@ fapi::ReturnCode getMBvpdSupplierData( l_mvBufsize, l_offset); const uint32_t & KEYWORD = fapi::MBVPD_KEYWORD_MV; const uint32_t & RETURNED_SIZE = l_mvBufsize; + const fapi::Target & CHIP_TARGET = i_mbTarget; FAPI_SET_HWP_ERROR(l_fapirc, RC_MBVPD_INSUFFICIENT_VPD_RETURNED ); break; // break out with fapirc } @@ -436,6 +441,7 @@ fapi::ReturnCode getMBvpdSupplierData( " supplier ID not found 0x%04x", l_moduleID_LSB+(l_moduleID_MSB<<8)); const uint32_t & MODULE_ID = l_moduleID_LSB+(l_moduleID_MSB<<8); + const fapi::Target & MEMBUF_TARGET = i_mbTarget; FAPI_SET_HWP_ERROR(l_fapirc, RC_MBVPD_SUPPLIER_ID_NOT_IN_MV_VPD ); } diff --git a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdSpareDramData.C b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdSpareDramData.C index 10639e9ca..b604cb24d 100644 --- a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdSpareDramData.C +++ b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdSpareDramData.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2013 */ +/* COPYRIGHT International Business Machines Corp. 2013,2014 */ /* */ /* p1 */ /* */ @@ -20,7 +20,7 @@ /* Origin: 30 */ /* */ /* IBM_PROLOG_END_TAG */ -// $Id: getMBvpdSpareDramData.C,v 1.4 2013/10/03 20:40:52 dedahle Exp $ +// $Id: getMBvpdSpareDramData.C,v 1.5 2014/02/12 22:14:28 mjjones Exp $ #include // fapi support @@ -108,6 +108,7 @@ fapi::ReturnCode getMBvpdSpareDramData(const fapi::Target &i_mba, l_AmBufSize, AM_KEYWORD_SIZE); const uint32_t & KEYWORD = fapi::MBVPD_KEYWORD_AM; const uint32_t & RETURNED_SIZE = l_AmBufSize; + const fapi::Target & CHIP_TARGET = l_mbTarget; FAPI_SET_HWP_ERROR(l_rc, RC_MBVPD_INSUFFICIENT_VPD_RETURNED ); break; } diff --git a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.C b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.C index c5e612eab..534814b67 100644 --- a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.C +++ b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ +/* COPYRIGHT International Business Machines Corp. 2013,2014 */ /* */ /* p1 */ /* */ @@ -20,7 +20,7 @@ /* Origin: 30 */ /* */ /* IBM_PROLOG_END_TAG */ -// $Id: getMBvpdTermData.C,v 1.8 2014/02/10 19:57:04 whs Exp $ +// $Id: getMBvpdTermData.C,v 1.9 2014/02/12 22:14:37 mjjones Exp $ /** * @file getMBvpdTermData.C * @@ -332,6 +332,7 @@ fapi::ReturnCode getMBvpdTermData( l_MtBufsize, MT_KEYWORD_SIZE); const uint32_t & KEYWORD = fapi::MBVPD_KEYWORD_MT; const uint32_t & RETURNED_SIZE = l_MtBufsize; + const fapi::Target & CHIP_TARGET = l_mbTarget; FAPI_SET_HWP_ERROR(l_fapirc, RC_MBVPD_INSUFFICIENT_VPD_RETURNED ); break; // break out with fapirc } diff --git a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdVersion.C b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdVersion.C index 55f17291a..81090d931 100644 --- a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdVersion.C +++ b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdVersion.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* COPYRIGHT International Business Machines Corp. 2013,2014 */ /* */ /* p1 */ /* */ @@ -20,7 +20,7 @@ /* Origin: 30 */ /* */ /* IBM_PROLOG_END_TAG */ -// $Id: getMBvpdVersion.C,v 1.1 2013/10/30 21:07:58 whs Exp $ +// $Id: getMBvpdVersion.C,v 1.2 2014/02/12 22:14:44 mjjones Exp $ /** * @file getMBvpdVersion.C * @@ -81,6 +81,7 @@ fapi::ReturnCode getMBvpdVersion( l_bufSize, sizeof(l_vpdVersion)); const uint32_t & KEYWORD = sizeof(l_vpdVersion); const uint32_t & RETURNED_SIZE = l_bufSize; + const fapi::Target & CHIP_TARGET = l_mbTarget; FAPI_SET_HWP_ERROR(l_fapirc,RC_MBVPD_INSUFFICIENT_VPD_RETURNED); break; // break out with fapirc } diff --git a/src/usr/hwpf/hwp/mvpd_accessors/mvpdRingFuncs.C b/src/usr/hwpf/hwp/mvpd_accessors/mvpdRingFuncs.C index 80e675212..a5106a6b3 100644 --- a/src/usr/hwpf/hwp/mvpd_accessors/mvpdRingFuncs.C +++ b/src/usr/hwpf/hwp/mvpd_accessors/mvpdRingFuncs.C @@ -20,7 +20,7 @@ /* Origin: 30 */ /* */ /* IBM_PROLOG_END_TAG */ -// $Id: mvpdRingFuncs.C,v 1.8 2014/01/26 12:57:15 whs Exp $ +// $Id: mvpdRingFuncs.C,v 1.9 2014/02/12 22:14:51 mjjones Exp $ /** * @file mvpdRingFuncs.C * @@ -268,6 +268,7 @@ fapi::ReturnCode mvpdRingFunc( const mvpdRingFuncOp i_mvpdRingFuncOp, { const uint8_t & RING_MODIFIER = i_ringId; const uint8_t & CHIPLET_ID = i_chipletId; + const fapi::Target & CHIP_TARGET = i_fapiTarget; FAPI_SET_HWP_ERROR(l_fapirc, RC_REPAIR_RING_NOT_FOUND ); // break out with fapirc break; @@ -422,6 +423,7 @@ fapi::ReturnCode mbvpdRingFunc( const mbvpdRingFuncOp i_mbvpdRingFuncOp, { const uint8_t & RING_MODIFIER = i_ringId; const uint8_t & CHIPLET_ID = i_chipletId; + const fapi::Target & CHIP_TARGET = i_fapiTarget; FAPI_SET_HWP_ERROR(l_fapirc, RC_REPAIR_RING_NOT_FOUND ); // break out with fapirc break; @@ -519,13 +521,6 @@ fapi::ReturnCode mvpdRingFuncFind( const uint8_t i_chipletId, FAPI_DBG("mvpdRingFuncFind:Header 0x%x offset 0x%x,end of list", FAPI_BE32TOH(l_pScanData->iv_magic), l_offset ); - // TODO: RTC 51917 how to tell the end of the list? Assume that - // finding a header without RS4_MAGIC is the end. - // keep the following incase there is a different way to find - // the end. - // $$const uint32_t &MAGIC = l_pScanData->magic; - // $$FAPI_SET_HWP_ERROR(l_fapirc,RC_REPAIR_RING_INVALID_MAGIC ); - // break out of scan loop, ring not found break; } // dump record info for debug diff --git a/src/usr/hwpf/hwp/mvpd_accessors/mvpd_errors.xml b/src/usr/hwpf/hwp/mvpd_accessors/mvpd_errors.xml index b827400b9..e78170b28 100644 --- a/src/usr/hwpf/hwp/mvpd_accessors/mvpd_errors.xml +++ b/src/usr/hwpf/hwp/mvpd_accessors/mvpd_errors.xml @@ -5,7 +5,7 @@ - + @@ -20,7 +20,7 @@ - + @@ -28,6 +28,10 @@ Invalid input parameter: pointer to ringbuffer was NULL + + CODE + HIGH + @@ -35,14 +39,10 @@ Failed to allocate buffer space for repair ring data - - - - RC_REPAIR_RING_INVALID_MAGIC - - Failed to allocate buffer space for repair ring data - - MAGIC + + CODE + HIGH + @@ -50,15 +50,27 @@ Invalid input parameter: buffer too small to copy repair ring data + + CODE + HIGH + RC_REPAIR_RING_NOT_FOUND The repair ring specified was not found. + Most likely reason is bad VPD RING_MODIFIER CHIPLET_ID + + CHIP_TARGET + HIGH + + + CHIP_TARGET + @@ -66,6 +78,10 @@ An invalid parameter was passed to a mvpd ring function. + + CODE + HIGH + @@ -73,6 +89,10 @@ Insufficient room in the record to set the requested ring. + + CODE + HIGH + @@ -81,6 +101,10 @@ VPD Field size too small to contain the EX_L2_SINGLE_MEMBER_ENABLE data FIELD_SIZE + + CODE + HIGH + @@ -89,6 +113,10 @@ Invalid attribute ID ATTR_ID + + CODE + HIGH + @@ -98,23 +126,47 @@ EXPECTED_SIZE PASSED_SIZE + + CODE + HIGH + RC_MBVPD_INSUFFICIENT_VPD_RETURNED VPD keyword record returned is smaller than expected. + Probably a firmware bug, but could be bad VPD KEYWORD RETURNED_SIZE + + CODE + HIGH + + + CHIP_TARGET + MEDIUM + RC_MBVPD_SUPPLIER_ID_NOT_IN_MV_VPD The Module ID in the #I keyword is not in the list of supplier provided entries in the MV keyword. + Bad C-DIMM VPD. MODULE_ID + + MEMBUF_TARGET + HIGH + + + MEMBUF_TARGET + + + MEMBUF_TARGET + @@ -122,6 +174,10 @@ An invalid parameter was passed to a mbvpd ring function. + + CODE + HIGH + @@ -131,15 +187,30 @@ ATTR_ID VPD_VALUE + + CODE + HIGH + RC_MBVPD_DRAM_2N_MODE_NOT_EQUAL - The 2 ports of DRAM 2N MODE should be equal. + The 2 ports of DRAM 2N MODE should be equal in VPD. + Bad C-DIMM VPD. PORT0 PORT1 + + MBA_TARGET + HIGH + + + MBA_TARGET + + + MBA_TARGET + @@ -148,13 +219,28 @@ Mode must be Get or Set. MODE + + CODE + HIGH + RC_MBVPD_UNEXPECTED_MEM_TYPE Memory type in VSPD keyword #I not DDR3 or DDR4 + Unsupported C-DIMM VPD. MEM_TYPE + + MEMBUF_TARGET + HIGH + + + MEMBUF_TARGET + + + MEMBUF_TARGET + diff --git a/src/usr/hwpf/hwp/proc_mvpd_attributes.xml b/src/usr/hwpf/hwp/proc_mvpd_attributes.xml deleted file mode 100644 index e72ef8f34..000000000 --- a/src/usr/hwpf/hwp/proc_mvpd_attributes.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - ATTR_MVPD_FREQ_CORE_NOMINAL - TARGET_TYPE_PROC_CHIP - - The nominal frequency of the processor cores in MHz. - - uint32 - - - diff --git a/src/usr/hwpf/makefile b/src/usr/hwpf/makefile index 46ecd874c..44573ab92 100644 --- a/src/usr/hwpf/makefile +++ b/src/usr/hwpf/makefile @@ -145,7 +145,6 @@ HWP_ATTR_XML_FILES = hwp/memory_attributes.xml \ hwp/dimm_attributes.xml \ hwp/unit_attributes.xml \ hwp/freq_attributes.xml \ - hwp/proc_mvpd_attributes.xml \ hwp/ei_bus_attributes.xml \ hwp/chip_ec_attributes.xml \ hwp/centaur_ec_attributes.xml \ diff --git a/src/usr/hwpf/plat/fapiPlatAttributeService.C b/src/usr/hwpf/plat/fapiPlatAttributeService.C index 7c90557d8..ef6c493d6 100644 --- a/src/usr/hwpf/plat/fapiPlatAttributeService.C +++ b/src/usr/hwpf/plat/fapiPlatAttributeService.C @@ -102,10 +102,12 @@ fapi::ReturnCode getTargetingTarget( * @reasoncode RC_EMBEDDED_NULL_TARGET_PTR * @devdesc NULL TARG Target passed to attribute access macro */ + const bool hbSwError = true; errlHndl_t l_pError = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_INFORMATIONAL, MOD_ATTR_GET_TARGETING_TARGET, - RC_EMBEDDED_NULL_TARGET_PTR); + RC_EMBEDDED_NULL_TARGET_PTR, + 0, 0, hbSwError); l_rc.setPlatError(reinterpret_cast (l_pError)); } else if (i_expectedType != TARGETING::TYPE_NA) @@ -126,11 +128,12 @@ fapi::ReturnCode getTargetingTarget( * @devdesc Unexpected Target Type passed to attribute access * macro */ + const bool hbSwError = true; errlHndl_t l_pError = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_INFORMATIONAL, MOD_ATTR_GET_TARGETING_TARGET, RC_UNEXPECTED_TARGET_TYPE, - l_type, i_expectedType); + l_type, i_expectedType, hbSwError); l_rc.setPlatError(reinterpret_cast (l_pError)); } } @@ -178,13 +181,14 @@ fapi::ReturnCode getTargetingAttr(const fapi::Target * i_pFapiTarget, * attribute not present on given target, target service * not initialized */ + const bool hbSwError = true; errlHndl_t l_pError = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_INFORMATIONAL, MOD_PLAT_ATTR_SVC_GET_TARG_ATTR, RC_FAILED_TO_ACCESS_ATTRIBUTE, i_targAttrId, - i_pFapiTarget ? i_pFapiTarget->getType(): NULL); - + i_pFapiTarget ? i_pFapiTarget->getType(): NULL, + hbSwError); l_rc.setPlatError(reinterpret_cast(l_pError)); } } @@ -232,13 +236,14 @@ fapi::ReturnCode setTargetingAttr(const fapi::Target * i_pFapiTarget, * attribute not present on given target, target service * not initialized */ + const bool hbSwError = true; errlHndl_t l_pError = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_INFORMATIONAL, MOD_PLAT_ATTR_SVC_SET_TARG_ATTR, RC_FAILED_TO_ACCESS_ATTRIBUTE, i_targAttrId, - i_pFapiTarget ? i_pFapiTarget->getType(): NULL); - + i_pFapiTarget ? i_pFapiTarget->getType(): NULL, + hbSwError); l_rc.setPlatError(reinterpret_cast(l_pError)); } } @@ -417,13 +422,16 @@ fapi::ReturnCode fapiPlatGetTargetName(const fapi::Target * i_pFapiTarget, * @errortype * @moduleid MOD_ATTR_GET_TARGET_NAME * @reasoncode RC_ATTR_BAD_TARGET_PARAM - * @devdesc Failed to get the Target name due to bad target - * parameter. + * @devdesc Failed to get the FAPI Target name due to + * unrecognized TARGETING Target model + * @userdata1 TARGETING Target model */ + const bool hbSwError = true; errlHndl_t l_pError = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_INFORMATIONAL, MOD_ATTR_GET_TARGET_NAME, - RC_ATTR_BAD_TARGET_PARAM); + RC_ATTR_BAD_TARGET_PARAM, + l_model, 0, hbSwError); l_rc.setPlatError(reinterpret_cast (l_pError)); } } @@ -1065,14 +1073,18 @@ fapi::ReturnCode fapiPlatGetVpdVersion ( * @moduleid fapi::MOD_PLAT_ATTR_SVC_GET_VPD_VERSION * @reasoncode fapi::RC_NO_SINGLE_MBA * @userdata1 Number of MBAs + * @userdata2 DIMM HUID * @devdesc fapiPlatGetVpdVersion could not find the * expected 1 mba from the passed dimm target */ + const bool hbSwError = true; errlHndl_t l_pError = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, fapi::MOD_PLAT_ATTR_SVC_GET_VPD_VERSION, fapi::RC_NO_SINGLE_MBA, - l_mbaList.size()); + l_mbaList.size(), + TARGETING::get_huid(l_pTarget), + hbSwError); // Attach the error log to the fapi::ReturnCode l_rc.setPlatError(reinterpret_cast (l_pError)); @@ -1229,14 +1241,18 @@ fapi::ReturnCode fapiPlatDimmGetBadDqBitmap ( * @moduleid fapi::MOD_PLAT_ATTR_SVC_GET_BADDQ_DATA * @reasoncode fapi::RC_NO_SINGLE_MBA * @userdata1 Number of MBAs + * @userdata2 DIMM HUID * @devdesc fapiPlatDimmGetBadDqBitmap could not find the * expected 1 mba from the passed dimm target */ + const bool hbSwError = true; errlHndl_t l_pError = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, fapi::MOD_PLAT_ATTR_SVC_GET_BADDQ_DATA, fapi::RC_NO_SINGLE_MBA, - l_mbaList.size()); + l_mbaList.size(), + TARGETING::get_huid(l_pTarget), + hbSwError); // Attach the error log to the fapi::ReturnCode l_rc.setPlatError(reinterpret_cast (l_pError)); @@ -1305,14 +1321,18 @@ fapi::ReturnCode fapiPlatDimmSetBadDqBitmap ( * @moduleid fapi::MOD_PLAT_ATTR_SVC_SET_BADDQ_DATA * @reasoncode fapi::RC_NO_SINGLE_MBA * @userdata1 Number of MBAs + * @userdata2 DIMM HUID * @devdesc fapiPlatDimmSetBadDqBitmap could not find the * expected 1 mba from the passed dimm target */ + const bool hbSwError = true; errlHndl_t l_pError = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, fapi::MOD_PLAT_ATTR_SVC_SET_BADDQ_DATA, fapi::RC_NO_SINGLE_MBA, - l_mbaList.size()); + l_mbaList.size(), + TARGETING::get_huid(l_pTarget), + hbSwError); // Attach the error log to the fapi::ReturnCode l_rc.setPlatError(reinterpret_cast (l_pError)); diff --git a/src/usr/hwpf/plat/fapiPlatHwAccess.C b/src/usr/hwpf/plat/fapiPlatHwAccess.C index eac1049a2..ad4f61423 100644 --- a/src/usr/hwpf/plat/fapiPlatHwAccess.C +++ b/src/usr/hwpf/plat/fapiPlatHwAccess.C @@ -221,8 +221,8 @@ static errlHndl_t verifyCfamAccessTarget(const fapi::Target& i_target, if( l_pMasterProcChip == l_pTarget ) { - // Add the error log pointer as data to the ReturnCode - FAPI_ERR("verifyCfamAccessTarget: Attempt to access CFAM register %.8X on the master processor chip", i_address); + FAPI_ERR("verifyCfamAccessTarget: Attempt to access CFAM register %.8X on the master processor chip", + i_address); /*@ * @errortype @@ -233,12 +233,13 @@ static errlHndl_t verifyCfamAccessTarget(const fapi::Target& i_target, * @devdesc Attempt to access CFAM register on * the master processor chip */ + const bool hbSwError = true; l_err = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, fapi::MOD_VERIFY_CFAM_ACCESS_TARGET, fapi::RC_CFAM_ACCESS_ON_PROC_ERR, TARGETING::get_huid(l_pMasterProcChip), - i_address); + i_address, hbSwError); } } @@ -290,13 +291,17 @@ static errlHndl_t getCfamChipTarget(const TARGETING::Target* i_target, * @moduleid fapi::MOD_GET_CFAM_CHIP_TARGET * @reasoncode fapi::RC_INVALID_NUM_PARENT_CHIP * @userdata1 Number of parent chip found + * @userdata2 Chiplet HUID * @devdesc Invalid num of parent chip found for input CFAM target chiplet */ + const bool hbSwError = true; l_err = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, fapi::MOD_GET_CFAM_CHIP_TARGET, fapi::RC_INVALID_NUM_PARENT_CHIP, - l_list.size()); + l_list.size(), + TARGETING::get_huid(i_target), + hbSwError); } } return l_err; diff --git a/src/usr/hwpf/plat/fapiPlatMBvpdAccess.C b/src/usr/hwpf/plat/fapiPlatMBvpdAccess.C index aaff96d6d..8cc55228a 100644 --- a/src/usr/hwpf/plat/fapiPlatMBvpdAccess.C +++ b/src/usr/hwpf/plat/fapiPlatMBvpdAccess.C @@ -1,11 +1,11 @@ /* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ -/* $Source: src/usr/hwpf/plat/fapiPlatMBvpdAccess.C $ */ +/* $Source: src/usr/hwpf/plat/fapiPlatMBvpdAccess.C $ */ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* COPYRIGHT International Business Machines Corp. 2012,2014 */ /* */ /* p1 */ /* */ @@ -78,11 +78,12 @@ fapi::ReturnCode MBvpdRecordXlate(const fapi::MBvpdRecord i_fapiRecord, * @userdata1 Record enumerator * @devdesc Attempt to read an MVPD field using an invalid record */ + const bool hbSwError = true; errlHndl_t l_errl = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, MOD_MBVPD_ACCESS, RC_INVALID_RECORD, - i_fapiRecord); + i_fapiRecord, 0, hbSwError); // Add the error log pointer as data to the ReturnCode l_rc.setPlatError(reinterpret_cast (l_errl)); @@ -141,11 +142,12 @@ fapi::ReturnCode MBvpdKeywordXlate(const fapi::MBvpdKeyword i_fapiKeyword, * @userdata1 Keyword enumerator * @devdesc Attempt to read an MVPD field using an invalid keyword */ + const bool hbSwError = true; errlHndl_t l_errl = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, MOD_MBVPD_ACCESS, RC_INVALID_KEYWORD, - i_fapiKeyword); + i_fapiKeyword, 0, hbSwError); // Add the error log pointer as data to the ReturnCode l_rc.setPlatError(reinterpret_cast (l_errl)); diff --git a/src/usr/hwpf/plat/fapiPlatMvpdAccess.C b/src/usr/hwpf/plat/fapiPlatMvpdAccess.C index 79a641b8a..5365b3a2a 100644 --- a/src/usr/hwpf/plat/fapiPlatMvpdAccess.C +++ b/src/usr/hwpf/plat/fapiPlatMvpdAccess.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* COPYRIGHT International Business Machines Corp. 2012,2014 */ /* */ /* p1 */ /* */ @@ -107,11 +107,12 @@ fapi::ReturnCode MvpdRecordXlate(const fapi::MvpdRecord i_fapiRecord, * @userdata1 Record enumerator * @devdesc Attempt to read an MVPD field using an invalid record */ + const bool hbSwError = true; errlHndl_t l_errl = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, fapi::MOD_MVPD_ACCESS, fapi::RC_INVALID_RECORD, - i_fapiRecord); + i_fapiRecord, 0, hbSwError); // Add the error log pointer as data to the ReturnCode l_rc.setPlatError(reinterpret_cast (l_errl)); @@ -191,11 +192,12 @@ fapi::ReturnCode MvpdKeywordXlate(const fapi::MvpdKeyword i_fapiKeyword, * @userdata1 Keyword enumerator * @devdesc Attempt to read an MVPD field using an invalid keyword */ + const bool hbSwError = true; errlHndl_t l_errl = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, fapi::MOD_MVPD_ACCESS, fapi::RC_INVALID_KEYWORD, - i_fapiKeyword); + i_fapiKeyword, 0, hbSwError); // Add the error log pointer as data to the ReturnCode l_rc.setPlatError(reinterpret_cast (l_errl)); diff --git a/src/usr/hwpf/plat/fapiPlatSystemConfig.C b/src/usr/hwpf/plat/fapiPlatSystemConfig.C index c5b101fc6..e00da578c 100644 --- a/src/usr/hwpf/plat/fapiPlatSystemConfig.C +++ b/src/usr/hwpf/plat/fapiPlatSystemConfig.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -67,10 +67,12 @@ fapi::ReturnCode fapiGetOtherSideOfMemChannel( * @reasoncode fapi::RC_EMBEDDED_NULL_TARGET_PTR * @devdesc Target has embedded null target pointer */ + const bool hbSwError = true; errlHndl_t l_pError = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, fapi::MOD_FAPI_GET_OTHER_SIDE_OF_MEM_CHANNEL, - fapi::RC_EMBEDDED_NULL_TARGET_PTR); + fapi::RC_EMBEDDED_NULL_TARGET_PTR, + 0, 0, hbSwError); // Attach the error log to the fapi::ReturnCode l_rc.setPlatError(reinterpret_cast (l_pError)); @@ -90,14 +92,18 @@ fapi::ReturnCode fapiGetOtherSideOfMemChannel( * @moduleid fapi::MOD_FAPI_GET_OTHER_SIDE_OF_MEM_CHANNEL * @reasoncode fapi::RC_NO_SINGLE_MEMBUFF * @userdata1 Number of Memory Buffers + * @userdata2 MCS HUID * @devdesc fapiGetOtherSideOfMemChannel could not find exactly * one target on the other side of the correct state */ + const bool hbSwError = true; errlHndl_t l_pError = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, fapi::MOD_FAPI_GET_OTHER_SIDE_OF_MEM_CHANNEL, fapi::RC_NO_SINGLE_MEMBUFF, - l_targetList.size()); + l_targetList.size(), + TARGETING::get_huid(l_target), + hbSwError); // Attach the error log to the fapi::ReturnCode l_rc.setPlatError(reinterpret_cast (l_pError)); @@ -109,7 +115,8 @@ fapi::ReturnCode fapiGetOtherSideOfMemChannel( o_target.set(reinterpret_cast(l_targetList[0])); } - } else if (i_target.getType() == fapi::TARGET_TYPE_MEMBUF_CHIP) + } + else if (i_target.getType() == fapi::TARGET_TYPE_MEMBUF_CHIP) { // find the MCS that is associated with this Centaur getParentAffinityTargets (l_targetList, l_target, @@ -124,18 +131,21 @@ fapi::ReturnCode fapiGetOtherSideOfMemChannel( * @moduleid fapi::MOD_FAPI_GET_OTHER_SIDE_OF_MEM_CHANNEL * @reasoncode fapi::RC_NO_SINGLE_MCS * @userdata1 Number of MCSs + * @userdata2 Membuf HUID * @devdesc fapiGetOtherSideOfMemChannel could not find exactly * one target on the other side of the correct state */ + const bool hbSwError = true; errlHndl_t l_pError = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, fapi::MOD_FAPI_GET_OTHER_SIDE_OF_MEM_CHANNEL, fapi::RC_NO_SINGLE_MCS, - l_targetList.size()); + l_targetList.size(), + TARGETING::get_huid(l_target), + hbSwError); // Attach the error log to the fapi::ReturnCode l_rc.setPlatError(reinterpret_cast (l_pError)); - } else { @@ -143,8 +153,9 @@ fapi::ReturnCode fapiGetOtherSideOfMemChannel( o_target.set(reinterpret_cast(l_targetList[0])); } - } else { - + } + else + { FAPI_ERR("fapiGetOtherSideOfMemChannel. target 0x%08x not supported", i_target.getType()); /*@ @@ -152,14 +163,18 @@ fapi::ReturnCode fapiGetOtherSideOfMemChannel( * @moduleid fapi::MOD_FAPI_GET_OTHER_SIDE_OF_MEM_CHANNEL * @reasoncode fapi::RC_UNSUPPORTED_REQUEST * @userdata1 Requested type + * @userdata2 Unsupported Target HUID * @devdesc fapiGetOtherSideOfMemChannel request for unsupported * or invalid target type */ + const bool hbSwError = true; errlHndl_t l_pError = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, fapi::MOD_FAPI_GET_OTHER_SIDE_OF_MEM_CHANNEL, fapi::RC_UNSUPPORTED_REQUEST, - i_target.getType()); + i_target.getType(), + TARGETING::get_huid(l_target), + hbSwError); // Attach the error log to the fapi::ReturnCode l_rc.setPlatError(reinterpret_cast (l_pError)); @@ -179,14 +194,18 @@ fapi::ReturnCode fapiGetOtherSideOfMemChannel( * @moduleid fapi::MOD_FAPI_GET_OTHER_SIDE_OF_MEM_CHANNEL * @reasoncode fapi::RC_STATE_MISMATCH * @userdata1 Requested state + * @userdata2 Other Target HUID * @devdesc fapiGetOtherSideOfMemChannel target not present or * functional as requested */ + const bool hbSwError = true; errlHndl_t l_pError = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, fapi::MOD_FAPI_GET_OTHER_SIDE_OF_MEM_CHANNEL, fapi::RC_STATE_MISMATCH, - i_state); + i_state, + TARGETING::get_huid(l_targetList[0]), + hbSwError); // Attach the error log to the fapi::ReturnCode l_rc.setPlatError(reinterpret_cast (l_pError)); @@ -215,6 +234,10 @@ fapi::ReturnCode fapiGetChildChiplets( fapi::ReturnCode l_rc; o_chiplets.clear(); + // Extract the HostBoot Target pointer for the input chip + TARGETING::Target * l_pChip = + reinterpret_cast(i_chip.get()); + // Check that the input target is a chip if (!i_chip.isChip()) { @@ -225,13 +248,17 @@ fapi::ReturnCode fapiGetChildChiplets( * @moduleid fapi::MOD_FAPI_GET_CHILD_CHIPLETS * @reasoncode fapi::RC_INVALID_REQUEST * @userdata1 Type of input target + * @userdata2 Input Target HUID * @devdesc fapiGetChildChiplets request for non-chip */ + const bool hbSwError = true; errlHndl_t l_pError = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, fapi::MOD_FAPI_GET_CHILD_CHIPLETS, fapi::RC_INVALID_REQUEST, - i_chip.getType()); + i_chip.getType(), + TARGETING::get_huid(l_pChip), + hbSwError); // Attach the error log to the fapi::ReturnCode l_rc.setPlatError(reinterpret_cast (l_pError)); @@ -264,7 +291,6 @@ fapi::ReturnCode fapiGetChildChiplets( { l_type = TARGETING::TYPE_L4; } - else { FAPI_ERR("fapiGetChildChiplets. Chiplet type 0x%08x not supported", @@ -274,24 +300,24 @@ fapi::ReturnCode fapiGetChildChiplets( * @moduleid fapi::MOD_FAPI_GET_CHILD_CHIPLETS * @reasoncode fapi::RC_UNSUPPORTED_REQUEST * @userdata1 Type of requested chiplet + * @userdata2 Input Chip Target HUID * @devdesc fapiGetChildChiplets request for unsupported * or invalid chiplet type */ + const bool hbSwError = true; errlHndl_t l_pError = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, fapi::MOD_FAPI_GET_CHILD_CHIPLETS, fapi::RC_UNSUPPORTED_REQUEST, - i_chipletType); + i_chipletType, + TARGETING::get_huid(l_pChip), + hbSwError); // Attach the error log to the fapi::ReturnCode l_rc.setPlatError(reinterpret_cast (l_pError)); } if (!l_rc) { - // Extract the HostBoot Target pointer for the input chip - TARGETING::Target * l_pChip = - reinterpret_cast(i_chip.get()); - if (l_pChip == NULL) { FAPI_ERR("fapiGetChildChiplets. Embedded NULL target pointer"); @@ -301,10 +327,12 @@ fapi::ReturnCode fapiGetChildChiplets( * @reasoncode fapi::RC_EMBEDDED_NULL_TARGET_PTR * @devdesc Target has embedded null target pointer */ + const bool hbSwError = true; errlHndl_t l_pError = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, fapi::MOD_FAPI_GET_CHILD_CHIPLETS, - fapi::RC_EMBEDDED_NULL_TARGET_PTR); + fapi::RC_EMBEDDED_NULL_TARGET_PTR, + 0, 0, hbSwError); // Attach the error log to the fapi::ReturnCode l_rc.setPlatError(reinterpret_cast (l_pError)); @@ -372,10 +400,12 @@ fapi::ReturnCode fapiGetAssociatedDimms( * @reasoncode fapi::RC_EMBEDDED_NULL_TARGET_PTR * @devdesc Target has embedded null target pointer */ + const bool hbSwError = true; errlHndl_t l_pError = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, fapi::MOD_FAPI_GET_ASSOCIATE_DIMMS, - fapi::RC_EMBEDDED_NULL_TARGET_PTR); + fapi::RC_EMBEDDED_NULL_TARGET_PTR, + 0, 0, hbSwError); // Attach the error log to the fapi::ReturnCode l_rc.setPlatError(reinterpret_cast (l_pError)); @@ -432,6 +462,10 @@ fapi::ReturnCode fapiGetParentChip( fapi::ReturnCode l_rc; + // Extract the HostBoot Target pointer for the input chiplet + TARGETING::Target * l_pChiplet = + reinterpret_cast(i_chiplet.get()); + // Check that the input target is a chiplet if (!i_chiplet.isChiplet()) { @@ -443,23 +477,23 @@ fapi::ReturnCode fapiGetParentChip( * @moduleid fapi::MOD_FAPI_GET_PARENT_CHIP * @reasoncode fapi::RC_INVALID_REQUEST * @userdata1 Type of input target + * @userdata2 Input Target HUID * @devdesc fapiGetParentChip request for non-chiplet */ + const bool hbSwError = true; errlHndl_t l_pError = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, fapi::MOD_FAPI_GET_PARENT_CHIP, fapi::RC_INVALID_REQUEST, - i_chiplet.getType()); + i_chiplet.getType(), + TARGETING::get_huid(l_pChiplet), + hbSwError); // Attach the error log to the fapi::ReturnCode l_rc.setPlatError(reinterpret_cast (l_pError)); } else { - // Extract the HostBoot Target pointer for the input chiplet - TARGETING::Target * l_pChiplet = - reinterpret_cast(i_chiplet.get()); - if (l_pChiplet == NULL) { /*@ @@ -468,10 +502,12 @@ fapi::ReturnCode fapiGetParentChip( * @reasoncode fapi::RC_EMBEDDED_NULL_TARGET_PTR * @devdesc Target has embedded null target pointer */ + const bool hbSwError = true; errlHndl_t l_pError = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, fapi::MOD_FAPI_GET_PARENT_CHIP, - fapi::RC_EMBEDDED_NULL_TARGET_PTR); + fapi::RC_EMBEDDED_NULL_TARGET_PTR, + 0, 0, hbSwError); // Attach the error log to the fapi::ReturnCode l_rc.setPlatError(reinterpret_cast (l_pError)); @@ -483,18 +519,21 @@ fapi::ReturnCode fapiGetParentChip( if (l_pChip == NULL) { - // One parent chip was not found FAPI_ERR("fapiGetParentChip. Parent not found"); /*@ * @errortype * @moduleid fapi::MOD_FAPI_GET_PARENT_CHIP * @reasoncode fapi::RC_NO_SINGLE_PARENT + * @userdata1 Input Chiplet Target HUID * @devdesc fapiGetParentChip did not find one parent */ + const bool hbSwError = true; errlHndl_t l_pError = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, fapi::MOD_FAPI_GET_PARENT_CHIP, - fapi::RC_NO_SINGLE_PARENT); + fapi::RC_NO_SINGLE_PARENT, + TARGETING::get_huid(l_pChiplet), + 0, hbSwError); // Attach the error log to the fapi::ReturnCode l_rc.setPlatError(reinterpret_cast (l_pError)); diff --git a/src/usr/hwpf/plat/fapiPlatUtil.C b/src/usr/hwpf/plat/fapiPlatUtil.C index 0aad15fbf..ddff20d94 100644 --- a/src/usr/hwpf/plat/fapiPlatUtil.C +++ b/src/usr/hwpf/plat/fapiPlatUtil.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -135,25 +135,23 @@ void fapiLogError(fapi::ReturnCode & io_rc, } } -//**************************************************************************** -// platform-level implementation - +//****************************************************************************** +// platIsScanTraceEnabled +//****************************************************************************** bool platIsScanTraceEnabled() { - // TODO: Get the answer from g_fapiScanTd conditional trace buffer. Camvan - // has not pushed the code yet. + // SCAN trace can be dynamically turned on/off, always return true here return 1; } -//**************************************************************************** -// platform-level implementation - -void platSetScanTrace(bool i_enable) -{ - // TODO: enable or disable scan trace via the SCAN trace buffer. Camvan - // has not pushed the code yet. - return; -} +//****************************************************************************** +// platSetScanTrace +// Implementation to be added if needed +//****************************************************************************** +//void platSetScanTrace(bool i_enable) +//{ +// +//} //****************************************************************************** // fapiLoadInitFile diff --git a/src/usr/hwpf/test/fapiRcTest.C b/src/usr/hwpf/test/fapiRcTest.C index 0e9949924..80e6ea026 100644 --- a/src/usr/hwpf/test/fapiRcTest.C +++ b/src/usr/hwpf/test/fapiRcTest.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -605,7 +605,7 @@ uint32_t rcTest12() // Create a ReturnCode ReturnCode l_rc; - l_rc.setFapiError(FAPI_RC_INVALID_ATTR_GET); + l_rc.setPlatError(NULL, FAPI_RC_PLAT_ERR_SEE_DATA); // Create fake targets uint32_t l_targetHandle = 3; @@ -892,7 +892,7 @@ uint32_t rcTest13() // Create a ReturnCode ReturnCode l_rc; - l_rc.setFapiError(FAPI_RC_INVALID_ATTR_GET); + l_rc.setPlatError(NULL, FAPI_RC_PLAT_ERR_SEE_DATA); // Create a DIMM target uint32_t l_targetHandle = 3; @@ -982,7 +982,7 @@ uint32_t rcTest14() // Create a ReturnCode ReturnCode l_rc; - l_rc.setFapiError(FAPI_RC_INVALID_ATTR_GET); + l_rc.setPlatError(NULL, FAPI_RC_PLAT_ERR_SEE_DATA); // Create a DIMM target uint32_t l_targetHandle = 3; @@ -1073,7 +1073,7 @@ uint32_t rcTest15() // Create a ReturnCode ReturnCode l_rc; - l_rc.setFapiError(FAPI_RC_INVALID_ATTR_GET); + l_rc.setPlatError(NULL, FAPI_RC_PLAT_ERR_SEE_DATA); // Create a DIMM target uint32_t l_targetHandle = 3; @@ -1121,7 +1121,7 @@ uint32_t rcTest16() // Create a ReturnCode ReturnCode l_rc; - l_rc.setFapiError(FAPI_RC_INVALID_ATTR_GET); + l_rc.setPlatError(NULL, FAPI_RC_PLAT_ERR_SEE_DATA); // Create 2 targets uint32_t l_targetHandle = 3; diff --git a/src/usr/initservice/baseinitsvc/initservice.C b/src/usr/initservice/baseinitsvc/initservice.C index ece13d59a..3abdea1c5 100644 --- a/src/usr/initservice/baseinitsvc/initservice.C +++ b/src/usr/initservice/baseinitsvc/initservice.C @@ -116,14 +116,12 @@ errlHndl_t InitService::checkNLoadModule( const TaskInfo *i_ptask ) const * UserDetails will contain the name of the * function or task. */ + const bool hbSwError = true; l_errl = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_CRITICAL_SYS_TERM, INITSERVICE::BASE_INITSVC_MOD_ID, INITSERVICE::INITSVC_LOAD_MODULE_FAILED, - 0, - 0 ); - - // error, break out of do block + 0, 0, hbSwError); break; } @@ -170,7 +168,6 @@ errlHndl_t InitService::startTask( assert( i_ptask != NULL ); - // assert( i_ptask->taskflags.task_type == START_TASK ); do { // Base modules have already been loaded and initialized, @@ -217,14 +214,12 @@ errlHndl_t InitService::startTask( * @devdesc Initialization Service failed to start a task. * */ + const bool hbSwError = true; l_errl = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_CRITICAL_SYS_TERM, INITSERVICE::BASE_INITSVC_MOD_ID, INITSERVICE::START_TASK_FAILED, - 0, - l_tidlnchrc ); - - // break out of do block + 0, l_tidlnchrc, hbSwError); break; } // endif tidlnchrc @@ -258,14 +253,12 @@ errlHndl_t InitService::startTask( * the task returned an error. * */ + const bool hbSwError = true; l_errl = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_CRITICAL_SYS_TERM, INITSERVICE::BASE_INITSVC_MOD_ID, INITSERVICE::WAIT_TASK_FAILED, - l_tidretrc, - l_childsts ); - - // break out of do block + l_tidretrc, l_childsts, hbSwError); break; } // endif tidretrc @@ -344,14 +337,12 @@ errlHndl_t InitService::executeFn( * function within a module but the function * failed to launch */ + const bool hbSwError = true; l_errl = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_CRITICAL_SYS_TERM, INITSERVICE::BASE_INITSVC_MOD_ID, INITSERVICE::START_FN_FAILED, - l_tidlnchrc, - 0 ); - - // break out with errorlog set + l_tidlnchrc, 0, hbSwError); break; } // endif tidlnchrc @@ -380,12 +371,12 @@ errlHndl_t InitService::executeFn( * * */ + const bool hbSwError = true; l_errl = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_CRITICAL_SYS_TERM, INITSERVICE::BASE_INITSVC_MOD_ID, INITSERVICE::WAIT_FN_FAILED, - l_tidretrc, - l_childsts ); + l_tidretrc, l_childsts, hbSwError); TRACFCOMP(g_trac_initsvc, "ERROR : task_wait_tid(0x%x). '%s', l_tidretrc=0x%x, l_childsts=0x%x", @@ -426,18 +417,6 @@ errlHndl_t InitService::executeFn( return l_errl; } - -/** - * @todo this will make a system call to post the progress code. - * - */ -void InitService::setProgressCode( uint64_t i_progresscode ) const -{ - - // do nothing for now -} - - errlHndl_t InitService::dispatchTask( const TaskInfo *i_ptask, void *io_pargs ) const { @@ -499,15 +478,15 @@ errlHndl_t InitService::dispatchTask( const TaskInfo *i_ptask, void InitService::init( void *io_ptr ) { + // Detach this task from the parent + task_detach(); + errlHndl_t l_errl = NULL; uint64_t l_task = 0; const TaskInfo *l_ptask = NULL; // init shutdown status to good. uint64_t l_shutdownStatus = SHUTDOWN_STATUS_GOOD; - // @todo detach from parent. - // $$ task_detach(); - printk( "InitService entry.\n" ); TRACFCOMP( g_trac_initsvc, @@ -753,10 +732,12 @@ void InitService::doShutdown(uint64_t i_status, * @defdesc Could not FLUSH virtual memory. * */ + const bool hbSwError = true; l_err = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_CRITICAL_SYS_TERM, INITSERVICE::BASE_INITSVC_MOD_ID, - INITSERVICE::SHUTDOWN_FLUSH_FAILED,l_rc,0); + INITSERVICE::SHUTDOWN_FLUSH_FAILED, + l_rc, 0, hbSwError); //Commit and attempt flushing other registered blocks errlCommit( l_err, INITSVC_COMP_ID ); l_err = NULL; diff --git a/src/usr/initservice/baseinitsvc/initservice.H b/src/usr/initservice/baseinitsvc/initservice.H index cf4536a86..4cae3b270 100644 --- a/src/usr/initservice/baseinitsvc/initservice.H +++ b/src/usr/initservice/baseinitsvc/initservice.H @@ -133,22 +133,6 @@ public: errlHndl_t executeFn( const TaskInfo *i_ptask, void *i_pargs ) const; - - /** - * @brief set progress code for task. - * This is supposed to make a system call to post the error to - * SP and will also write a SCOM reg - * - * @TODO need progress code categories defined. - * - * @param[in] i_progresscode - 64-bit progress code. - * - * @return nothing - * - */ - void setProgressCode( uint64_t i_progresscode ) const; - - /** * @brief dispatch Task depending on what type of task it is, * etc. diff --git a/src/usr/initservice/extinitsvc/extinitsvc.C b/src/usr/initservice/extinitsvc/extinitsvc.C index 323624681..ac94e31c3 100644 --- a/src/usr/initservice/extinitsvc/extinitsvc.C +++ b/src/usr/initservice/extinitsvc/extinitsvc.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -64,9 +64,6 @@ void ExtInitSvc::init( errlHndl_t &io_rtaskRetErrl ) printk( "ExtInitSvc entry.\n" ); - // @todo detach from initservice - // task_detach(); - TRACFCOMP( g_trac_initsvc, "Extended Initialization Service is starting." ); @@ -105,25 +102,7 @@ void ExtInitSvc::init( errlHndl_t &io_rtaskRetErrl ) // die if we drop out with an error if ( l_errl ) { - -#if 0 - // @todo detach this task and just terminate task - // Commit the errorlog here. - TRACFCOMP( g_trac_initsvc, - "ExtInitSvc ERROR: Committing errorlog %p & shutdown", - l_errl ); - errlCommit( l_errl, INITSVC_COMP_ID ); - - // Tell the kernel to shut down. This will not actually - // happen until the last thread has ended. - INITSERVICE::doShutdown(SHUTDOWN_STATUS_EXTINITSVC_FAILED); - - // end the task. - io_rtaskRetErrl=NULL; - return; -#endif - - // end the task and pass the errorlog to initservice to be committed. + // pass the errorlog to initservice to be committed. // initservice should do the shutdown. TRACFCOMP( g_trac_initsvc, "ExtInitSvc: ERROR: return to initsvc with errlog %p", diff --git a/src/usr/initservice/extinitsvc/extinitsvctasks.H b/src/usr/initservice/extinitsvc/extinitsvctasks.H index 0a5b2dc19..f553143f3 100644 --- a/src/usr/initservice/extinitsvc/extinitsvctasks.H +++ b/src/usr/initservice/extinitsvc/extinitsvctasks.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -306,8 +306,6 @@ const TaskInfo g_exttaskinfolist[] = { }, -// end TODO. - // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // NOTE: libistepdisp.so needs to always be last in this list!! // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! diff --git a/src/usr/initservice/istepdispatcher/istepdispatcher.C b/src/usr/initservice/istepdispatcher/istepdispatcher.C index 8483e471c..b52a21d23 100644 --- a/src/usr/initservice/istepdispatcher/istepdispatcher.C +++ b/src/usr/initservice/istepdispatcher/istepdispatcher.C @@ -674,7 +674,7 @@ void IStepDispatcher::loadModules(uint32_t istepNumber) const uint32_t i = 0; while( ( l_errl == NULL ) && - ( g_isteps[istepNumber].depModules->modulename[i][0] != 0) ) + ( g_isteps[istepNumber].depModules->modulename[i] != NULL) ) { TRACFCOMP( g_trac_initsvc, "loading [%s]", @@ -713,7 +713,7 @@ void IStepDispatcher::unLoadModules(uint32_t istepNumber) const uint32_t i = 0; while( ( l_errl == NULL ) && - ( g_isteps[istepNumber].depModules->modulename[i][0] != 0) ) + ( g_isteps[istepNumber].depModules->modulename[i] != NULL) ) { TRACFCOMP( g_trac_initsvc, "unloading [%s]", @@ -947,11 +947,11 @@ errlHndl_t IStepDispatcher::sendIstepCompleteMsg() * @devdesc Request to send Istep Complete msg to Fsp, but * no outstanding message from Fsp found. */ + const bool hbSwError = true; err = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, ISTEP_INITSVC_MOD_ID, NO_MSG_PRESENT, - curIStep, - curSubStep ); + curIStep, curSubStep, hbSwError ); } TRACFCOMP( g_trac_initsvc, EXIT_MRK"IStepDispatcher::sendIstepCompleteMsg"); diff --git a/src/usr/initservice/istepdispatcher/istepdispatcher.H b/src/usr/initservice/istepdispatcher/istepdispatcher.H index 9b5ceaa8d..ba6209d3c 100644 --- a/src/usr/initservice/istepdispatcher/istepdispatcher.H +++ b/src/usr/initservice/istepdispatcher/istepdispatcher.H @@ -138,9 +138,7 @@ public: * * Sends a BREAKPOINT message to the FSP and waits for a response * - * @param[in] i_info - TODO - this needs to be decided yet. But it seems - * at least preliminarily that this will contain a unique breakpoint - * numbering value. + * @param[in] i_info - Unique breakpoint numbering value. */ void iStepBreakPoint(uint32_t i_info); diff --git a/src/usr/initservice/istepdispatcher/sptask.C b/src/usr/initservice/istepdispatcher/sptask.C index ccbf280e0..cab9784f2 100644 --- a/src/usr/initservice/istepdispatcher/sptask.C +++ b/src/usr/initservice/istepdispatcher/sptask.C @@ -231,16 +231,9 @@ void userConsoleComm( void * io_msgQ ) } // endif gobit // sleep, and wait for user to give us something else to do. - /** - * @todo Need a common method of doing delays in HostBoot - * @VBU workaround - */ - // Don't delay as long in VBU because it will take VERY long to - // run the simulator if( TARGETING::is_vpo() ) { - // VBU delay per Patrick - //TODO tmp remove for VPO, need better polling strategy -- RTC43738 + // In VPO/VBU, yield the task, any real delay takes too long task_yield(); } else diff --git a/src/usr/initservice/test/initservicetest.H b/src/usr/initservice/test/initservicetest.H index 5cbd77111..c4e569e98 100644 --- a/src/usr/initservice/test/initservicetest.H +++ b/src/usr/initservice/test/initservicetest.H @@ -1,25 +1,25 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/usr/initservice/test/initservicetest.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 +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/initservice/test/initservicetest.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 initservicetest.H @@ -72,8 +72,6 @@ const INITSERVICE::TaskInfo TASK_TEST2 = { /** * @brief set up a dummy TaskInfo struct. * libtrace does NOT have a _start() function so this should return an errorlog. - * - * @todo this needs to be replaced with a test module */ const INITSERVICE::TaskInfo TASK_TEST3 = { "libtrace.so" , // taskname diff --git a/src/usr/targeting/attrrp.C b/src/usr/targeting/attrrp.C index d51dcc422..6a27ba14a 100644 --- a/src/usr/targeting/attrrp.C +++ b/src/usr/targeting/attrrp.C @@ -228,16 +228,16 @@ namespace TARGETING * request that is invalid for the attribute * section containing the address. */ + const bool hbSwError = true; errlHndl_t l_errl = new ErrlEntry(ERRL_SEV_UNRECOVERABLE, TARG_MOD_ATTRRP, TARG_RC_ATTR_MSG_FAIL, vAddr, TWO_UINT32_TO_UINT64( msg->type, - section) - ); + section), + hbSwError); errlCommit(l_errl,TARG_COMP_ID); - } // Respond to kernel request. @@ -377,11 +377,13 @@ namespace TARGETING * * @devdesc Found unhandled attribute section type */ - l_errl = new ErrlEntry(ERRL_SEV_UNRECOVERABLE, - TARG_MOD_ATTRRP, - TARG_RC_UNHANDLED_ATTR_SEC_TYPE, - iv_sections[i].type); - break; + const bool hbSwError = true; + l_errl = new ErrlEntry(ERRL_SEV_UNRECOVERABLE, + TARG_MOD_ATTRRP, + TARG_RC_UNHANDLED_ATTR_SEC_TYPE, + iv_sections[i].type, + 0, hbSwError); + break; } if(l_errl) @@ -415,11 +417,12 @@ namespace TARGETING * memory block for an attribute section, the * kernel returned an error. */ + const bool hbSwError = true; l_errl = new ErrlEntry(ERRL_SEV_UNRECOVERABLE, TARG_MOD_ATTRRP, TARG_RC_MM_BLOCK_FAIL, iv_sections[i].vmmAddress, - rc); + rc, hbSwError); break; } @@ -452,11 +455,13 @@ namespace TARGETING * a virtual memory block for an attribute * section, the kernel returned an error. */ + const bool hbSwError = true; l_errl = new ErrlEntry(ERRL_SEV_UNRECOVERABLE, TARG_MOD_ATTRRP, TARG_RC_MM_PERM_FAIL, iv_sections[i].vmmAddress, - TWO_UINT32_TO_UINT64(rc, l_perm)); + TWO_UINT32_TO_UINT64(rc, l_perm), + hbSwError); break; } diff --git a/src/usr/targeting/attrrp_common.C b/src/usr/targeting/attrrp_common.C index 3d013005b..a93c13451 100644 --- a/src/usr/targeting/attrrp_common.C +++ b/src/usr/targeting/attrrp_common.C @@ -176,8 +176,5 @@ namespace TARGETING break; } } - // $TODO what if we dont find it?? } - - } diff --git a/src/usr/targeting/common/genHwsvMrwXml.pl b/src/usr/targeting/common/genHwsvMrwXml.pl index 75e72a3af..4154028a5 100755 --- a/src/usr/targeting/common/genHwsvMrwXml.pl +++ b/src/usr/targeting/common/genHwsvMrwXml.pl @@ -1992,9 +1992,6 @@ sub generate_proc } - #TODO RTC [59707] - #Update Lane equalization values - # add EEPROM attributes addEeproms($sys, $node, $proc); diff --git a/src/usr/targeting/common/target.C b/src/usr/targeting/common/target.C index 6d619a7ab..96067fb25 100644 --- a/src/usr/targeting/common/target.C +++ b/src/usr/targeting/common/target.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -268,9 +268,10 @@ mutex_t* Target::_getHbMutexAttr( void* l_pAttr = NULL; (void)_getAttrPtr(i_attribute,l_pAttr); - //@TODO Remove assert once release has stablized - TARG_ASSERT(l_pAttr,"TARGETING::Target::_getHbMutexAttr<%d>: _getAttrPtr " - "returned NULL",i_attribute); + if (unlikely(l_pAttr == NULL)) + { + targAssert(GET_HB_MUTEX_ATTR, i_attribute); + } return static_cast(l_pAttr); @@ -514,6 +515,41 @@ uint8_t Target::getAttrTankTargetUnitPos() const return l_targetUnitPos; } +//****************************************************************************** +// Target::targAssert() +//****************************************************************************** +void Target::targAssert(TargAssertReason i_reason, + uint32_t i_ffdc) +{ + switch (i_reason) + { + case SET_ATTR: + TARG_ASSERT(false, + "TARGETING::Target::setAttr<0x%7x>: trySetAttr returned false", + i_ffdc); + break; + case GET_ATTR: + TARG_ASSERT(false, + "TARGETING::Target::getAttr<0x%7x>: tryGetAttr returned false", + i_ffdc); + break; + case GET_ATTR_AS_STRING: + TARG_ASSERT(false, + "TARGETING::Target::getAttrAsString<0x%7x>: tryGetAttr returned false", + i_ffdc); + break; + case GET_HB_MUTEX_ATTR: + TARG_ASSERT(false, + "TARGETING::Target::_getHbMutexAttr<0x%7x>: _getAttrPtr returned NULL", + i_ffdc); + break; + default: + TARG_ASSERT(false, + "TARGETING function asserted for unknown reason (0x%x)", + i_ffdc); + } +} + //****************************************************************************** // Target::installWriteAttributeCallback //****************************************************************************** diff --git a/src/usr/targeting/common/test/testcommontargeting.H b/src/usr/targeting/common/test/testcommontargeting.H index 0f1cceee1..d94315d41 100644 --- a/src/usr/targeting/common/test/testcommontargeting.H +++ b/src/usr/targeting/common/test/testcommontargeting.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -1414,73 +1414,6 @@ class CommonTargetingTestSuite: public CxxTest::TestSuite TARG_TS_TRACE(EXIT_MRK "testFapiToHbMacros" ); } - void testFapiAttributes () - { - - TARG_TS_TRACE(ENTER_MRK "testFapiAttributes" ); - - using namespace TARGETING; - using namespace fapi; - - fapi::ReturnCode l_rc; - - //---------------------------------------------------------------------- - // Test ATTR_MSS_EFF_PRIMARY_RANK - //---------------------------------------------------------------------- - -// @TODO ATTR_MSS_EFF_PRIMARY_RANK - Enable once we pull in XML file with this attribute. -#if ATTR_MSS_EFF_PRIMARY_RANK - // Find all MBA's in this system - PredicateCTM l_mba_pred(CLASS_UNIT,TYPE_MBA); - TargetRangeFilter l_mba_filter( - targetService().begin(), - targetService().end(), - &l_mba_pred); - // Loop through all MBA's and validate the attribute - for(;l_mba_filter;++l_mba_filter) - { - if(l_mba_filter->getAttr() != TYPE_MBA) - { - TARG_TS_FAIL("Should only have returned type MBA!"); - break; - } - else - { - uint8_t l_uint8_mss_eff_primary_rank[4][4]; - - fapi::Target* l_pFapiTarget = new fapi::Target(TARGET_TYPE_MBA_CHIPLET, *l_mba_filter); - - // Test get - l_rc = FAPI_ATTR_GET(ATTR_MSS_EFF_PRIMARY_RANK, l_pFapiTarget,l_uint8_mss_eff_primary_rank); - if (l_rc) - { - TARG_TS_FAIL("hwpTestAttributes: ATTR_MSS_EFF_PRIMARY_RANK. Error from GET"); - break; - } - - // Test set - l_rc = FAPI_ATTR_SET(ATTR_MSS_EFF_PRIMARY_RANK, l_pFapiTarget, l_uint8_mss_eff_primary_rank); - if (l_rc) - { - TARG_TS_FAIL("hwpTestAttributes: ATTR_MSS_EFF_PRIMARY_RANK. Error from SET"); - break; - } - - delete l_pFapiTarget; - l_pFapiTarget = NULL; - TARG_TS_TRACE("hwpTestAttributes: Test of ATTR_MSS_EFF_PRIMARY_RANK Passed!"); - } - } -#endif - TARG_TS_TRACE(EXIT_MRK "testFapiAttributes" ); - - if(l_rc) - { - errlHndl_t l_pErrLog = static_cast(l_rc.releasePlatData()); - COMMON::ERRORLOG::errlCommit(l_pErrLog,TARG_COMP_ID); - } - } - void testPodNumericalTypes() { TARG_TS_TRACE(ENTER_MRK "testPodNumericalTypes" ); diff --git a/src/usr/targeting/common/xmltohb/attribute_types.xml b/src/usr/targeting/common/xmltohb/attribute_types.xml index 5ba9d01c3..64d2d83af 100644 --- a/src/usr/targeting/common/xmltohb/attribute_types.xml +++ b/src/usr/targeting/common/xmltohb/attribute_types.xml @@ -1926,26 +1926,6 @@ - - MVPD_FREQ_CORE_NOMINAL - - Chip attribute. - The nominal frequency of the processor cores in MHz. - TODO This attribute should be from MVPD. - When MVPD function is present, this attribute should be deleted. - The corresponding HWPF attribute request should map to a function - that calls the MVPD driver (in the same way as DIMM SPD). - For now, just default to 3GHz - - 3000 - non-volatile - - - ATTR_MVPD_FREQ_CORE_NOMINAL - DIRECT - - - HUID @@ -2938,24 +2918,12 @@ MNFG_FLAGS - Provides the mnfg flags - in a single value. The bits are - masked together so the single value - will have data on several mnfg flags. - Should note that the MNFG_FLAG_BIT enum - is used to provide the value of the - different mnfg flags. A user can bitwise - 'OR' several of the MNFG_FLAG_BIT values - together to indicate that multiple mnfg - flags are set. - @TODO via RTC: 35451 - The HostBoot side can only read the mnfg - flag attribute. However the FSP side will - need to read and write the mnfg flag - attributes. For now making it so both sides - are read and writeable but will need to revisit - to find a better way to handle persistency when - the hostboot and FSP differ. + + Provides the manufacturing flags. This is a bitfield. + Multiple flags can be set at once. Use MNFG_FLAG_BIT + to decode. Expected use-case is for FSP to write this + attribute based on the MNFG component flags and for + HWSV/Hostboot to read it. @@ -4750,8 +4718,7 @@ Divider for the 1us PBAX hang pulse. A hang is detected after two divided hang Consumer: proc_pcbs_init.C - TODO: Dean said this may either be provided by the Machine Readable - Workbook or Todd R's power management def file. + Provided by the Machine Readable Workbook @@ -4981,9 +4948,7 @@ Divider for the 1us PBAX hang pulse. A hang is detected after two divided hang Consumers: proc_build_gpstate_table.C (among others) - TODO: Dean's proposal is that each platform will iterate over all chips, - reading the super-turbo frequency from MVPD #V and set this attribute - to the lowest value. + Set by the HWSV freq/voltage service based on MVPD #V diff --git a/src/usr/targeting/common/xmltohb/common.mk b/src/usr/targeting/common/xmltohb/common.mk index 24b400440..09e634eb1 100644 --- a/src/usr/targeting/common/xmltohb/common.mk +++ b/src/usr/targeting/common/xmltohb/common.mk @@ -5,7 +5,7 @@ # # IBM CONFIDENTIAL # -# COPYRIGHT International Business Machines Corp. 2011,2013 +# COPYRIGHT International Business Machines Corp. 2011,2014 # # p1 # @@ -72,7 +72,6 @@ FAPI_ATTR_SOURCES = \ dimm_attributes.xml \ unit_attributes.xml \ freq_attributes.xml \ - proc_mvpd_attributes.xml \ ei_bus_attributes.xml \ dram_initialization/proc_setup_bars/proc_setup_bars_memory_attributes.xml \ dram_initialization/proc_setup_bars/proc_setup_bars_l3_attributes.xml \ diff --git a/src/usr/targeting/common/xmltohb/target_types.xml b/src/usr/targeting/common/xmltohb/target_types.xml index b5580daf2..79fcd61db 100644 --- a/src/usr/targeting/common/xmltohb/target_types.xml +++ b/src/usr/targeting/common/xmltohb/target_types.xml @@ -314,8 +314,6 @@ HWAS_STATE_CHANGED_SUBSCRIPTION_MASK 0x00000001 - - MVPD_FREQ_CORE_NOMINAL VPD_REC_NUM diff --git a/src/usr/targeting/common/xmltohb/xmltohb.pl b/src/usr/targeting/common/xmltohb/xmltohb.pl index 2cb9147a8..acd2fef97 100755 --- a/src/usr/targeting/common/xmltohb/xmltohb.pl +++ b/src/usr/targeting/common/xmltohb/xmltohb.pl @@ -4989,7 +4989,6 @@ sub generateTargetingImage { my($vmmConstsFile, $attributes, $Target_t) = @_; # 128 MB virtual memory offset between sections - #@TODO Need the final value after full host boot support is implemented. my $vmmSectionOffset = 128 * 1024 * 1024; # 128MB # Virtual memory addresses corresponding to the start of the targeting image -- cgit v1.2.1