__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

www-data@216.73.217.121: ~ $
<!DOCTYPE html>

<html lang="en" data-content_root="../../">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />

    <title>Booting ARM Linux &#8212; The Linux Kernel  documentation</title>
    <link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
    <link rel="stylesheet" type="text/css" href="../../_static/alabaster.css?v=3918102e" />
    <script src="../../_static/documentation_options.js?v=5929fcd5"></script>
    <script src="../../_static/doctools.js?v=9bcbadda"></script>
    <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
    <link rel="index" title="Index" href="../../genindex.html" />
    <link rel="search" title="Search" href="../../search.html" />
    <link rel="next" title="Cluster-wide Power-up/power-down race avoidance algorithm" href="cluster-pm-race-avoidance.html" />
    <link rel="prev" title="ARM Linux 2.6 and upper" href="arm.html" />
   
  <link rel="stylesheet" href="../../_static/custom.css" type="text/css" />
  

  
  

  </head><body>
  <div class="document">
    
      <div class="sphinxsidebar" role="navigation" aria-label="Main">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="../../index.html">
              <img class="logo" src="../../_static/logo.svg" alt="Logo of The Linux Kernel"/>
            </a></p>
<h1 class="logo"><a href="../../index.html">The Linux Kernel</a></h1>



<p class="blurb">6.18.50</p>







<search id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>
    </div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>


<p>
<h3 class="kernel-toc-contents">Contents</h3>
<input type="checkbox" class="kernel-toc-toggle" id = "kernel-toc-toggle" checked>
<label class="kernel-toc-title" for="kernel-toc-toggle"></label>

<div class="kerneltoc" id="kerneltoc">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../process/development-process.html">Development process</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../process/submitting-patches.html">Submitting patches</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../process/code-of-conduct.html">Code of conduct</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../maintainer/index.html">Maintainer handbook</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../process/index.html">All development-process docs</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../core-api/index.html">Core API</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../driver-api/index.html">Driver APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../subsystem-apis.html">Subsystems</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../locking/index.html">Locking</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../process/license-rules.html">Licensing rules</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../doc-guide/index.html">Writing documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../dev-tools/index.html">Development tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../dev-tools/testing-overview.html">Testing guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../kernel-hacking/index.html">Hacking guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../trace/index.html">Tracing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../fault-injection/index.html">Fault injection</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../livepatch/index.html">Livepatching</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../rust/index.html">Rust</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../admin-guide/index.html">Administration</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../kbuild/index.html">Build system</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../admin-guide/reporting-issues.html">Reporting issues</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../tools/index.html">Userspace tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../userspace-api/index.html">Userspace API</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../firmware-guide/index.html">Firmware</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../devicetree/index.html">Firmware and Devicetree</a></li>
</ul>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">CPU architectures</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../arc/index.html">ARC architecture</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="index.html">ARM Architecture</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="arm.html">ARM Linux 2.6 and upper</a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="#">Booting ARM Linux</a></li>
<li class="toctree-l3"><a class="reference internal" href="cluster-pm-race-avoidance.html">Cluster-wide Power-up/power-down race avoidance algorithm</a></li>
<li class="toctree-l3"><a class="reference internal" href="firmware.html">Interface for registering and calling firmware-specific operations for ARM</a></li>
<li class="toctree-l3"><a class="reference internal" href="interrupts.html">Interrupts</a></li>
<li class="toctree-l3"><a class="reference internal" href="kernel_mode_neon.html">Kernel mode NEON</a></li>
<li class="toctree-l3"><a class="reference internal" href="kernel_user_helpers.html">Kernel-provided User Helpers</a></li>
<li class="toctree-l3"><a class="reference internal" href="memory.html">Kernel Memory Layout on ARM Linux</a></li>
<li class="toctree-l3"><a class="reference internal" href="mem_alignment.html">Memory alignment</a></li>
<li class="toctree-l3"><a class="reference internal" href="tcm.html">ARM TCM (Tightly-Coupled Memory) handling in Linux</a></li>
<li class="toctree-l3"><a class="reference internal" href="setup.html">Kernel initialisation parameters on ARM Linux</a></li>
<li class="toctree-l3"><a class="reference internal" href="swp_emulation.html">Software emulation of deprecated SWP instruction (CONFIG_SWP_EMULATE)</a></li>
<li class="toctree-l3"><a class="reference internal" href="uefi.html">The Unified Extensible Firmware Interface (UEFI)</a></li>
<li class="toctree-l3"><a class="reference internal" href="vlocks.html">vlocks for Bare-Metal Mutual Exclusion</a></li>
<li class="toctree-l3"><a class="reference internal" href="porting.html">Porting</a></li>
<li class="toctree-l3"><a class="reference internal" href="features.html">Feature status on arm architecture</a></li>
<li class="toctree-l3"><a class="reference internal" href="index.html#soc-specific-documents">SoC-specific documents</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../arm64/index.html">ARM64 Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="../loongarch/index.html">LoongArch Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="../m68k/index.html">m68k Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="../mips/index.html">MIPS-specific Documentation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../nios2/index.html">Nios II Specific Documentation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../openrisc/index.html">OpenRISC Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="../parisc/index.html">PA-RISC Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="../powerpc/index.html">powerpc</a></li>
<li class="toctree-l2"><a class="reference internal" href="../riscv/index.html">RISC-V architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="../s390/index.html">s390 Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="../sh/index.html">SuperH Interfaces Guide</a></li>
<li class="toctree-l2"><a class="reference internal" href="../sparc/index.html">Sparc Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="../x86/index.html">x86-specific Documentation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../xtensa/index.html">Xtensa Architecture</a></li>
</ul>
</li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../staging/index.html">Unsorted documentation</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../translations/index.html">Translations</a></li>
</ul>

