aboutsummaryrefslogtreecommitdiff
path: root/doc/error-logging.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/error-logging.html')
-rw-r--r--doc/error-logging.html155
1 files changed, 75 insertions, 80 deletions
diff --git a/doc/error-logging.html b/doc/error-logging.html
index c151951..ecc74bf 100644
--- a/doc/error-logging.html
+++ b/doc/error-logging.html
@@ -1,21 +1,20 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml">
+<html>
<head>
- <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>How to log errors on OPAL &#8212; skiboot d6d8386
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
+
+ <title>How to log errors on OPAL &#8212; skiboot e6cda17
documentation</title>
- <link rel="stylesheet" href="_static/classic.css" type="text/css" />
- <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+ <link rel="stylesheet" type="text/css" href="_static/pygments.css" />
+ <link rel="stylesheet" type="text/css" href="_static/classic.css" />
- <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
- <script type="text/javascript" src="_static/jquery.js"></script>
- <script type="text/javascript" src="_static/underscore.js"></script>
- <script type="text/javascript" src="_static/doctools.js"></script>
- <script type="text/javascript" src="_static/language_data.js"></script>
+ <script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
+ <script src="_static/jquery.js"></script>
+ <script src="_static/underscore.js"></script>
+ <script src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
@@ -34,8 +33,9 @@
<li class="right" >
<a href="console-log.html" title="SkiBoot Console Log"
accesskey="P">previous</a> |</li>
- <li class="nav-item nav-item-0"><a href="index.html">skiboot d6d8386
- documentation</a> &#187;</li>
+ <li class="nav-item nav-item-0"><a href="index.html">skiboot e6cda17
+ documentation</a> &#187;</li>
+ <li class="nav-item nav-item-this"><a href="">How to log errors on OPAL</a></li>
</ul>
</div>
@@ -44,7 +44,7 @@
<div class="bodywrapper">
<div class="body" role="main">
- <div class="section" id="how-to-log-errors-on-opal">
+ <section id="how-to-log-errors-on-opal">
<h1>How to log errors on OPAL<a class="headerlink" href="#how-to-log-errors-on-opal" title="Permalink to this headline">¶</a></h1>
<p>Currently the errors reported by OPAL interfaces are in free form, where as
errors reported by service processor is in standard Platform Error Log (PEL)
@@ -58,22 +58,23 @@ error-logging interfaces outlined below. Following which, PEL structure is
generated based on the input and then passed on to service processor.</p>
<p>We do create eSEL error log format for some service processors but it’s just
a wrapper around PEL format. Actual data still stays in PEL format.</p>
-<div class="section" id="error-logging-interfaces-in-opal">
+<section id="error-logging-interfaces-in-opal">
<h2>Error logging interfaces in OPAL<a class="headerlink" href="#error-logging-interfaces-in-opal" title="Permalink to this headline">¶</a></h2>
<p>Interfaces are provided for the user to log/report an error in OPAL. Using
these interfaces relevant error information is collected and later converted
to PEL format and then pushed to service processor.</p>
<p>Step 1: To report an error, invoke <code class="docutils literal notranslate"><span class="pre">opal_elog_create()</span></code> with required argument.</p>
<blockquote>
-<div><code class="docutils literal notranslate"><span class="pre">struct</span> <span class="pre">errorlog</span> <span class="pre">*opal_elog_create(struct</span> <span class="pre">opal_err_info</span> <span class="pre">*e_info,</span> <span class="pre">uint32_t</span> <span class="pre">tag);</span></code></div></blockquote>
+<div><p><code class="docutils literal notranslate"><span class="pre">struct</span> <span class="pre">errorlog</span> <span class="pre">*opal_elog_create(struct</span> <span class="pre">opal_err_info</span> <span class="pre">*e_info,</span> <span class="pre">uint32_t</span> <span class="pre">tag);</span></code></p>
+</div></blockquote>
<p>Parameters:</p>
<blockquote>
<div><ul class="simple">
-<li><code class="docutils literal notranslate"><span class="pre">struct</span> <span class="pre">opal_err_info</span> <span class="pre">*e_info</span></code>
-Struct to hold information identifying error/event source.</li>
-<li><dl class="first docutils">
-<dt><code class="docutils literal notranslate"><span class="pre">uint32_t</span> <span class="pre">tag:</span></code> Unique value to identify the data.</dt>
-<dd>Ideal to have ASCII value for 4-byte string.</dd>
+<li><p><code class="docutils literal notranslate"><span class="pre">struct</span> <span class="pre">opal_err_info</span> <span class="pre">*e_info</span></code>
+Struct to hold information identifying error/event source.</p></li>
+<li><dl class="simple">
+<dt><code class="docutils literal notranslate"><span class="pre">uint32_t</span> <span class="pre">tag:</span></code> Unique value to identify the data.</dt><dd><p>Ideal to have ASCII value for 4-byte string.</p>
+</dd>
</dl>
</li>
</ul>
@@ -166,34 +167,31 @@ listed in <code class="docutils literal notranslate"><span class="pre">include/e
<span class="c1">#define OPAL_ABNORMAL_POWER_OFF 0xE0</span>
</pre></div>
</div>
-<dl class="docutils">
-<dt><code class="docutils literal notranslate"><span class="pre">uint8_t</span> <span class="pre">opal_srctype</span></code>: SRC type, value should be OPAL_SRC_TYPE_ERROR.</dt>
-<dd><p class="first">SRC refers to System Reference Code.
+<dl>
+<dt><code class="docutils literal notranslate"><span class="pre">uint8_t</span> <span class="pre">opal_srctype</span></code>: SRC type, value should be OPAL_SRC_TYPE_ERROR.</dt><dd><p>SRC refers to System Reference Code.
It is 4 byte hexa-decimal number that reflects the
current system state.
Eg: BB821010,</p>
<ul class="simple">
-<li>1st byte -&gt; BB -&gt; SRC Type</li>
-<li>2nd byte -&gt; 82 -&gt; Subsystem</li>
-<li>3rd, 4th byte -&gt; Component ID and Reason Code</li>
+<li><p>1st byte -&gt; BB -&gt; SRC Type</p></li>
+<li><p>2nd byte -&gt; 82 -&gt; Subsystem</p></li>
+<li><p>3rd, 4th byte -&gt; Component ID and Reason Code</p></li>
</ul>
-<p class="last">SRC needs to be generated on the fly depending on the state
+<p>SRC needs to be generated on the fly depending on the state
of the system. All the parameters needed to generate a SRC
should be provided during reporting of an event/error.</p>
</dd>
-<dt><code class="docutils literal notranslate"><span class="pre">uint32_t</span> <span class="pre">reason_code</span></code>: Reason for failure as stated in <code class="docutils literal notranslate"><span class="pre">include/errorlog.h</span></code> for OPAL.</dt>
-<dd><p class="first">Eg: Reason code for code-update failures can be</p>
-<ul class="last simple">
-<li><code class="docutils literal notranslate"><span class="pre">OPAL_RC_CU_INIT</span></code> -&gt; Initialisation failure</li>
-<li><code class="docutils literal notranslate"><span class="pre">OPAL_RC_CU_FLASH</span></code> -&gt; Flash failure</li>
+<dt><code class="docutils literal notranslate"><span class="pre">uint32_t</span> <span class="pre">reason_code</span></code>: Reason for failure as stated in <code class="docutils literal notranslate"><span class="pre">include/errorlog.h</span></code> for OPAL.</dt><dd><p>Eg: Reason code for code-update failures can be</p>
+<ul class="simple">
+<li><p><code class="docutils literal notranslate"><span class="pre">OPAL_RC_CU_INIT</span></code> -&gt; Initialisation failure</p></li>
+<li><p><code class="docutils literal notranslate"><span class="pre">OPAL_RC_CU_FLASH</span></code> -&gt; Flash failure</p></li>
</ul>
</dd>
</dl>
</div></blockquote>
-<dl class="docutils">
-<dt>Step 2: Data can be appended to the user data section using the either of</dt>
-<dd><p class="first">the below two interfaces:</p>
-<div class="last highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">void</span> <span class="n">log_append_data</span><span class="p">(</span><span class="n">struct</span> <span class="n">errorlog</span> <span class="o">*</span><span class="n">buf</span><span class="p">,</span> <span class="n">unsigned</span> <span class="n">char</span> <span class="o">*</span><span class="n">data</span><span class="p">,</span>
+<dl>
+<dt>Step 2: Data can be appended to the user data section using the either of</dt><dd><p>the below two interfaces:</p>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">void</span> <span class="n">log_append_data</span><span class="p">(</span><span class="n">struct</span> <span class="n">errorlog</span> <span class="o">*</span><span class="n">buf</span><span class="p">,</span> <span class="n">unsigned</span> <span class="n">char</span> <span class="o">*</span><span class="n">data</span><span class="p">,</span>
<span class="n">uint16_t</span> <span class="n">size</span><span class="p">);</span>
</pre></div>
</div>
@@ -221,16 +219,15 @@ user data section of the error log.</p>
<p>Parameters:</p>
<blockquote>
<div><p><code class="docutils literal notranslate"><span class="pre">struct</span> <span class="pre">opal_errorlog</span> <span class="pre">*buf</span></code>: pointer returned by <code class="docutils literal notranslate"><span class="pre">opal_elog_create()</span></code> call.</p>
-<dl class="docutils">
-<dt><code class="docutils literal notranslate"><span class="pre">uint32_t</span> <span class="pre">tag</span></code>: Unique value to identify the data.</dt>
-<dd>Ideal to have ASCII value for 4-byte string.</dd>
+<dl class="simple">
+<dt><code class="docutils literal notranslate"><span class="pre">uint32_t</span> <span class="pre">tag</span></code>: Unique value to identify the data.</dt><dd><p>Ideal to have ASCII value for 4-byte string.</p>
+</dd>
</dl>
</div></blockquote>
-<dl class="docutils">
-<dt>Step 3: There is a platform hook for the OPAL error log to be committed on any</dt>
-<dd><p class="first">service processor(Currently used for FSP and BMC based machines).</p>
+<dl>
+<dt>Step 3: There is a platform hook for the OPAL error log to be committed on any</dt><dd><p>service processor(Currently used for FSP and BMC based machines).</p>
<p>Below is snippet of the code of how this hook is called.</p>
-<div class="last highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">void</span> <span class="n">log_commit</span><span class="p">(</span><span class="n">struct</span> <span class="n">errorlog</span> <span class="o">*</span><span class="n">elog</span><span class="p">)</span>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">void</span> <span class="n">log_commit</span><span class="p">(</span><span class="n">struct</span> <span class="n">errorlog</span> <span class="o">*</span><span class="n">elog</span><span class="p">)</span>
<span class="p">{</span>
<span class="o">....</span>
<span class="o">....</span>
@@ -247,8 +244,7 @@ user data section of the error log.</p>
</pre></div>
</div>
</dd>
-<dt>Step 3.1 FSP:</dt>
-<dd><div class="first highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">.</span><span class="n">elog_commit</span> <span class="o">=</span> <span class="n">elog_fsp_commit</span>
+<dt>Step 3.1 FSP:</dt><dd><div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">.</span><span class="n">elog_commit</span> <span class="o">=</span> <span class="n">elog_fsp_commit</span>
</pre></div>
</div>
<p>Once all the data for an error is logged in, the error needs to
@@ -257,12 +253,11 @@ be committed in FSP.</p>
internally converted to PEL format and then pushed to the FSP.
FSP then take cares of sending all logs including its own and
OPAL’s one to the POWERNV.</p>
-<p class="last">OPAL maintains timeout field for all error logs it is sending to
+<p>OPAL maintains timeout field for all error logs it is sending to
FSP. If it is not logged within allotted time period (e.g if FSP
is down), in that case OPAL sends those logs to POWERNV.</p>
</dd>
-<dt>Step 3.2 BMC:</dt>
-<dd><div class="first highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">.</span><span class="n">elog_commit</span> <span class="o">=</span> <span class="n">ipmi_elog_commit</span>
+<dt>Step 3.2 BMC:</dt><dd><div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">.</span><span class="n">elog_commit</span> <span class="o">=</span> <span class="n">ipmi_elog_commit</span>
</pre></div>
</div>
<p>In case of BMC machines, error logs are first converted to eSEL format.
@@ -285,7 +280,7 @@ i.e:</p>
<span class="p">}</span>
</pre></div>
</div>
-<p class="last">After filling up the SEL header fields, OPAL copies the error log
+<p>After filling up the SEL header fields, OPAL copies the error log
PEL data after the header section in the error log buffer. Then using
IPMI interface, eSEL gets logged in BMC.</p>
</dd>
@@ -305,17 +300,17 @@ so using just the simple error logging interface.</p>
<p>Using the reason code, an error log is generated with the information derived
from the look-up table, populated and committed to service processor. All of it
is done with just one call.</p>
-</div>
-</div>
-<div class="section" id="error-logging-retrieval-from-fsp">
+</section>
+</section>
+<section id="error-logging-retrieval-from-fsp">
<h1>Error logging retrieval from FSP:<a class="headerlink" href="#error-logging-retrieval-from-fsp" title="Permalink to this headline">¶</a></h1>
<p>FSP sends error log notification to OPAL via mailbox protocol.</p>
<p>OPAL maintains below lists:</p>
<ul class="simple">
-<li>Free list : List of free nodes.</li>
-<li>Pending list : List of nodes which is yet to be read by the POWERNV.</li>
-<li>Processed list : List of nodes which has been read but still waiting for
-acknowledgement.</li>
+<li><p>Free list : List of free nodes.</p></li>
+<li><p>Pending list : List of nodes which is yet to be read by the POWERNV.</p></li>
+<li><p>Processed list : List of nodes which has been read but still waiting for
+acknowledgement.</p></li>
</ul>
<p>Below is the structure of the node:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">struct</span> <span class="n">fsp_log_entry</span> <span class="p">{</span>
@@ -353,7 +348,7 @@ moves to <code class="docutils literal notranslate"><span class="pre">ELOG_STATE
call to OPAL, which in turn sends the acknowledgement mbox message to FSP and
moves error log id from processed list to again back to free node list and this
process goes on every FSP error log.</p>
-<div class="section" id="design-constraints">
+<section id="design-constraints">
<h2>Design constraints:<a class="headerlink" href="#design-constraints" title="Permalink to this headline">¶</a></h2>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1">#define ELOG_READ_MAX_RECORD 128</span>
</pre></div>
@@ -368,18 +363,18 @@ upto FSP when it notifies again to OPAL about the discarded error log.</p>
<p>There is also limitation on the number of OPAL error logs OPAL can hold is 64.
If it is run out of the buffers in the pool, it will log the message saying
‘Failed to get the buffer’.</p>
-</div>
-<div class="section" id="note">
+</section>
+<section id="note">
<h2>Note<a class="headerlink" href="#note" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
-<li>For more information regarding error logging and PEL format
-refer to PAPR doc and P7 PEL and SRC PLDD document.</li>
-<li>Refer to <code class="docutils literal notranslate"><span class="pre">include/errorlog.h</span></code> for all the error logging
+<li><p>For more information regarding error logging and PEL format
+refer to PAPR doc and P7 PEL and SRC PLDD document.</p></li>
+<li><p>Refer to <code class="docutils literal notranslate"><span class="pre">include/errorlog.h</span></code> for all the error logging
interface parameters and <code class="docutils literal notranslate"><span class="pre">include/pel.h</span></code> for PEL
-structures.</li>
+structures.</p></li>
</ul>
-</div>
-<div class="section" id="sample-error-logging">
+</section>
+<section id="sample-error-logging">
<h2>Sample error logging<a class="headerlink" href="#sample-error-logging" title="Permalink to this headline">¶</a></h2>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="n">DEFINE_LOG_ENTRY</span><span class="p">(</span><span class="n">OPAL_RC_ATTN</span><span class="p">,</span> <span class="n">OPAL_PLATFORM_ERR_EVT</span><span class="p">,</span> <span class="n">OPAL_ATTN</span><span class="p">,</span>
<span class="n">OPAL_PLATFORM_FIRMWARE</span><span class="p">,</span> <span class="n">OPAL_PREDICTIVE_ERR_GENERAL</span><span class="p">,</span>
@@ -427,8 +422,8 @@ structures.</li>
<span class="p">}</span>
</pre></div>
</div>
-</div>
-<div class="section" id="sample-output-pel-dump-got-from-fsp">
+</section>
+<section id="sample-output-pel-dump-got-from-fsp">
<h2>Sample output PEL dump got from FSP<a class="headerlink" href="#sample-output-pel-dump-got-from-fsp" title="Permalink to this headline">¶</a></h2>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ errl -d -x 0x533C9B37
| 00000000 50480030 01004154 20150728 02000500 PH.0..AT ..(.... |
@@ -562,10 +557,11 @@ structures.</li>
|------------------------------------------------------------------------------|
</pre></div>
</div>
-</div>
-</div>
+</section>
+</section>
+ <div class="clearer"></div>
</div>
</div>
</div>
@@ -600,17 +596,15 @@ structures.</li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
- <h3>Quick search</h3>
+ <h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
- <input type="text" name="q" />
+ <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
- <input type="hidden" name="check_keywords" value="yes" />
- <input type="hidden" name="area" value="default" />
</form>
</div>
</div>
-<script type="text/javascript">$('#searchbox').show(0);</script>
+<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
@@ -627,13 +621,14 @@ structures.</li>
<li class="right" >
<a href="console-log.html" title="SkiBoot Console Log"
>previous</a> |</li>
- <li class="nav-item nav-item-0"><a href="index.html">skiboot d6d8386
- documentation</a> &#187;</li>
+ <li class="nav-item nav-item-0"><a href="index.html">skiboot e6cda17
+ documentation</a> &#187;</li>
+ <li class="nav-item nav-item-this"><a href="">How to log errors on OPAL</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2016-2017, IBM, others.
- Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.8.5.
+ Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.3.2.
</div>
</body>
</html> \ No newline at end of file