Files
slimbootloader.github.io/how-tos/configure-memory-down.html

208 lines
17 KiB
HTML
Raw Permalink 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>Configure Memory Down &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="Capture Boot Time Data" href="collect-time-logs.html" />
<link rel="prev" title="PXE Boot Through U-Boot Payload" href="boot-pxe-uboot.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"><a class="reference internal" href="../developer-guides/index.html">Developers Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../security/index.html">Security Features</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">How-Tos</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="customize-build.html">Customize Build</a></li>
<li class="toctree-l2"><a class="reference internal" href="change-boot-option.html">Change Boot Options</a></li>
<li class="toctree-l2"><a class="reference internal" href="enable-verified-boot.html">Enable Verified Boot</a></li>
<li class="toctree-l2"><a class="reference internal" href="enable-intel-tcc.html">Intel® TCC enable</a></li>
<li class="toctree-l2"><a class="reference internal" href="enable-intel-tsn.html">TSN</a></li>
<li class="toctree-l2"><a class="reference internal" href="enable-tsn-gbe-sgmii.html">Enable TSN GbE SGMII</a></li>
<li class="toctree-l2"><a class="reference internal" href="enable-pre-os-payload.html">Enable Pre-OS Payload Support</a></li>
<li class="toctree-l2"><a class="reference internal" href="reduce-debug-message.html">Reduce debug messages</a></li>
<li class="toctree-l2"><a class="reference internal" href="add-new-library.html">Add New Library</a></li>
<li class="toctree-l2"><a class="reference internal" href="add-new-payload.html">Create New Payload</a></li>
<li class="toctree-l2"><a class="reference internal" href="add-new-payload.html#helloworld-payload">HelloWorld Payload</a></li>
<li class="toctree-l2"><a class="reference internal" href="integrate-multiple-payloads.html">Integrate Multiple Payloads</a></li>
<li class="toctree-l2"><a class="reference internal" href="create-container-boot-image.html">Create Container Boot Image</a></li>
<li class="toctree-l2"><a class="reference internal" href="create-ias-boot-image.html">Create IAS Boot Image</a></li>
<li class="toctree-l2"><a class="reference internal" href="boot-windows.html">Boot Windows with UEFI Payload</a></li>
<li class="toctree-l2"><a class="reference internal" href="boot-netboot.html">Netboot / PXE boot with UEFI Payload</a></li>
<li class="toctree-l2"><a class="reference internal" href="boot-ubuntu.html">Boot Ubuntu</a></li>
<li class="toctree-l2"><a class="reference internal" href="boot-ubuntu.html#setup-spn-os-container-boot">Setup SBL OS Container Boot</a></li>
<li class="toctree-l2"><a class="reference internal" href="boot-vxworks.html">Boot VxWorks</a></li>
<li class="toctree-l2"><a class="reference internal" href="boot-zephyr.html">Boot Zephyr</a></li>
<li class="toctree-l2"><a class="reference internal" href="boot-micropython.html">Boot MicroPython</a></li>
<li class="toctree-l2"><a class="reference internal" href="boot-with-linux-payload.html">Boot Linux as a Payload</a></li>
<li class="toctree-l2"><a class="reference internal" href="boot-with-u-boot-payload.html">Boot Linux with U-Boot Payload</a></li>
<li class="toctree-l2"><a class="reference internal" href="boot-pxe-uboot.html">PXE Boot Through U-Boot Payload</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Configure Memory Down</a></li>
<li class="toctree-l2"><a class="reference internal" href="collect-time-logs.html">Capture Boot Time Data</a></li>
<li class="toctree-l2"><a class="reference internal" href="configure_gpio.html">GPIO / CFIO Configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="configure_gpio.html#run-gengpiodata-tool">Run GenGpioData Tool</a></li>
<li class="toctree-l2"><a class="reference internal" href="add-fastboot.html">Add Fastboot Support</a></li>
<li class="toctree-l2"><a class="reference internal" href="boot-acrn.html">Boot ACRN Hypervisor</a></li>
</ul>
</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">How-Tos</a></li>
<li class="breadcrumb-item active">Configure Memory Down</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="configure-memory-down">
<span id="config-memory-down"></span><h1>Configure Memory Down<a class="headerlink" href="#configure-memory-down" title="Permalink to this heading"></a></h1>
<p>The term of <strong>Memory Down</strong> is used to describe when memory components such as DRAM devices are physically soldered onto a Printed Circuit Board (PCB). This is an alternative to using mechanical connectors to attach memory modules (DIMM) onto a system. Memory down configuration is often found in the embedded platforms due to the variety of constraints and usage models.</p>
<p>SBL supports memory down configuration via FSP UPDs. This guide provides some basic steps to configure SBL before calling FSP-M to initialize system memory.</p>
<p>Step 1 - Read schematic and understand DDR memory layout and model from datasheet.</p>
<p>Step 2 - Configure the following memory parameters in SBL</p>
<p>Start with <code class="docutils literal notranslate"><span class="pre">&lt;platform&gt;\CfgData\CfgData_Memory.yaml</span></code> to understand the possible values for memory parameters</p>
<p>For UP<sup>2</sup>, open <code class="docutils literal notranslate"><span class="pre">CfgData_Ext_Up2.dlt</span></code> and customize values that match the actual memory parameters. Given an example for 8GB LPDDR4 memory:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">...</span>
<span class="n">PLATFORMID_CFG_DATA</span><span class="o">.</span><span class="n">PlatformId</span> <span class="o">|</span> <span class="mh">0x000E</span> <span class="o">&lt;--</span> <span class="n">Match</span> <span class="n">actual</span> <span class="n">Board</span> <span class="n">ID</span>
<span class="n">MEMORY_CFG_DATA</span><span class="o">.</span><span class="n">DualRankSupportEnable</span> <span class="o">|</span> <span class="mh">0x1</span>
<span class="n">MEMORY_CFG_DATA</span><span class="o">.</span><span class="n">RmtMode</span> <span class="o">|</span> <span class="mh">0x0</span>
<span class="n">MEMORY_CFG_DATA</span><span class="o">.</span><span class="n">MemorySizeLimit</span> <span class="o">|</span> <span class="mh">0x0</span>
<span class="n">MEMORY_CFG_DATA</span><span class="o">.</span><span class="n">Ch0_RankEnable</span> <span class="o">|</span> <span class="mh">0x3</span> <span class="o">&lt;--</span> <span class="n">bit</span> <span class="n">masks</span> <span class="k">for</span> <span class="n">dual</span> <span class="n">Rank</span><span class="o">.</span> <span class="mh">0x1</span> <span class="k">for</span> <span class="n">single</span> <span class="n">rank</span><span class="p">;</span> <span class="mh">0x0</span> <span class="k">for</span> <span class="n">no</span> <span class="n">rank</span> <span class="p">(</span><span class="n">no</span> <span class="n">memory</span> <span class="n">chip</span><span class="p">)</span>
<span class="n">MEMORY_CFG_DATA</span><span class="o">.</span><span class="n">Ch0_DramDensity</span> <span class="o">|</span> <span class="mh">0x2</span> <span class="o">&lt;--</span> <span class="mi">8</span><span class="n">Gb</span> <span class="p">(</span><span class="n">check</span> <span class="n">datasheet</span><span class="p">)</span>
<span class="n">MEMORY_CFG_DATA</span><span class="o">.</span><span class="n">Ch1_RankEnable</span> <span class="o">|</span> <span class="mh">0x3</span>
<span class="n">MEMORY_CFG_DATA</span><span class="o">.</span><span class="n">Ch1_DramDensity</span> <span class="o">|</span> <span class="mh">0x2</span>
<span class="n">MEMORY_CFG_DATA</span><span class="o">.</span><span class="n">Ch2_RankEnable</span> <span class="o">|</span> <span class="mh">0x3</span>
<span class="n">MEMORY_CFG_DATA</span><span class="o">.</span><span class="n">Ch2_DramDensity</span> <span class="o">|</span> <span class="mh">0x2</span>
<span class="n">MEMORY_CFG_DATA</span><span class="o">.</span><span class="n">Ch3_RankEnable</span> <span class="o">|</span> <span class="mh">0x3</span>
<span class="n">MEMORY_CFG_DATA</span><span class="o">.</span><span class="n">Ch3_DramDensity</span> <span class="o">|</span> <span class="mh">0x2</span>
<span class="n">MEMORY_CFG_DATA</span><span class="o">.</span><span class="n">RmtCheckRun</span> <span class="o">|</span> <span class="mh">0x3</span>
<span class="o">...</span>
</pre></div>
</div>
<p>Optionally, you can use Configuration Editor to graphically view and modify configurations. See <a class="reference external" href="https://slimbootloader.github.io/developer-guides/configuration.html">https://slimbootloader.github.io/developer-guides/configuration.html</a> for details.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>If FSP UPD implementation supports hardcoded SPD table, simply replacing the SPD binary file under <code class="docutils literal notranslate"><span class="pre">&lt;platform&gt;\CfgData</span></code>. The file name of a SPD binary can be found in <code class="docutils literal notranslate"><span class="pre">&lt;platform&gt;\CfgData\CfgData_MemSpd.yaml</span></code>. If a platform supports more than one type of memory configuration, the <code class="docutils literal notranslate"><span class="pre">MEMORY_CFG_DATA.SpdDataSel</span></code> must be carefully set. Take Tiger Lake as an example: Spd_Ddrlp4.bin and Spd_Ddrlp5.bin are for LPDDR4 and LPDDR5 respectivly. The index of Spd_Ddrlp4.bin is 1, and it is 2 for Spd_Ddrlp5.bin.</p>
<p>In a board dlt file:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">MEMORY_CFG_DATA</span><span class="o">.</span><span class="n">SpdAddressTable</span> <span class="o">|</span> <span class="p">{</span><span class="o">...</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="o">...</span> <span class="p">}</span> <span class="o">&lt;--</span> <span class="n">when</span> <span class="mi">0</span><span class="p">,</span> <span class="n">FSP</span> <span class="n">will</span> <span class="n">use</span> <span class="n">hardcoded</span> <span class="n">SPD</span> <span class="k">for</span> <span class="n">the</span> <span class="n">memory</span> <span class="n">slot</span> <span class="p">(</span><span class="n">mem</span> <span class="n">controller</span> <span class="n">X</span><span class="p">,</span> <span class="n">channel</span> <span class="n">Y</span><span class="p">,</span> <span class="n">Dimm</span> <span class="n">Z</span><span class="p">)</span><span class="o">.</span> <span class="n">Otherwise</span><span class="p">,</span> <span class="n">FSP</span> <span class="n">reads</span> <span class="n">its</span> <span class="n">SPD</span> <span class="kn">from</span> <span class="nn">the</span> <span class="n">smbus</span> <span class="n">address</span><span class="o">.</span>
<span class="n">MEMORY_CFG_DATA</span><span class="o">.</span><span class="n">SpdDataSelXYZ</span> <span class="o">|</span> <span class="mi">1</span> <span class="o">&lt;--</span> <span class="n">using</span> <span class="n">LPDDR4</span> <span class="n">hardcoded</span> <span class="n">SPD</span> <span class="k">for</span> <span class="n">memory</span> <span class="n">slot</span> <span class="n">XYZ</span><span class="o">.</span> <span class="n">Or</span>
<span class="n">MEMORY_CFG_DATA</span><span class="o">.</span><span class="n">SpdDataSelXYZ</span> <span class="o">|</span> <span class="mi">2</span> <span class="o">&lt;--</span> <span class="n">using</span> <span class="n">LPDDR5</span>
</pre></div>
</div>
</div>
<p>Step 3 - Build, stitch and test</p>
<p>If the memory configuration is correct, SBL should boot all the way to the shell. Verify the memory map information from the log to ensure the memory size matches with hardware.</p>
<p>Otherwise, SBL may hang after calling FSP-M and never returns. In this case, you have two troubleshooting options:</p>
<ol class="arabic simple">
<li><p>Re-examine the configuration values, make changes and repeat.</p></li>
<li><p>Object FSP debug build and get debugging output message during memory training flow.</p></li>
</ol>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Please contact Intel representatives for how to obtain FSP source code.</p>
</div>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="boot-pxe-uboot.html" class="btn btn-neutral float-left" title="PXE Boot Through U-Boot Payload" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="collect-time-logs.html" class="btn btn-neutral float-right" title="Capture Boot Time Data" 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 27, 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>