</div>

<script type="text/javascript"> <!--
  var sbar = document.getElementsByClassName("sphinxsidebar")[0];
  let currents = document.getElementsByClassName("current")
  if (currents.length) {
    sbar.scrollTop = currents[currents.length - 1].offsetTop;
  }
  --> </script>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../../_sources/arch/arm/booting.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
        </div>
      </div>
      <div class="documentwrapper">
        <div class="bodywrapper">
          

          <div class="body" role="main">
            
  



<section id="booting-arm-linux">
<h1>Booting ARM Linux<a class="headerlink" href="#booting-arm-linux" title="Link to this heading">¶</a></h1>
<p>Author: Russell King</p>
<p>Date  : 18 May 2002</p>
<p>The following documentation is relevant to 2.4.18-rmk6 and beyond.</p>
<p>In order to boot ARM Linux, you require a boot loader, which is a small
program that runs before the main kernel.  The boot loader is expected
to initialise various devices, and eventually call the Linux kernel,
passing information to the kernel.</p>
<p>Essentially, the boot loader should provide (as a minimum) the
following:</p>
<ol class="arabic simple">
<li><p>Setup and initialise the RAM.</p></li>
<li><p>Initialise one serial port.</p></li>
<li><p>Detect the machine type.</p></li>
<li><p>Setup the kernel tagged list.</p></li>
<li><p>Load initramfs.</p></li>
<li><p>Call the kernel image.</p></li>
</ol>
<section id="setup-and-initialise-ram">
<h2>1. Setup and initialise RAM<a class="headerlink" href="#setup-and-initialise-ram" title="Link to this heading">¶</a></h2>
<dl class="simple">
<dt>Existing boot loaders:</dt><dd><p>MANDATORY</p>
</dd>
<dt>New boot loaders:</dt><dd><p>MANDATORY</p>
</dd>
</dl>
<p>The boot loader is expected to find and initialise all RAM that the
kernel will use for volatile data storage in the system.  It performs
this in a machine dependent manner.  (It may use internal algorithms
to automatically locate and size all RAM, or it may use knowledge of
the RAM in the machine, or any other method the boot loader designer
sees fit.)</p>
</section>
<section id="initialise-one-serial-port">
<h2>2. Initialise one serial port<a class="headerlink" href="#initialise-one-serial-port" title="Link to this heading">¶</a></h2>
<dl class="simple">
<dt>Existing boot loaders:</dt><dd><p>OPTIONAL, RECOMMENDED</p>
</dd>
<dt>New boot loaders:</dt><dd><p>OPTIONAL, RECOMMENDED</p>
</dd>
</dl>
<p>The boot loader should initialise and enable one serial port on the
target.  This allows the kernel serial driver to automatically detect
which serial port it should use for the kernel console (generally
used for debugging purposes, or communication with the target.)</p>
<p>As an alternative, the boot loader can pass the relevant ‘console=’
option to the kernel via the tagged lists specifying the port, and
serial format options as described in</p>
<blockquote>
<div><p><a class="reference internal" href="../../admin-guide/kernel-parameters.html"><span class="doc">The kernel’s command-line parameters</span></a>.</p>
</div></blockquote>
</section>
<section id="detect-the-machine-type">
<h2>3. Detect the machine type<a class="headerlink" href="#detect-the-machine-type" title="Link to this heading">¶</a></h2>
<dl class="simple">
<dt>Existing boot loaders:</dt><dd><p>OPTIONAL</p>
</dd>
<dt>New boot loaders:</dt><dd><p>MANDATORY except for DT-only platforms</p>
</dd>
</dl>
<p>The boot loader should detect the machine type its running on by some
method.  Whether this is a hard coded value or some algorithm that
looks at the connected hardware is beyond the scope of this document.
The boot loader must ultimately be able to provide a MACH_TYPE_xxx
value to the kernel. (see linux/arch/arm/tools/mach-types).  This
should be passed to the kernel in register r1.</p>
<p>For DT-only platforms, the machine type will be determined by device
tree.  set the machine type to all ones (~0).  This is not strictly
necessary, but assures that it will not match any existing types.</p>
</section>
<section id="setup-boot-data">
<h2>4. Setup boot data<a class="headerlink" href="#setup-boot-data" title="Link to this heading">¶</a></h2>
<dl class="simple">
<dt>Existing boot loaders:</dt><dd><p>OPTIONAL, HIGHLY RECOMMENDED</p>
</dd>
<dt>New boot loaders:</dt><dd><p>MANDATORY</p>
</dd>
</dl>
<p>The boot loader must provide either a tagged list or a dtb image for
passing configuration data to the kernel.  The physical address of the
boot data is passed to the kernel in register r2.</p>
</section>
<section id="a-setup-the-kernel-tagged-list">
<h2>4a. Setup the kernel tagged list<a class="headerlink" href="#a-setup-the-kernel-tagged-list" title="Link to this heading">¶</a></h2>
<p>The boot loader must create and initialise the kernel tagged list.
A valid tagged list starts with ATAG_CORE and ends with ATAG_NONE.
The ATAG_CORE tag may or may not be empty.  An empty ATAG_CORE tag
has the size field set to ‘2’ (0x00000002).  The ATAG_NONE must set
the size field to zero.</p>
<p>Any number of tags can be placed in the list.  It is undefined
whether a repeated tag appends to the information carried by the
previous tag, or whether it replaces the information in its
entirety; some tags behave as the former, others the latter.</p>
<p>The boot loader must pass at a minimum the size and location of
the system memory, and root filesystem location.  Therefore, the
minimum tagged list should look:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>              +-----------+
base -&gt;       | ATAG_CORE |  |
              +-----------+  |
              | ATAG_MEM  |  | increasing address
              +-----------+  |
              | ATAG_NONE |  |
              +-----------+  v
