diff options
| author | Patrick Williams <iawillia@us.ibm.com> | 2014-03-27 16:13:16 -0500 |
|---|---|---|
| committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-04-03 14:54:26 -0500 |
| commit | cadf4e34157e599e1352de1d93ec406f3a2759a9 (patch) | |
| tree | dc672595fd53376a4f9632cdb5df48dd0e11ed44 /src/include/usr/errl | |
| parent | 42a3149689b527253a20dd9067be38bcbc4855d5 (diff) | |
| download | blackbird-hostboot-cadf4e34157e599e1352de1d93ec406f3a2759a9.tar.gz blackbird-hostboot-cadf4e34157e599e1352de1d93ec406f3a2759a9.zip | |
Add printk error log UD and collect on task crash.
- Create a new UserDetails section for error log.
- Modify initservice utility for launching tasks (shared by
initservice and istepdispatcher) to collect this when a
task has crashed.
Change-Id: I1273457fcc3879b9e2ca91b636281225a8f79136
CQ: SW254145
Backport: release-fips810
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/9985
Tested-by: Jenkins Server
Reviewed-by: Andrew J. Geissler <andrewg@us.ibm.com>
Reviewed-by: STEPHEN M. CPREK <smcprek@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr/errl')
| -rw-r--r-- | src/include/usr/errl/errlreasoncodes.H | 1 | ||||
| -rw-r--r-- | src/include/usr/errl/errludprintk.H | 69 |
2 files changed, 70 insertions, 0 deletions
diff --git a/src/include/usr/errl/errlreasoncodes.H b/src/include/usr/errl/errlreasoncodes.H index f4cac6249..2a3a690ba 100644 --- a/src/include/usr/errl/errlreasoncodes.H +++ b/src/include/usr/errl/errlreasoncodes.H @@ -70,6 +70,7 @@ namespace ERRORLOG ERRL_UDT_ATTRIBUTE = 0x04, ERRL_UDT_LOGREGISTER = 0x05, ERRL_UDT_CALLOUT = 0x06, + ERRL_UDT_PRINTK = 0x07, }; }; diff --git a/src/include/usr/errl/errludprintk.H b/src/include/usr/errl/errludprintk.H new file mode 100644 index 000000000..5717169ae --- /dev/null +++ b/src/include/usr/errl/errludprintk.H @@ -0,0 +1,69 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/errl/errludprintk.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 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 ERRL_UDPRINTK_H +#define ERRL_UDPRINTK_H + +/** + * @file errludprintk.H + * + * Defines the ErrlUserDetailsPrintk class that adds a portion of the printk + * buffers as FFDC to an error log as user detail data. + */ + +#include <stdint.h> +#include <errl/errluserdetails.H> + +namespace ERRORLOG +{ + + class ErrlUserDetailsPrintk : public ErrlUserDetails + { + public: + enum { DEFAULT_SIZE_BYTES = 256 }; + + /** @brief Constructor + * + * Captures the printk buffer. + * + * @param[in] i_size - Amount (in bytes) of data to capture. + */ + explicit ErrlUserDetailsPrintk(size_t i_size = DEFAULT_SIZE_BYTES) + { + _capturePrintk(i_size); + } + + /** @brief Destructor + */ + virtual ~ErrlUserDetailsPrintk() {}; + + private: + //Disabled. + ErrlUserDetailsPrintk(const ErrlUserDetailsPrintk&); + ErrlUserDetailsPrintk& operator=(const ErrlUserDetailsPrintk&); + + void _capturePrintk(size_t); + }; + +} + +#endif |

