Files
slimbootloader.github.io/developer-guides/logging.html

214 lines
12 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Logging &mdash; Slim Bootloader 1.0 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/graphviz.css" type="text/css" />
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
<link rel="shortcut icon" href="../_static/sbl_logo_blue_32x32_icon.ico"/>
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script src="../_static/jquery.js"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/sphinx_highlight.js"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Contribution Guidelines" href="contributions.html" />
<link rel="prev" title="Source Level Debugging with Intel(R) UDK Debugger" href="debugging-with-udk.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home">
Slim Bootloader
<img src="../_static/sbl_logo_white_200x200.png" class="logo" alt="Logo"/>
</a>
<div class="version">
1.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../introduction/index.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../getting-started/index.html">Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="../supported-hardware/index.html">Supported Hardware</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Developers Guide</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="source-tree.html">Source Tree Structure</a></li>
<li class="toctree-l2"><a class="reference internal" href="build-system.html">Build System</a></li>
<li class="toctree-l2"><a class="reference internal" href="stitching-ifwi.html">Stitch IFWI Image</a></li>
<li class="toctree-l2"><a class="reference internal" href="fsp.html">Firmware Support Package</a></li>
<li class="toctree-l2"><a class="reference internal" href="boot-flow.html">Boot Flow</a></li>
<li class="toctree-l2"><a class="reference internal" href="boot-flow.html#ldrglobal-loader-global-data">LdrGlobal - Loader Global Data</a></li>
<li class="toctree-l2"><a class="reference internal" href="boot-flow.html#end-to-end-call-graph">End-to-End Call Graph</a></li>
<li class="toctree-l2"><a class="reference internal" href="boot-flow.html#platform-initialization">Platform Initialization</a></li>
<li class="toctree-l2"><a class="reference internal" href="flashmap.html">Flash Map</a></li>
<li class="toctree-l2"><a class="reference internal" href="memory-map.html">Memory Map</a></li>
<li class="toctree-l2"><a class="reference internal" href="configuration.html">Configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="payload.html">Payloads</a></li>
<li class="toctree-l2"><a class="reference internal" href="osloader.html">OsLoader</a></li>
<li class="toctree-l2"><a class="reference internal" href="bootimage.html">Boot Image</a></li>
<li class="toctree-l2"><a class="reference internal" href="boot-options.html">Boot Options</a></li>
<li class="toctree-l2"><a class="reference internal" href="flash-boot.html">Boot from Flash</a></li>
<li class="toctree-l2"><a class="reference internal" href="versioning.html">Versioning</a></li>
<li class="toctree-l2"><a class="reference internal" href="boot-performance.html">Boot Performance</a></li>
<li class="toctree-l2"><a class="reference internal" href="shell.html">Shell Interface</a></li>
<li class="toctree-l2"><a class="reference internal" href="debugging-with-cca.html">Source Level Debugging with Intel(R) SVT CCA</a></li>
<li class="toctree-l2"><a class="reference internal" href="debugging-with-udk.html">Source Level Debugging with Intel(R) UDK Debugger</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Logging</a></li>
<li class="toctree-l2"><a class="reference internal" href="contributions.html">Contribution Guidelines</a></li>
<li class="toctree-l2"><a class="reference internal" href="ingredients-update.html">Ingredients upgrade</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../security/index.html">Security Features</a></li>
<li class="toctree-l1"><a class="reference internal" href="../how-tos/index.html">How-Tos</a></li>
<li class="toctree-l1"><a class="reference internal" href="../tools/index.html">Tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="../tutorials/index.html">Tutorials</a></li>
<li class="toctree-l1"><a class="reference internal" href="../specs/index.html">Specifications</a></li>
<li class="toctree-l1"><a class="reference internal" href="../references/references.html">References and Links</a></li>
<li class="toctree-l1"><a class="reference internal" href="../references/terminology.html">Terminology and Acronyms</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">Slim Bootloader</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="index.html">Developers Guide</a></li>
<li class="breadcrumb-item active">Logging</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="logging">
<span id="id1"></span><h1>Logging<a class="headerlink" href="#logging" title="Permalink to this heading"></a></h1>
<p>SBL provides logging for debugging purpose. It can be configured at build time
for verbosity. One can control debug messages in multiple ways by modifying the following PCDs defined in <code class="docutils literal notranslate"><span class="pre">BootloaderCorePkg.yaml</span></code> file:</p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>PCD Name</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>PcdFixedDebugPrintErrorLevel</p></td>
<td><p>Build time debug message level compiled into the image</p></td>
</tr>
<tr class="row-odd"><td><p>PcdDebugPropertyMask</p></td>
<td><p>Runtime debug message level sent to the console</p></td>
</tr>
<tr class="row-even"><td><p>PcdDebugOutputDeviceMask</p></td>
<td><p>Debug output destinations: serial console or log buffer</p></td>
</tr>
</tbody>
</table>
<p>Commonly used definitions for these PCDs are listed here.</p>
<p><code class="docutils literal notranslate"><span class="pre">PcdFixedDebugPrintErrorLevel</span></code> definitions:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1">#define DEBUG_INIT 0x00000001 // Initialization</span>
<span class="c1">#define DEBUG_WARN 0x00000002 // Warnings</span>
<span class="c1">#define DEBUG_INFO 0x00000040 // Informational debug messages</span>
<span class="c1">#define DEBUG_VERBOSE 0x00400000 // Detailed debug messages that may</span>
<span class="o">//</span> <span class="n">significantly</span> <span class="n">impact</span> <span class="n">boot</span> <span class="n">performance</span>
<span class="c1">#define DEBUG_ERROR 0x80000000 // Error</span>
</pre></div>
</div>
<p><code class="docutils literal notranslate"><span class="pre">PcdDebugPropertyMask</span></code> definitions:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1">#define DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED 0x01</span>
<span class="c1">#define DEBUG_PROPERTY_DEBUG_PRINT_ENABLED 0x02</span>
<span class="c1">#define DEBUG_PROPERTY_DEBUG_CODE_ENABLED 0x04</span>
<span class="c1">#define DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED 0x08</span>
<span class="c1">#define DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED 0x10</span>
<span class="c1">#define DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED 0x20</span>
</pre></div>
</div>
<p><code class="docutils literal notranslate"><span class="pre">PcdDebugOutputDeviceMask</span></code> definitions:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1">#define DEBUG_OUTPUT_DEVICE_LOG_BUFFER BIT0</span>
<span class="c1">#define DEBUG_OUTPUT_DEVICE_SERIAL_PORT BIT1</span>
</pre></div>
</div>
<p>For more details, see <code class="docutils literal notranslate"><span class="pre">DebugLib.h</span></code> and <code class="docutils literal notranslate"><span class="pre">LoaderPlatformDataGuid.h</span></code>.</p>
<p>An example of minimum debug output from SBL release build on QEMU emulator:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Intel</span> <span class="n">Slim</span> <span class="n">Bootloader</span>
<span class="n">SBID</span><span class="p">:</span> <span class="n">SB_QEMU</span>
<span class="n">ISVN</span><span class="p">:</span> <span class="mi">00001</span>
<span class="n">IVER</span><span class="p">:</span> <span class="mf">000.00001.11095</span>
<span class="n">BOOT</span><span class="p">:</span> <span class="n">BP0</span>
<span class="n">MODE</span><span class="p">:</span> <span class="mi">0</span>
<span class="n">BoardID</span><span class="p">:</span> <span class="mi">00</span>
<span class="n">Memory</span> <span class="n">Init</span>
<span class="n">PCI</span> <span class="n">Enum</span>
<span class="n">ACPI</span> <span class="n">Init</span>
<span class="n">MP</span> <span class="n">InitJump</span> <span class="n">to</span> <span class="n">payload</span>
<span class="n">Payload</span> <span class="n">startup</span>
</pre></div>
</div>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="debugging-with-udk.html" class="btn btn-neutral float-left" title="Source Level Debugging with Intel(R) UDK Debugger" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="contributions.html" class="btn btn-neutral float-right" title="Contribution Guidelines" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2018 - 2025, Intel Corporation.
<span class="lastupdated">Last updated on Jun 24, 2025.
</span></p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>