</pre></div>
</div>
<p>The tagged list should be stored in system RAM.</p>
<p>The tagged list must be placed in a region of memory where neither
the kernel decompressor nor initrd ‘bootp’ program will overwrite
it.  The recommended placement is in the first 16KiB of RAM.</p>
</section>
<section id="b-setup-the-device-tree">
<h2>4b. Setup the device tree<a class="headerlink" href="#b-setup-the-device-tree" title="Link to this heading">¶</a></h2>
<p>The boot loader must load a device tree image (dtb) into system ram
at a 64bit aligned address and initialize it with the boot data.  The
dtb format is documented at <a class="reference external" href="https://www.devicetree.org/specifications/">https://www.devicetree.org/specifications/</a>.
The kernel will look for the dtb magic value of 0xd00dfeed at the dtb
physical address to determine if a dtb has been passed instead of a
tagged list.</p>
<p>The boot loader must pass at a minimum the size and location of the
system memory, and the root filesystem location.  The dtb must be
placed in a region of memory where the kernel decompressor will not
overwrite it, while remaining within the region which will be covered
by the kernel’s low-memory mapping.</p>
<p>A safe location is just above the 128MiB boundary from start of RAM.</p>
</section>
<section id="load-initramfs">
<h2>5. Load initramfs.<a class="headerlink" href="#load-initramfs" title="Link to this heading">¶</a></h2>
<dl class="simple">
<dt>Existing boot loaders:</dt><dd><p>OPTIONAL</p>
</dd>
<dt>New boot loaders:</dt><dd><p>OPTIONAL</p>
</dd>
</dl>
<p>If an initramfs is in use then, as with the dtb, it must be placed in
a region of memory where the kernel decompressor will not overwrite it
while also with the region which will be covered by the kernel’s
low-memory mapping.</p>
<p>A safe location is just above the device tree blob which itself will
be loaded just above the 128MiB boundary from the start of RAM as
recommended above.</p>
</section>
<section id="calling-the-kernel-image">
<h2>6. Calling the kernel image<a class="headerlink" href="#calling-the-kernel-image" title="Link to this heading">¶</a></h2>
<dl class="simple">
<dt>Existing boot loaders:</dt><dd><p>MANDATORY</p>
</dd>
<dt>New boot loaders:</dt><dd><p>MANDATORY</p>
</dd>
</dl>
<p>There are two options for calling the kernel zImage.  If the zImage
is stored in flash, and is linked correctly to be run from flash,
then it is legal for the boot loader to call the zImage in flash
directly.</p>
<p>The zImage may also be placed in system RAM and called there.  The
kernel should be placed in the first 128MiB of RAM.  It is recommended
that it is loaded above 32MiB in order to avoid the need to relocate
prior to decompression, which will make the boot process slightly
faster.</p>
<p>When booting a raw (non-zImage) kernel the constraints are tighter.
In this case the kernel must be loaded at an offset into system equal
to TEXT_OFFSET - PAGE_OFFSET.</p>
<p>In any case, the following conditions must be met:</p>
<ul>
<li><p>Quiesce all DMA capable devices so that memory does not get
corrupted by bogus network packets or disk data. This will save
you many hours of debug.</p></li>
<li><p>CPU register settings</p>
<ul class="simple">
<li><p>r0 = 0,</p></li>
<li><p>r1 = machine type number discovered in (3) above.</p></li>
<li><p>r2 = physical address of tagged list in system RAM, or
physical address of device tree block (dtb) in system RAM</p></li>
</ul>
</li>
<li><p>CPU mode</p>
<p>All forms of interrupts must be disabled (IRQs and FIQs)</p>
<p>For CPUs which do not include the ARM virtualization extensions, the
CPU must be in SVC mode.  (A special exception exists for Angel)</p>
<p>CPUs which include support for the virtualization extensions can be
entered in HYP mode in order to enable the kernel to make full use of
these extensions.  This is the recommended boot method for such CPUs,
unless the virtualisations are already in use by a pre-installed
hypervisor.</p>
<p>If the kernel is not entered in HYP mode for any reason, it must be
entered in SVC mode.</p>
</li>
<li><p>Caches, MMUs</p>
<p>The MMU must be off.</p>
<p>Instruction cache may be on or off.</p>
<p>Data cache must be off.</p>
<p>If the kernel is entered in HYP mode, the above requirements apply to
the HYP mode configuration in addition to the ordinary PL1 (privileged
kernel modes) configuration.  In addition, all traps into the
hypervisor must be disabled, and PL1 access must be granted for all
peripherals and CPU resources for which this is architecturally
possible.  Except for entering in HYP mode, the system configuration
should be such that a kernel which does not include support for the
virtualization extensions can boot correctly without extra help.</p>
</li>
<li><p>The boot loader is expected to call the kernel image by jumping
directly to the first instruction of the kernel image.</p>
<p>On CPUs supporting the ARM instruction set, the entry must be
made in ARM state, even for a Thumb-2 kernel.</p>
<p>On CPUs supporting only the Thumb instruction set such as
Cortex-M class CPUs, the entry must be made in Thumb state.</p>
</li>
</ul>
</section>
</section>


          </div>
          
        </div>
      </div>
    <div class="clearer"></div>
  </div>
    <div class="footer">
      &#169;The kernel development community.
      
      |
      Powered by <a href="https://www.sphinx-doc.org/">Sphinx 8.1.3</a>
      &amp; <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
      
      |
      <a href="../../_sources/arch/arm/booting.rst.txt"
          rel="nofollow">Page source</a>
    </div>

    

    
  </body>
