<?xml version="1.0" ?><?xml-stylesheet type="text/xsl" encoding="UTF-8" href="iform.xsl" version="1.0"?><!DOCTYPE instructionsection  PUBLIC '-//ARM//DTD instructionsection //EN'  'iform-p.dtd'><!-- Copyright (c) 2010-2026 Arm Limited or its affiliates. All rights reserved. --><!-- This document is Non-Confidential. This document may only be used and distributed in accordance with the terms of the agreement entered into by Arm and the party that Arm delivered this document to. --><instructionsection id="DSB" title="DSB -- A64" type="instruction">
  <docvars>
    <docvar key="instr-class" value="system"/>
    <docvar key="isa" value="A64"/>
    <docvar key="mnemonic" value="DSB"/>
  </docvars>
  <heading>DSB</heading>
  <desc>
    <brief>
      <para>Data synchronization barrier</para>
    </brief>
    <authored>
      <para>This instruction is a memory barrier that ensures the completion
of memory accesses, see <xref linkend="ARMARM_BEICEFJH">Data Synchronization Barrier</xref>.</para>
    </authored>
  </desc>
  <alias_list howmany="2">
    <alias_list_intro>This instruction is used by the aliases </alias_list_intro>
    <aliasref aliaspageid="PSSBB_DSB" aliasfile="pssbb_dsb.xml" hover="Physical speculative store bypass barrier" punct=" and ">
      <text>PSSBB</text>
      <aliaspref>CRm == '0100'</aliaspref>
    </aliasref>
    <aliasref aliaspageid="SSBB_DSB" aliasfile="ssbb_dsb.xml" hover="Speculative store bypass barrier" punct=".">
      <text>SSBB</text>
      <aliaspref>CRm == '0000'</aliaspref>
    </aliasref>
    <alias_list_outro>
      <text>  See </text>
      <aliastablelink/>
      <text> below for details of when each alias is preferred.</text>
    </alias_list_outro>
  </alias_list>
  <classes>
    <classesintro count="2">
      <txt>It has encodings from 2 classes:</txt>
      <a href="#iclass_memory_barrier">Memory barrier</a>
      <txt> and </txt>
      <a href="#iclass_memory_nxs_barrier">Memory nXS barrier</a>
    </classesintro>
    <iclass name="Memory barrier" oneof="2" id="iclass_memory_barrier" no_encodings="1" isa="A64">
      <docvars>
        <docvar key="dsb-variants" value="dsb-memory"/>
        <docvar key="instr-class" value="system"/>
        <docvar key="isa" value="A64"/>
        <docvar key="mnemonic" value="DSB"/>
      </docvars>
      <iclassintro count="1"/>
      <regdiagram form="32" psname="A64.control.barriers.DSB_BO_barriers" tworows="1">
        <box hibit="31" width="3" settings="3">
          <c>1</c>
          <c>1</c>
          <c>0</c>
        </box>
        <box hibit="28" width="3" settings="3">
          <c>1</c>
          <c>0</c>
          <c>1</c>
        </box>
        <box hibit="25" width="14" settings="14">
          <c>0</c>
          <c>1</c>
          <c>0</c>
          <c>0</c>
          <c>0</c>
          <c>0</c>
          <c>0</c>
          <c>0</c>
          <c>1</c>
          <c>1</c>
          <c>0</c>
          <c>0</c>
          <c>1</c>
          <c>1</c>
        </box>
        <box hibit="11" width="4" name="CRm" usename="1">
          <c colspan="4"/>
        </box>
        <box hibit="7" width="1" settings="1">
          <c>1</c>
        </box>
        <box hibit="6" width="2" name="opc" usename="1" settings="2" psbits="xx">
          <c>0</c>
          <c>0</c>
        </box>
        <box hibit="4" width="5" name="Rt" usename="1" settings="5" psbits="xxxxx">
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>1</c>
        </box>
      </regdiagram>
      <encoding name="DSB_BO_barriers" oneofinclass="1" oneof="2" label="">
        <docvars>
          <docvar key="instr-class" value="system"/>
          <docvar key="isa" value="A64"/>
          <docvar key="dsb-variants" value="dsb-memory"/>
          <docvar key="mnemonic" value="DSB"/>
        </docvars>
        <asmtemplate><text>DSB  (</text><a hover="For the &quot;Memory barrier&quot; variant: specifies the limitation on the Memory Effects and maintenance operations ordered by" link="CRm_option__2">&lt;option&gt;</a><text>|#</text><a hover="Is a 4-bit unsigned immediate, in the range 0 to 15, encoded in the &quot;CRm&quot; field." link="option__2">&lt;imm&gt;</a><text>)</text></asmtemplate>
      </encoding>
      <ps_section howmany="1">
        <ps name="A64.control.barriers.DSB_BO_barriers" sections="1" secttype="noheading">
          <pstext mayhavelinks="1" section="Decode" rep_section="decode">var nXS : boolean = FALSE;

var alias : <a link="type_DSBAlias" file="shared_pseudocode.xml">DSBAlias</a>;
case CRm of
    when '0000' =&gt; alias = <a link="enum_DSBAlias_SSBB" file="shared_pseudocode.xml">DSBAlias_SSBB</a>;
    when '0100' =&gt; alias = <a link="enum_DSBAlias_PSSBB" file="shared_pseudocode.xml">DSBAlias_PSSBB</a>;
    otherwise   =&gt; alias = <a link="enum_DSBAlias_DSB" file="shared_pseudocode.xml">DSBAlias_DSB</a>;
end;


var scope : <a link="type_MBMaintenanceScope" file="shared_pseudocode.xml">MBMaintenanceScope</a>;
var types : <a link="type_MBReqTypes" file="shared_pseudocode.xml">MBReqTypes</a>;
case CRm[1:0] of
    when '00' =&gt;
        types = <a link="enum_MBReqTypes_All" file="shared_pseudocode.xml">MBReqTypes_All</a>;
        scope = <a link="enum_MBMaintenanceScope_OuterShareable" file="shared_pseudocode.xml">MBMaintenanceScope_OuterShareable</a>;
    when '01' =&gt;
        types = <a link="enum_MBReqTypes_Reads" file="shared_pseudocode.xml">MBReqTypes_Reads</a>;
        scope = <a link="enum_MBMaintenanceScope_None" file="shared_pseudocode.xml">MBMaintenanceScope_None</a>;
    when '10' =&gt;
        types = <a link="enum_MBReqTypes_Writes" file="shared_pseudocode.xml">MBReqTypes_Writes</a>;
        scope = <a link="enum_MBMaintenanceScope_None" file="shared_pseudocode.xml">MBMaintenanceScope_None</a>;
    when '11' =&gt;
        types = <a link="enum_MBReqTypes_All" file="shared_pseudocode.xml">MBReqTypes_All</a>;
        case CRm[3:2] of
            when '00' =&gt; scope = <a link="enum_MBMaintenanceScope_OuterShareable" file="shared_pseudocode.xml">MBMaintenanceScope_OuterShareable</a>;
            when '01' =&gt; scope = <a link="enum_MBMaintenanceScope_Nonshareable" file="shared_pseudocode.xml">MBMaintenanceScope_Nonshareable</a>;
            when '10' =&gt; scope = <a link="enum_MBMaintenanceScope_InnerShareable" file="shared_pseudocode.xml">MBMaintenanceScope_InnerShareable</a>;
            when '11' =&gt; scope = <a link="enum_MBMaintenanceScope_OuterShareable" file="shared_pseudocode.xml">MBMaintenanceScope_OuterShareable</a>;
        end;
end;</pstext></ps>
      </ps_section>
    </iclass>
    <iclass name="Memory nXS barrier" oneof="2" id="iclass_memory_nxs_barrier" no_encodings="1" isa="A64">
      <docvars>
        <docvar key="dsb-variants" value="dsb-nxs"/>
        <docvar key="instr-class" value="system"/>
        <docvar key="isa" value="A64"/>
        <docvar key="mnemonic" value="DSB"/>
      </docvars>
      <iclassintro count="1"/>
      <arch_variants>
        <arch_variant feature="FEAT_XS" name="v8Ap7"/>
      </arch_variants>
      <regdiagram form="32" psname="A64.control.barriers.DSB_BOn_barriers" tworows="1">
        <box hibit="31" width="3" settings="3">
          <c>1</c>
          <c>1</c>
          <c>0</c>
        </box>
        <box hibit="28" width="3" settings="3">
          <c>1</c>
          <c>0</c>
          <c>1</c>
        </box>
        <box hibit="25" width="14" settings="14">
          <c>0</c>
          <c>1</c>
          <c>0</c>
          <c>0</c>
          <c>0</c>
          <c>0</c>
          <c>0</c>
          <c>0</c>
          <c>1</c>
          <c>1</c>
          <c>0</c>
          <c>0</c>
          <c>1</c>
          <c>1</c>
        </box>
        <box hibit="11" width="2" name="imm2" usename="1">
          <c colspan="2"/>
        </box>
        <box hibit="9" width="2" settings="2">
          <c>1</c>
          <c>0</c>
        </box>
        <box hibit="7" width="3" name="op2" usename="1" settings="3" psbits="xxx">
          <c>0</c>
          <c>0</c>
          <c>1</c>
        </box>
        <box hibit="4" width="5" name="Rt" usename="1" settings="5" psbits="xxxxx">
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>1</c>
        </box>
      </regdiagram>
      <encoding name="DSB_BOn_barriers" oneofinclass="1" oneof="2" label="">
        <docvars>
          <docvar key="dsb-variants" value="dsb-nxs"/>
          <docvar key="instr-class" value="system"/>
          <docvar key="isa" value="A64"/>
          <docvar key="mnemonic" value="DSB"/>
        </docvars>
        <asmtemplate><text>DSB  </text><a hover="For the &quot;Memory nXS barrier&quot; variant: specifies the limitation on the barrier operation, and is " link="imm2_option">&lt;option&gt;</a><text>nXS</text></asmtemplate>
      </encoding>
      <ps_section howmany="1">
        <ps name="A64.control.barriers.DSB_BOn_barriers" sections="1" secttype="noheading">
          <pstext mayhavelinks="1" section="Decode" rep_section="decode">if !IsFeatureImplemented(FEAT_XS) then <a link="func_EndOfDecode_1" file="shared_pseudocode.xml">EndOfDecode</a>(<a link="enum_Decode_UNDEF" file="shared_pseudocode.xml">Decode_UNDEF</a>); end;
let types : <a link="type_MBReqTypes" file="shared_pseudocode.xml">MBReqTypes</a> = <a link="enum_MBReqTypes_All" file="shared_pseudocode.xml">MBReqTypes_All</a>;
var nXS : boolean = TRUE;
let alias : <a link="type_DSBAlias" file="shared_pseudocode.xml">DSBAlias</a> = <a link="enum_DSBAlias_DSB" file="shared_pseudocode.xml">DSBAlias_DSB</a>;
var scope : <a link="type_MBMaintenanceScope" file="shared_pseudocode.xml">MBMaintenanceScope</a>;
case imm2 of
    when '00' =&gt; scope = <a link="enum_MBMaintenanceScope_OuterShareable" file="shared_pseudocode.xml">MBMaintenanceScope_OuterShareable</a>;
    when '01' =&gt; scope = <a link="enum_MBMaintenanceScope_Nonshareable" file="shared_pseudocode.xml">MBMaintenanceScope_Nonshareable</a>;
    when '10' =&gt; scope = <a link="enum_MBMaintenanceScope_InnerShareable" file="shared_pseudocode.xml">MBMaintenanceScope_InnerShareable</a>;
    when '11' =&gt; scope = <a link="enum_MBMaintenanceScope_OuterShareable" file="shared_pseudocode.xml">MBMaintenanceScope_OuterShareable</a>;
end;</pstext></ps>
      </ps_section>
    </iclass>
  </classes>
  <explanations scope="all">
    <explanation enclist="DSB_BO_barriers" symboldefcount="1">
      <symbol link="CRm_option__2">&lt;option&gt;</symbol>
      <definition encodedin="CRm">
        <intro>
          <para>For the &quot;Memory barrier&quot; variant: specifies the limitation on the Memory Effects and maintenance operations ordered by
the barrier operation, and is encoded in &quot;CRm&quot;.</para>
          <note>
            <para>The value <binarynumber>0b0000</binarynumber> is used to encode <instruction>SSBB</instruction> and the value <binarynumber>0b0100</binarynumber>
is used to encode <instruction>PSSBB</instruction>.</para>
          </note>
          <para>For more information on whether an access is before or after a barrier instruction,
see <xref linkend="BEICEFJH">Data Synchronization Barrier (DSB)</xref>.</para>
        </intro>
        <table class="valuetable">
          <tgroup cols="3">
            <thead>
              <row>
                <entry class="bitfield">CRm</entry>
                <entry class="symbol">&lt;option&gt;</entry>
                <entry class="symbol">Description</entry>
              </row>
            </thead>
            <tbody>
              <row>
                <entry class="bitfield">0001</entry>
                <entry class="symbol">OSHLD</entry>
                <entry class="description">
                  <para>This option has the same behavior as LD and is deprecated.</para>
                </entry>
              </row>
              <row>
                <entry class="bitfield">0010</entry>
                <entry class="symbol">OSHST</entry>
                <entry class="description">
                  <para>This option has the same behavior as ST and is deprecated.</para>
                </entry>
              </row>
              <row>
                <entry class="bitfield">0011</entry>
                <entry class="symbol">OSH</entry>
                <entry class="description">
                  <para>This option has the same behavior as SY.</para>
                </entry>
              </row>
              <row>
                <entry class="bitfield">0101</entry>
                <entry class="symbol">NSHLD</entry>
                <entry class="description">
                  <para>This option has the same behavior as LD and is deprecated.</para>
                </entry>
              </row>
              <row>
                <entry class="bitfield">0110</entry>
                <entry class="symbol">NSHST</entry>
                <entry class="description">
                  <para>This option has the same behavior as ST and is deprecated.</para>
                </entry>
              </row>
              <row>
                <entry class="bitfield">0111</entry>
                <entry class="symbol">NSH</entry>
                <entry class="description">
                  <para>Non-shareable is the required maintenance scope. Reads and writes are
the required access types, both before and after the barrier instruction.</para>
                </entry>
              </row>
              <row>
                <entry class="bitfield">1x00</entry>
                <entry class="symbol">RESERVED</entry>
                <entry class="description"/>
              </row>
              <row>
                <entry class="bitfield">1001</entry>
                <entry class="symbol">ISHLD</entry>
                <entry class="description">
                  <para>This option has the same behavior as LD and is deprecated.</para>
                </entry>
              </row>
              <row>
                <entry class="bitfield">1010</entry>
                <entry class="symbol">ISHST</entry>
                <entry class="description">
                  <para>This option has the same behavior as ST and is deprecated.</para>
                </entry>
              </row>
              <row>
                <entry class="bitfield">1011</entry>
                <entry class="symbol">ISH</entry>
                <entry class="description">
                  <para>Inner Shareable is the required maintenance scope. Reads and writes are
the required access types, both before and after the barrier instruction.</para>
                </entry>
              </row>
              <row>
                <entry class="bitfield">1101</entry>
                <entry class="symbol">LD</entry>
                <entry class="description">
                  <para>Reads are the required access type before the barrier instruction.
Reads and writes are the required access types after the barrier instruction.</para>
                </entry>
              </row>
              <row>
                <entry class="bitfield">1110</entry>
                <entry class="symbol">ST</entry>
                <entry class="description">
                  <para>Writes are the required access type, both before and after the
barrier instruction.</para>
                </entry>
              </row>
              <row>
                <entry class="bitfield">1111</entry>
                <entry class="symbol">SY</entry>
                <entry class="description">
                  <para>Outer Shareable is the required maintenance scope. Reads and writes are
the required access types, both before and after the barrier instruction.</para>
                </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
        <after>All encodings of &quot;CRm&quot; that are listed as reserved can be encoded using the #&lt;imm&gt; syntax.
All reserved options have the same behavior as SY, but software must not rely on this behavior.</after>
      </definition>
    </explanation>
    <explanation enclist="DSB_BOn_barriers" symboldefcount="2">
      <symbol link="imm2_option">&lt;option&gt;</symbol>
      <definition encodedin="imm2">
        <intro>For the &quot;Memory nXS barrier&quot; variant: specifies the limitation on the barrier operation, and is </intro>
        <table class="valuetable">
          <tgroup cols="3">
            <thead>
              <row>
                <entry class="bitfield">imm2</entry>
                <entry class="symbol">&lt;option&gt;</entry>
                <entry class="symbol">Description</entry>
              </row>
            </thead>
            <tbody>
              <row>
                <entry class="bitfield">00</entry>
                <entry class="symbol">OSH</entry>
                <entry class="description">
                  <para>This option has the same behavior as SY.</para>
                </entry>
              </row>
              <row>
                <entry class="bitfield">01</entry>
                <entry class="symbol">NSH</entry>
                <entry class="description">
                  <para>Non-shareable is the required maintenance scope.
Reads and writes are the required access types, both before and after the barrier instruction.</para>
                </entry>
              </row>
              <row>
                <entry class="bitfield">10</entry>
                <entry class="symbol">ISH</entry>
                <entry class="description">
                  <para>Inner Shareable is the required maintenance scope.
Reads and writes are the required access types, both before and after the barrier instruction.</para>
                </entry>
              </row>
              <row>
                <entry class="bitfield">11</entry>
                <entry class="symbol">SY</entry>
                <entry class="description">
                  <para>Outer Shareable is the required maintenance scope.
Reads and writes are the required access types, both before and after the barrier instruction.</para>
                </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </definition>
    </explanation>
    <explanation enclist="DSB_BO_barriers" symboldefcount="1">
      <symbol link="option__2">&lt;imm&gt;</symbol>
      <account encodedin="CRm">
        <intro>
          <para>Is a 4-bit unsigned immediate, in the range 0 to 15, encoded in the &quot;CRm&quot; field.</para>
        </intro>
      </account>
    </explanation>
  </explanations>
  <aliastablehook anchor="aliasconditions">Alias Conditions</aliastablehook>
  <ps_section howmany="1">
    <ps name="A64.control.barriers.DSB_BO_barriers" sections="1" secttype="Operation">
      <pstext mayhavelinks="1" section="Execute" rep_section="execute">case alias of
    when <a link="enum_DSBAlias_SSBB" file="shared_pseudocode.xml">DSBAlias_SSBB</a> =&gt;
        SpeculativeStoreBypassBarrierToVA();
    when <a link="enum_DSBAlias_PSSBB" file="shared_pseudocode.xml">DSBAlias_PSSBB</a> =&gt;
        SpeculativeStoreBypassBarrierToPA();
    when <a link="enum_DSBAlias_DSB" file="shared_pseudocode.xml">DSBAlias_DSB</a> =&gt;
        if !nXS &amp;&amp; IsFeatureImplemented(FEAT_XS) then
            nXS = <a link="global_PSTATE" file="shared_pseudocode.xml">PSTATE</a>.EL IN {<a link="global_EL0" file="shared_pseudocode.xml">EL0</a>, <a link="global_EL1" file="shared_pseudocode.xml">EL1</a>} &amp;&amp; <a link="func_IsHCRXEL2Enabled_0" file="shared_pseudocode.xml">IsHCRXEL2Enabled</a>() &amp;&amp; HCRX_EL2().FnXS == '1';
        end;
        DataSynchronizationBarrier(scope, types, nXS);
    otherwise =&gt;
        unreachable;
end;</pstext></ps>
  </ps_section>
  <timestamp>2026-03-26 20:27:25</timestamp>
  <commit_id>2026-03_rel</commit_id>
</instructionsection>