diff options
author | Monte Copeland <copelanm@us.ibm.com> | 2011-08-11 15:57:40 -0500 |
---|---|---|
committer | Monte K. Copeland <copelanm@us.ibm.com> | 2011-08-16 13:24:44 -0500 |
commit | f24bf89ab0cb82fee8ab80ed6f5aa8142e3db462 (patch) | |
tree | 8647432fc82bbd34becc2ebcd7f50f2fccd469b8 /src/usr/errl/errlsctn.H | |
parent | 802274b948ef4a52deb4285368a086f669d3913b (diff) | |
download | blackbird-hostboot-f24bf89ab0cb82fee8ab80ed6f5aa8142e3db462.tar.gz blackbird-hostboot-f24bf89ab0cb82fee8ab80ed6f5aa8142e3db462.zip |
Changes to errl to commit error logs to L3 RAM 7
Change-Id: Ic058a5b9ea6f8f1d79fc0ff30097cc32f18423bd
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/221
Reviewed-by: Monte K. Copeland <copelanm@us.ibm.com>
Tested-by: Jenkins Server
Diffstat (limited to 'src/usr/errl/errlsctn.H')
-rw-r--r-- | src/usr/errl/errlsctn.H | 59 |
1 files changed, 54 insertions, 5 deletions
diff --git a/src/usr/errl/errlsctn.H b/src/usr/errl/errlsctn.H index 800665d48..682d59033 100644 --- a/src/usr/errl/errlsctn.H +++ b/src/usr/errl/errlsctn.H @@ -82,6 +82,46 @@ public: */ compId_t compId() const; + + /** + * @brief Appends data to the section + * Grows the section by the given amount + * + * @param[in] i_data Pointer to data source + * @param[in] i_size Data size (bytes) + * + * @return Size of new data or else zero on error. + */ + uint64_t addData(const void *i_data, const uint64_t i_size); + + + /** + * @brief Get flattened size. Typically called prior to flatten(). + * Allocate space for the flat data, then call flatten(). These + * functions commonly used by ErrlManager when committing error + * logs. + * + * @return size + * + */ + uint64_t flattenedSize(); + + /** + * @brief Get flattened data. + * + * @param[in,out] io_pBuffer Pointer to memory where flattened + * error log will go. + * @param[in] i_cbBuffer Count of bytes of memory available + * at io_pBuffer. Caller should ensure there is enough memory + * available by calling flattenedSize() first. + * + * @return Count of bytes flattened. + * + */ + uint64_t flatten( void * io_pBuffer, const uint64_t i_cbBuffer ); + + + private: /** @@ -90,8 +130,14 @@ private: ErrlSctn(const ErrlSctn& i_right); ErrlSctn& operator=(const ErrlSctn& i_right); - // Section header - ErrlSctnHdr iv_header; + // A section header object for this section. + ErrlSctnHdr iv_ErrlSctnHdr; + + // Pointer to user-added data + uint8_t* iv_pData; + + // Count of bytes of user-added data + uint64_t iv_cbData; }; @@ -103,25 +149,28 @@ private: //////////////////////////////////////////////////////////////////////////// inline uint8_t ErrlSctn::sctnVer() const { - return iv_header.iv_sctnVer; + return iv_ErrlSctnHdr.iv_sctnVer; } //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// inline uint8_t ErrlSctn::subSect() const { - return iv_header.iv_subSect; + return iv_ErrlSctnHdr.iv_subSect; } //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// inline compId_t ErrlSctn::compId() const { - return iv_header.iv_compId; + return iv_ErrlSctnHdr.iv_compId; } + + } // End namespace + #endif //ERRLSCTN_H |