</html>

Filemanager

Name Type Size Permission Actions
google Folder 0755
keystone Folder 0755
nwfpe Folder 0755
omap Folder 0755
pxa Folder 0755
sa1100 Folder 0755
samsung Folder 0755
spear Folder 0755
sti Folder 0755
stm32 Folder 0755
sunxi Folder 0755
vfp Folder 0755
arm.html File 21.31 KB 0644
booting.html File 20.57 KB 0644
cluster-pm-race-avoidance.html File 31.14 KB 0644
features.html File 19.66 KB 0644
firmware.html File 13.86 KB 0644
index.html File 16.01 KB 0644
interrupts.html File 18.73 KB 0644
ixp4xx.html File 19.27 KB 0644
kernel_mode_neon.html File 18.64 KB 0644
kernel_user_helpers.html File 20.2 KB 0644
marvell.html File 59.02 KB 0644
mem_alignment.html File 13.41 KB 0644
memory.html File 16.07 KB 0644
microchip.html File 20.99 KB 0644
netwinder.html File 16.51 KB 0644
porting.html File 16.77 KB 0644
setup.html File 15 KB 0644
sunxi.html File 18.79 KB 0644
swp_emulation.html File 11.99 KB 0644
tcm.html File 17.34 KB 0644
uefi.html File 14.41 KB 0644
vlocks.html File 18.73 KB 0644
Filemanager