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

186 lines
13 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>Shell Interface &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="Source Level Debugging with Intel(R) SVT CCA" href="debugging-with-cca.html" />
<link rel="prev" title="Boot Performance" href="boot-performance.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 current"><a class="current reference internal" href="#">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"><a class="reference internal" href="logging.html">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">Shell Interface</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="shell-interface">
<h1>Shell Interface<a class="headerlink" href="#shell-interface" title="Permalink to this heading"></a></h1>
<p>SBL comes with a built-in shell interface for diagnosis and debugging purpose. It allows one to examine platform state (e.g., dump memory content, PCI configuration registers, etc.), change boot configuration and trouble shoot before launching OS.</p>
<p>Developers can also add their own shell commands for unit testing.</p>
<p>To enter shell interface, press any key after reboot and before OS is launched.</p>
<p>Built-in shell commands:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Shell</span><span class="o">&gt;</span> <span class="n">help</span>
<span class="n">boot</span> <span class="o">-</span> <span class="n">Print</span> <span class="ow">or</span> <span class="n">modify</span> <span class="n">the</span> <span class="n">OS</span> <span class="n">boot</span> <span class="n">option</span> <span class="nb">list</span>
<span class="n">cdata</span> <span class="o">-</span> <span class="n">Display</span> <span class="n">configuration</span> <span class="n">data</span><span class="o">.</span>
<span class="bp">cls</span> <span class="o">-</span> <span class="n">Clear</span> <span class="n">console</span>
<span class="n">cpuid</span> <span class="o">-</span> <span class="n">Read</span> <span class="n">CPU</span> <span class="n">specific</span> <span class="n">information</span>
<span class="n">dmesg</span> <span class="o">-</span> <span class="n">Print</span> <span class="n">messages</span> <span class="n">stored</span> <span class="ow">in</span> <span class="n">boot</span> <span class="n">log</span> <span class="n">buffer</span>
<span class="n">exit</span> <span class="o">-</span> <span class="n">Exit</span> <span class="n">the</span> <span class="n">shell</span>
<span class="n">fs</span> <span class="o">-</span> <span class="n">filesystem</span> <span class="n">access</span> <span class="n">command</span>
<span class="n">fwupdate</span> <span class="o">-</span> <span class="n">Initiate</span> <span class="n">Firmware</span> <span class="n">Update</span>
<span class="n">help</span> <span class="o">-</span> <span class="n">List</span> <span class="n">supported</span> <span class="n">commands</span>
<span class="n">hob</span> <span class="o">-</span> <span class="n">List</span> <span class="n">HOBs</span>
<span class="n">mm</span> <span class="o">-</span> <span class="n">Read</span> <span class="ow">or</span> <span class="n">write</span> <span class="n">memory</span><span class="p">,</span> <span class="n">PCI</span> <span class="n">config</span> <span class="n">space</span><span class="p">,</span> <span class="ow">or</span> <span class="n">IO</span> <span class="n">ports</span>
<span class="n">mmap</span> <span class="o">-</span> <span class="n">Display</span> <span class="n">memory</span> <span class="nb">map</span>
<span class="n">mmcdll</span> <span class="o">-</span> <span class="n">Tune</span> <span class="ow">or</span> <span class="nb">print</span> <span class="n">MMC</span> <span class="n">DLL</span> <span class="n">data</span>
<span class="n">msr</span> <span class="o">-</span> <span class="n">Read</span> <span class="ow">or</span> <span class="n">write</span> <span class="n">model</span> <span class="n">specific</span> <span class="n">registers</span>
<span class="n">mtrr</span> <span class="o">-</span> <span class="n">Display</span> <span class="n">current</span> <span class="n">MTRR</span> <span class="n">configuration</span>
<span class="n">pappend</span> <span class="o">-</span> <span class="n">Append</span> <span class="n">extra</span> <span class="n">parameters</span> <span class="n">to</span> <span class="n">the</span> <span class="n">boot</span> <span class="n">option</span><span class="s1">&#39;s command line</span>
<span class="n">pci</span> <span class="o">-</span> <span class="n">Display</span> <span class="n">PCI</span> <span class="n">devices</span>
<span class="n">perf</span> <span class="o">-</span> <span class="n">Display</span> <span class="n">performance</span> <span class="n">data</span>
<span class="n">reset</span> <span class="o">-</span> <span class="n">Reset</span> <span class="n">the</span> <span class="n">system</span>
<span class="n">ucode</span> <span class="o">-</span> <span class="n">Display</span> <span class="n">microcode</span> <span class="n">version</span>
<span class="n">usbdev</span> <span class="o">-</span> <span class="n">Display</span> <span class="n">USB</span> <span class="n">Devices</span>
</pre></div>
</div>
<p>Use -h to get help message for a command.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>For small image footprint or security reasons, one can exclude shell module from SBL in release builds.</p>
</div>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="boot-performance.html" class="btn btn-neutral float-left" title="Boot Performance" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="debugging-with-cca.html" class="btn btn-neutral float-right" title="Source Level Debugging with Intel(R) SVT CCA" 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 Mar 06, 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>