You've already forked slimbootloader.github.io
mirror of
https://github.com/Dasharo/slimbootloader.github.io.git
synced 2026-03-06 15:26:36 -08:00
399 lines
36 KiB
HTML
399 lines
36 KiB
HTML
<!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>TSN — 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="Enable TSN GbE SGMII" href="enable-tsn-gbe-sgmii.html" />
|
||
<link rel="prev" title="Intel® TCC enable" href="enable-intel-tcc.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">Developer’s 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 current"><a class="current reference internal" href="#">TSN</a><ul>
|
||
<li class="toctree-l3"><a class="reference internal" href="#overview">Overview</a></li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#tsn-container">TSN container</a></li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#different-options-to-update-tsn-container">Different options to update TSN container</a></li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#tsn-configuration-settings">TSN configuration settings</a><ul>
|
||
<li class="toctree-l4"><a class="reference internal" href="#open-sbl-default-configuration-data">1. Open SBL default configuration data</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#load-the-delta-file">2. Load the delta file</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#change-option-to-enable-tsn">3. Change option to enable tsn</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#save-the-change-to-delta-file">4. Save the change to delta file</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#build-sbl">5. Build SBL</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#tsn-capsule-generation">TSN capsule generation</a><ul>
|
||
<li class="toctree-l4"><a class="reference internal" href="#step-1-tsn-raw-binary-generation">Step 1: TSN raw binary generation</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#step-2-sign-and-generate-container-for-tsn">Step 2: Sign and generate container for TSN</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#step-3-generate-capsule-image">Step 3: Generate capsule image</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#step-4-copy-capsule-image">Step 4: Copy capsule image</a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#step-5-trigger-firmware-update">Step 5: Trigger firmware update</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</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"><a class="reference internal" href="configure-memory-down.html">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">TSN</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="tsn">
|
||
<span id="id1"></span><h1>TSN<a class="headerlink" href="#tsn" title="Permalink to this heading"></a></h1>
|
||
<section id="overview">
|
||
<h2>Overview<a class="headerlink" href="#overview" title="Permalink to this heading"></a></h2>
|
||
<p>TSN (Time Sensitive Networking) solution is a set of capabilities that offers Time Synchronization, Traffic Shaping, set of IEEE open standard communication by bringing industrial-grade robustness and reliability to Ethernet . TSN removes the need for physical separation of critical and non-critical communication networks, thus allowing open data exchange between operations and enterprise - a concept at the heart of the Industrial Internel of Things (IIoT).
|
||
To learn more about TSN, see <a href="https://www.intel.com/content/www/us/en/industrial-automation/programmable/applications/automation/tsn.html" target="_blank">TSN</a> for details.</p>
|
||
</section>
|
||
<section id="tsn-container">
|
||
<span id="id2"></span><h2>TSN container<a class="headerlink" href="#tsn-container" title="Permalink to this heading"></a></h2>
|
||
<p>Container support is a generic SBL feature. Please refer to <a href="https://slimbootloader.github.io/tools/GenContainer.html" target="_blank">Container</a> and <a href="https://slimbootloader.github.io/security/container-security.html?highlight=container#container-security" target="_blank">Container Security</a> for generic details.</p>
|
||
<p>SBL defines a container called ‘IPFW’ for settings related to various silicon IP and settings related to TSN are managed as a component inside this ‘IPFW’ container.
|
||
SBL loads this container and processes it as required including passing the relevant settings to Intel® Firmware Support Package (Intel® FSP) during Runtime.
|
||
SBL defines this container in each platform’s build config file BoardConfig.py.</p>
|
||
<p><strong>TSN MAC Address</strong></p>
|
||
<p>User needs to provide TSN MAC address that is unique per board and that can be independently updateable. FBU (Firmware and BIOS Utility) tool is used to create a raw TSN MAC binary.
|
||
Details on how this is all generated and packaged will be discussed in the later sections.</p>
|
||
<p><strong>TSN enable</strong></p>
|
||
<p>For each platform, there is a build configuration file BoardConfig.py. User can check this build configuration file to make sure self.ENABLE_TCC is set to 1 to enable TSN feature.
|
||
For other TSN related configuration data, please refer to <a class="reference internal" href="#tsn-settings"><span class="std std-ref">TSN configuration settings</span></a>.</p>
|
||
<p>Take Tiger Lake as an example.</p>
|
||
<blockquote>
|
||
<div><p><a class="reference external" href="https://github.com/slimbootloader/slimbootloader/blob/master/Platform/TigerlakeBoardPkg/BoardConfig.py">https://github.com/slimbootloader/slimbootloader/blob/master/Platform/TigerlakeBoardPkg/BoardConfig.py</a>:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="bp">self</span><span class="o">.</span><span class="n">ENABLE_TSN</span> <span class="o">=</span> <span class="mi">1</span>
|
||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">ENABLE_TSN</span><span class="p">:</span>
|
||
<span class="bp">self</span><span class="o">.</span><span class="n">TMAC_SIZE</span> <span class="o">=</span> <span class="mh">0x00001000</span>
|
||
|
||
<span class="c1"># Name | Image File | CompressAlg | AuthType | Key File | Region Align | Region Size | Svn Info</span>
|
||
<span class="c1"># ===============================================================================================================================================================</span>
|
||
<span class="p">(</span><span class="s1">'IPFW'</span><span class="p">,</span> <span class="s1">'SIIPFW.bin'</span><span class="p">,</span> <span class="s1">''</span> <span class="p">,</span> <span class="n">container_list_auth_type</span><span class="p">,</span> <span class="s1">'KEY_ID_CONTAINER'</span><span class="o">+</span><span class="s1">'_'</span><span class="o">+</span><span class="bp">self</span><span class="o">.</span><span class="n">_RSA_SIGN_TYPE</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span> <span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="c1"># Container Header</span>
|
||
<span class="p">(</span><span class="s1">'TMAC'</span><span class="p">,</span> <span class="s1">''</span> <span class="p">,</span> <span class="s1">'Lz4'</span> <span class="p">,</span> <span class="n">container_list_auth_type</span><span class="p">,</span> <span class="s1">'KEY_ID_CONTAINER_COMP'</span><span class="o">+</span><span class="s1">'_'</span><span class="o">+</span><span class="bp">self</span><span class="o">.</span><span class="n">_RSA_SIGN_TYPE</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">TMAC_SIZE</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="c1"># TSN MAC Address</span>
|
||
</pre></div>
|
||
</div>
|
||
</div></blockquote>
|
||
<p>In the build configuration file, user can set <code class="docutils literal notranslate"><span class="pre">self.ENABLE_TSN</span></code> to 1 to enable TSN component and adjust the size if needed.
|
||
Inside the IPFW container, the TSN MAC component is identified by 4 unique characters. SBL would use it when loading container and update it via firmware update.
|
||
For TSN, the unique name is <code class="docutils literal notranslate"><span class="pre">TMAC</span></code> that SBL looks at while loading the TSN binary.</p>
|
||
</section>
|
||
<section id="different-options-to-update-tsn-container">
|
||
<h2>Different options to update TSN container<a class="headerlink" href="#different-options-to-update-tsn-container" title="Permalink to this heading"></a></h2>
|
||
<p><strong>1. Specify in Board Config file and rebuild SBL</strong></p>
|
||
<p>Specify the raw TSN binary Image file (that is generated by FBU tool) name in build config file BoardConfig.py. Copy the binary into Platform/<Platform>BoardPkg/Binaries folder in SBL source code before building SBL.
|
||
User can also specify different compression and authentication method for
|
||
this binary as desired. Rebuild SBL successfully. Now, the TSN MAC binary will be created and embedded in the IPFW container and be part of the IFWI. When flashed onto the board, SBL will process this container.</p>
|
||
<p>In addition, if the user decide to take this option, SBL that was rebuilt need to be stitched with TSN stitching option.</p>
|
||
<p><strong>TSN Stitch Option for Soft Straps</strong></p>
|
||
<p>User need to enable TSN soft straps into the final IFWI image. To do this, stitch the IFWI with TSN softstrap option, example: “-o tsn” option using StitchIFWIConfig python script, or use FIT tool to change the straps and then stitch the changes.
|
||
As an example, you can refer to this file and search for TSN stitch otion (tsn7):</p>
|
||
<blockquote>
|
||
<div><p><a class="reference external" href="https://github.com/slimbootloader/slimbootloader/blob/2832972ad6e8f550f9628eeca7027b0aa65eb10b/Platform/TigerlakeBoardPkg/Script/StitchIfwiConfig_tglu.py">https://github.com/slimbootloader/slimbootloader/blob/2832972ad6e8f550f9628eeca7027b0aa65eb10b/Platform/TigerlakeBoardPkg/Script/StitchIfwiConfig_tglu.py</a></p>
|
||
</div></blockquote>
|
||
<p>For Tiger Lake, it is <code class="docutils literal notranslate"><span class="pre">-o</span> <span class="pre">tsn7</span></code> to enable TSN softstraps in the stitched IFWI. Other platforms may have similar option for TSN in the Stitch scripts.</p>
|
||
<p><strong>2. Update using firmware update flow</strong></p>
|
||
<p>Update TSN container without rebuilding SBL by the help of capsule generation and firmware update flow. Details will be provided in the TSN capsule generation section.</p>
|
||
</section>
|
||
<section id="tsn-configuration-settings">
|
||
<span id="tsn-settings"></span><h2>TSN configuration settings<a class="headerlink" href="#tsn-configuration-settings" title="Permalink to this heading"></a></h2>
|
||
<p>SBL provides several configuration items for TSN settings. Take Tiger Lake as an example.</p>
|
||
<blockquote>
|
||
<div><p><a class="reference external" href="https://github.com/slimbootloader/slimbootloader/blob/master/Platform/TigerlakeBoardPkg/CfgData/CfgData_Silicon.yaml">https://github.com/slimbootloader/slimbootloader/blob/master/Platform/TigerlakeBoardPkg/CfgData/CfgData_Silicon.yaml</a>:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>- PchTsnEnable :
|
||
name : Enable PCH TSN
|
||
type : Combo
|
||
option : $EN_DIS
|
||
help : >
|
||
Enable/disable TSN on the PCH.
|
||
length : 0x01
|
||
value : 0x0
|
||
- PchTsnLinkSpeed :
|
||
name : TSN Link Speed
|
||
type : Combo
|
||
option : 0: Reserved, 1: Reserved, 2: 38.4Mhz 2.5Gbps, 3: 38.4Mhz 1Gbps
|
||
help : >
|
||
Set TSN Link Speed.
|
||
length : 0x01
|
||
value : 0x03
|
||
- PchTsnMultiVcEnable :
|
||
name : Enable TSN Multi-VC
|
||
type : Combo
|
||
option : $EN_DIS
|
||
help : >
|
||
Enable/disable Multi Virtual Channels(VC) in TSN.
|
||
length : 0x01
|
||
value : 0x0
|
||
</pre></div>
|
||
</div>
|
||
</div></blockquote>
|
||
<p>User can directly change the default values in CfgData_Silicon.yaml, but the default values will be overridden if same fields exist in a board specific delta file.
|
||
It is preferred to use SBL ConfigEditor.py tool GUI to change SBL configuration data to update the board specific delta file before building SBL.</p>
|
||
<p>To use SBL configuration tool and to change the delta file, run the ConfigEditor.py tool from SBL source code:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">BootloaderCorePkg</span>\<span class="n">Tools</span>\<span class="n">ConfigEditor</span><span class="o">.</span><span class="n">py</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>Following these steps to change SBL configuration data.</p>
|
||
<section id="open-sbl-default-configuration-data">
|
||
<h3>1. Open SBL default configuration data<a class="headerlink" href="#open-sbl-default-configuration-data" title="Permalink to this heading"></a></h3>
|
||
<p>Open default configuration file CfgDataDef.yaml from platform configuration data folder. Take Tiger Lake as example, open file <code class="docutils literal notranslate"><span class="pre">Platform\TigerlakeBoardPkg\CfgData\CfgDataDef.yaml</span></code> in this step.</p>
|
||
<img alt="../_images/tcc_open_yaml.png" src="../_images/tcc_open_yaml.png" />
|
||
</section>
|
||
<section id="load-the-delta-file">
|
||
<h3>2. Load the delta file<a class="headerlink" href="#load-the-delta-file" title="Permalink to this heading"></a></h3>
|
||
<p>Same SBL image can boot multiple boards based on board ID. Each board delta file would override the default SBL configuration data. So need to load the board delta file if it already exists.
|
||
The board delta file would be in same folder with CfgDataDef.yaml. Open <code class="docutils literal notranslate"><span class="pre">CfgData_Int_Tglu_Ddr4.dlt</span></code> as an example.</p>
|
||
<img alt="../_images/tcc_open_delta.png" src="../_images/tcc_open_delta.png" />
|
||
</section>
|
||
<section id="change-option-to-enable-tsn">
|
||
<h3>3. Change option to enable tsn<a class="headerlink" href="#change-option-to-enable-tsn" title="Permalink to this heading"></a></h3>
|
||
<p>Find TSN settings from ConfigEditor and update the options if required.</p>
|
||
<img alt="../_images/tsn_settings.png" src="../_images/tsn_settings.png" />
|
||
</section>
|
||
<section id="save-the-change-to-delta-file">
|
||
<h3>4. Save the change to delta file<a class="headerlink" href="#save-the-change-to-delta-file" title="Permalink to this heading"></a></h3>
|
||
<p>After changing option, save the changes back to the same delta file (<code class="docutils literal notranslate"><span class="pre">CfgData_Int_Tglu_Ddr4.dlt</span></code> in this example) to override the original one.</p>
|
||
<img alt="../_images/tsn_settings_save.png" src="../_images/tsn_settings_save.png" />
|
||
<p>After saving the delta file, the following lines will be added to the new delta file:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">SILICON_CFG_DATA</span><span class="o">.</span><span class="n">PchTsnEnable</span> <span class="o">|</span> <span class="mh">0x1</span>
|
||
<span class="n">SILICON_CFG_DATA</span><span class="o">.</span><span class="n">PchTsnLinkSpeed</span> <span class="o">|</span> <span class="mh">0x02</span>
|
||
</pre></div>
|
||
</div>
|
||
</section>
|
||
<section id="build-sbl">
|
||
<h3>5. Build SBL<a class="headerlink" href="#build-sbl" title="Permalink to this heading"></a></h3>
|
||
<p>With above configuration data change, rebuild SBL. Then the TSN configuration settings would be enabled and effective in new SBL IFWI image.</p>
|
||
</section>
|
||
</section>
|
||
<section id="tsn-capsule-generation">
|
||
<span id="id3"></span><h2>TSN capsule generation<a class="headerlink" href="#tsn-capsule-generation" title="Permalink to this heading"></a></h2>
|
||
<p>The raw TSN MAC binary can be generated using FBU tool, then signed and be encapsulated into IPFW container. Finally, container can be updated using a capsule update flow.
|
||
Details on each of the steps will be discussed in this section.</p>
|
||
<section id="step-1-tsn-raw-binary-generation">
|
||
<span id="tsn-binary-generation"></span><h3>Step 1: TSN raw binary generation<a class="headerlink" href="#step-1-tsn-raw-binary-generation" title="Permalink to this heading"></a></h3>
|
||
<p>The raw TSN MAC Address binary can be generated using Firmware and BIOS Utilities (FBU) tool as follows:</p>
|
||
<ol class="arabic">
|
||
<li><p>Download FBU tool from here: <a class="reference external" href="https://github.com/intel/iotg-fbu">https://github.com/intel/iotg-fbu</a></p></li>
|
||
<li><p>Python v3.6+ is needed if not already present on your host.</p></li>
|
||
<li><p>Install python modules “click” and “cryptography” using the cmds:</p>
|
||
<blockquote>
|
||
<div><p><code class="docutils literal notranslate"><span class="pre">python</span> <span class="pre">-m</span> <span class="pre">pip</span> <span class="pre">install</span> <span class="pre">click</span></code></p>
|
||
<p><code class="docutils literal notranslate"><span class="pre">python</span> <span class="pre">-m</span> <span class="pre">pip</span> <span class="pre">install</span> <span class="pre">cryptography</span></code></p>
|
||
</div></blockquote>
|
||
</li>
|
||
<li><p>Install OpenSSL for your host and add it to Windows PATH.</p></li>
|
||
<li><p>Create tsn_mac_config.json file per your platform. A sample screenshot is presented here:</p></li>
|
||
</ol>
|
||
<img alt="../_images/tsn_config_sample.png" src="../_images/tsn_config_sample.png" />
|
||
<p><strong>Understanding the BDF definition:</strong></p>
|
||
<p>The BDF value is defined as</p>
|
||
<p>typedef struct {</p>
|
||
<p>UINT32 RsvdBits1 : 12; ///< [11:0] Reserved bits</p>
|
||
<p>UINT32 Func : 3; ///< [14:12] Function Id</p>
|
||
<p>UINT32 Dev : 5; ///< [19:15] Device Id</p>
|
||
<p>UINT32 Bus : 8; ///< [27:20] Bus Id</p>
|
||
<p>UINT32 RsvdBits0 : 4; ///< [31:28] Reserved bits</p>
|
||
<p>} BDF;</p>
|
||
<p>To give an example, value 0x000F4000 in [“BDF”, “HEXADECIMAL”, 4, “000F4000”] decodes to</p>
|
||
<p>[14:12] Function Id = 100b = 4</p>
|
||
<p>[19:15] Device Id = 1 1110b = 30</p>
|
||
<p>[27:20] Bus Id = 0000 0000b = 0</p>
|
||
<p>The MAC addresses are specified in two four-byte hexadecimal values, where only the lower six values are
|
||
being used.
|
||
For example, to configure FC:F8:AE:00:30:04, the notation is</p>
|
||
<p>[“MacAddressLow”, “HEXADECIMAL”, 4, “00AEF8FC”],</p>
|
||
<p>[“MacAddressHigh”, “HEXADECIMAL”, 4, “00000430”],</p>
|
||
<ol class="arabic simple" start="6">
|
||
<li><p>Open cmd prompt and cd to fbu\iotg-fbu\siiptool\common. Run the cmd:</p></li>
|
||
</ol>
|
||
<blockquote>
|
||
<div><p><code class="docutils literal notranslate"><span class="pre">python</span> <span class="pre">subregion_image.py</span> <span class="pre"><config_json-file></span> <span class="pre"><out-file-name></span></code></p>
|
||
<p>Example: python subregion_image.py tsn_mac_config.json TsnMacAddr.bin</p>
|
||
</div></blockquote>
|
||
<p>A raw TSN MAC binary is generated successfully. Sample screenshot of the generated binary with sample tsn_mac_config json is as follows:</p>
|
||
<img alt="../_images/tsn_mac_bin_sample.png" src="../_images/tsn_mac_bin_sample.png" />
|
||
</section>
|
||
<section id="step-2-sign-and-generate-container-for-tsn">
|
||
<h3>Step 2: Sign and generate container for TSN<a class="headerlink" href="#step-2-sign-and-generate-container-for-tsn" title="Permalink to this heading"></a></h3>
|
||
<p>Generate a signed file from the raw TSN MAC binary (lets name it as TsnMacAddr.bin as referred in Step 1).
|
||
Use SBL GenContainer.py tool to sign the raw binary and get a signed component file:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="n">BootloaderCorePkg</span>\<span class="n">Tools</span>\<span class="n">GenContainer</span><span class="o">.</span><span class="n">py</span> <span class="n">sign</span> <span class="o">-</span><span class="n">f</span> <span class="n">TsnMacAddr</span><span class="o">.</span><span class="n">bin</span> <span class="o">-</span><span class="n">o</span> <span class="n">SignedTsnMacAddr</span><span class="o">.</span><span class="n">bin</span> <span class="o">-</span><span class="n">a</span> <span class="n">RSA3072_PSS_SHA2_384</span> <span class="o">-</span><span class="n">k</span> <span class="n">ContainerCompTestKey_Priv_RSA3072</span><span class="o">.</span><span class="n">pem</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>The output file (SignedTsnMacAddr.bin) generated from the above command is a signed binary that will be verified by SBL during boot. So make sure the signing key ContainerCompTestKey_Priv_RSA3072.pem is same from Sblkeys folder when SBL is built.</p>
|
||
<p>SBL supports compression during signing the raw binary. SBL would automatically decompress it during the loading time. Take LZ4 compression as example on yocto:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="n">BootloaderCorePkg</span>\<span class="n">Tools</span>\<span class="n">GenContainer</span><span class="o">.</span><span class="n">py</span> <span class="n">sign</span> <span class="o">-</span><span class="n">f</span> <span class="n">TsnMacAddr</span><span class="o">.</span><span class="n">bin</span> <span class="o">-</span><span class="n">o</span> <span class="n">SignedTsnMacAddr</span><span class="o">.</span><span class="n">bin</span> <span class="o">-</span><span class="n">a</span> <span class="n">RSA3072_PSS_SHA2_384</span> <span class="o">-</span><span class="n">k</span> <span class="n">ContainerCompTestKey_Priv_RSA3072</span><span class="o">.</span><span class="n">pem</span> <span class="o">-</span><span class="n">c</span> <span class="n">lz4</span> <span class="o">-</span><span class="n">td</span> <span class="n">BaseTools</span><span class="o">/</span><span class="n">BinWrappers</span><span class="o">/</span><span class="n">PosixLike</span><span class="o">/</span><span class="n">Lz4Compress</span>
|
||
</pre></div>
|
||
</div>
|
||
<p><strong>NOTE:</strong> The compression tool Lz4Compress will be generated from SBL source code during SBL build at BaseTools/BinWrappers/PosixLike/Lz4Compress in Linux. For windows system, the compression tool will be generated at
|
||
BaseTools\Bin\Win32\Lz4Compress.exe. so the windows compress command is:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="n">BootloaderCorePkg</span>\<span class="n">Tools</span>\<span class="n">GenContainer</span><span class="o">.</span><span class="n">py</span> <span class="n">sign</span> <span class="o">-</span><span class="n">f</span> <span class="n">TsnMacAddr</span><span class="o">.</span><span class="n">bin</span> <span class="o">-</span><span class="n">o</span> <span class="n">SignedTsnMacAddr</span><span class="o">.</span><span class="n">bin</span> <span class="o">-</span><span class="n">a</span> <span class="n">RSA3072_PSS_SHA2_384</span> <span class="o">-</span><span class="n">k</span> <span class="n">ContainerCompTestKey_Priv_RSA3072</span><span class="o">.</span><span class="n">pem</span> <span class="o">-</span><span class="n">c</span> <span class="n">lz4</span> <span class="o">-</span><span class="n">td</span> <span class="n">BaseTools</span>\<span class="n">Bin</span>\<span class="n">Win32</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>More compression info could be found from command “python BootloaderCorePkg\Tools\GenContainer.py -h”.</p>
|
||
</section>
|
||
<section id="step-3-generate-capsule-image">
|
||
<h3>Step 3: Generate capsule image<a class="headerlink" href="#step-3-generate-capsule-image" title="Permalink to this heading"></a></h3>
|
||
<p>Create a capsule Image from the signed file for the firmware update using SBL GenCapsuleFirmware.py tool:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="n">BootloaderCorePkg</span>\<span class="n">Tools</span>\<span class="n">GenCapsuleFirmware</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="n">TMAC</span><span class="p">:</span><span class="n">IPFW</span> <span class="n">SignedTsnMacAddr</span><span class="o">.</span><span class="n">bin</span> <span class="o">-</span><span class="n">k</span> <span class="n">FirmwareUpdateTestKey_Priv_RSA3072</span><span class="o">.</span><span class="n">pem</span> <span class="o">-</span><span class="n">o</span> <span class="n">FwuImage</span><span class="o">.</span><span class="n">bin</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>Use SBL <code class="docutils literal notranslate"><span class="pre">GenCapsuleFirmware.py</span></code> tool to encapsulate the file SignedTsnMacAddr.bin generated in previous step in order to get a capsule file (FwuImage.bin).
|
||
The output file (FwuImage.bin) generated from the above command is a signed capsule that will be verified by SBL during firmware update. Make sure the signing key FirmwareUpdateTestKey_Priv_RSA3072.pem is same from Sblkeys folder when SBL is built.</p>
|
||
<p>The above command uses “-p” parameter to specify capsule payload including the container and binary unique identifiers such as “TMAC:IPFW” and the signed container file name “SignedTsnMacAddr.bin”.
|
||
The container (IPFW) and binary(TMAC) unique names should match with the ones defined in SBL build config file BoardConfig.py as referred in the TSN container section.</p>
|
||
</section>
|
||
<section id="step-4-copy-capsule-image">
|
||
<h3>Step 4: Copy capsule image<a class="headerlink" href="#step-4-copy-capsule-image" title="Permalink to this heading"></a></h3>
|
||
<p>During SBL firmware update, SBL will try to find the capsule image from the location specified from SBL configuration file CfgData_CapsuleInformation.yaml.
|
||
CfgData_CapsuleInformation.yaml is platform specific config data file in YAML format and it can be customized for the capsule location including
|
||
capsule storage device (USB, NVMe, SATA, etc.), boot partition, file system and capsule image name.
|
||
On most platforms, SBL would set the capsule location to file /boot/efi/FwuImage.bin under USB or NVMe FAT32 boot partition by default.</p>
|
||
<p>Copy the capsule image FwuImage.bin to the location specified in SBL configuration file CfgData_CapsuleInformation.yaml.</p>
|
||
</section>
|
||
<section id="step-5-trigger-firmware-update">
|
||
<h3>Step 5: Trigger firmware update<a class="headerlink" href="#step-5-trigger-firmware-update" title="Permalink to this heading"></a></h3>
|
||
<p>To support triggering firmware update from an OS, SBL exposes an ACPI method. OS can call the ACPI method to trigger firmware update. Following the reset, SBL will boot into the firmware update mode.</p>
|
||
<p>Trigger firmware update from Yocto:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">echo</span> <span class="mi">1</span> <span class="o">></span> <span class="o">/</span><span class="n">sys</span><span class="o">/</span><span class="n">bus</span><span class="o">/</span><span class="n">wmi</span><span class="o">/</span><span class="n">devices</span><span class="o">/</span><span class="mi">44</span><span class="n">FADEB1</span><span class="o">-</span><span class="n">B204</span><span class="o">-</span><span class="mi">40</span><span class="n">F2</span><span class="o">-</span><span class="mi">8581</span><span class="o">-</span><span class="mi">394</span><span class="n">BBDC1B651</span><span class="o">/</span><span class="n">firmware_update_request</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>Finally, reboot the machine to let SBL run into firmware update mode.
|
||
Once the board reboots, the firmware update flow in SBL will begin. There may be few reboots during this flow before finally booting to Yocto.</p>
|
||
</section>
|
||
</section>
|
||
</section>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
|
||
<a href="enable-intel-tcc.html" class="btn btn-neutral float-left" title="Intel® TCC enable" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||
<a href="enable-tsn-gbe-sgmii.html" class="btn btn-neutral float-right" title="Enable TSN GbE SGMII" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||
</div>
|
||
|
||
<hr/>
|
||
|
||
<div role="contentinfo">
|
||
<p>© 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> |