152 lines
10 KiB
XML
152 lines
10 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<?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-2022 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="DCPS3" title="DCPS3 -- AArch32" type="instruction">
|
|
<docvars>
|
|
<docvar key="armarmheading" value="T1" />
|
|
<docvar key="instr-class" value="general" />
|
|
<docvar key="isa" value="T32" />
|
|
<docvar key="mnemonic" value="DCPS3" />
|
|
</docvars>
|
|
<heading>DCPS3</heading>
|
|
<desc>
|
|
<brief>
|
|
<para>Debug Change PE State to EL3</para>
|
|
</brief>
|
|
<authored>
|
|
<para>Debug Change PE State to EL3 allows the debugger to move the PE into EL3 from a lower Exception level or to a specific mode at the current Exception level.</para>
|
|
<para><instruction>DCPS3</instruction> is <arm-defined-word>undefined</arm-defined-word> if any of:</para>
|
|
<list type="unordered">
|
|
<listitem><content>The PE is in Non-debug state.</content></listitem>
|
|
<listitem><content>EL3 is not implemented.</content></listitem>
|
|
<listitem><content>EDSCR.SDD is set to 1.</content></listitem>
|
|
</list>
|
|
<para>When the PE executes <instruction>DCPS3</instruction>:</para>
|
|
<list type="unordered">
|
|
<listitem><content>If EL3 is using AArch32, the PE enters Monitor mode and LR_mon, SPSR_mon, DLR and DSPSR become <arm-defined-word>UNKNOWN</arm-defined-word>. If <instruction>DCPS3</instruction> is executed in Monitor mode, SCR.NS is cleared to 0.</content></listitem>
|
|
<listitem><content>If EL3 is using AArch64, the PE enters EL3 using AArch64, selects SP_EL3, and ELR_EL3, ESR_EL3, SPSR_EL3, DLR_EL0 and DSPSR_EL0 become <arm-defined-word>UNKNOWN</arm-defined-word>.</content></listitem>
|
|
</list>
|
|
<para>For more information on the operation of the DCPS<n> instructions, see <xref linkend="dcps">DCPS</xref>.</para>
|
|
</authored>
|
|
</desc>
|
|
<alias_list howmany="0"></alias_list>
|
|
<classes>
|
|
<iclass name="T1" oneof="1" id="iclass_t1" no_encodings="1" isa="T32">
|
|
<docvars>
|
|
<docvar key="armarmheading" value="T1" />
|
|
<docvar key="instr-class" value="general" />
|
|
<docvar key="isa" value="T32" />
|
|
<docvar key="mnemonic" value="DCPS3" />
|
|
</docvars>
|
|
<iclassintro count="1"></iclassintro>
|
|
<regdiagram form="16x2" psname="aarch32/instrs/DCPS3/T1_A.txt">
|
|
<box hibit="31" width="12" settings="12">
|
|
<c>1</c>
|
|
<c>1</c>
|
|
<c>1</c>
|
|
<c>1</c>
|
|
<c>0</c>
|
|
<c>1</c>
|
|
<c>1</c>
|
|
<c>1</c>
|
|
<c>1</c>
|
|
<c>0</c>
|
|
<c>0</c>
|
|
<c>0</c>
|
|
</box>
|
|
<box hibit="19" width="4" name="imm4" settings="4">
|
|
<c>1</c>
|
|
<c>1</c>
|
|
<c>1</c>
|
|
<c>1</c>
|
|
</box>
|
|
<box hibit="15" width="4" settings="4">
|
|
<c>1</c>
|
|
<c>0</c>
|
|
<c>0</c>
|
|
<c>0</c>
|
|
</box>
|
|
<box hibit="11" width="10" name="imm10" settings="10">
|
|
<c>0</c>
|
|
<c>0</c>
|
|
<c>0</c>
|
|
<c>0</c>
|
|
<c>0</c>
|
|
<c>0</c>
|
|
<c>0</c>
|
|
<c>0</c>
|
|
<c>0</c>
|
|
<c>0</c>
|
|
</box>
|
|
<box hibit="1" width="2" name="opt" settings="2">
|
|
<c>1</c>
|
|
<c>1</c>
|
|
</box>
|
|
</regdiagram>
|
|
<encoding name="DCPS3_T1" oneofinclass="1" oneof="1" label="T1">
|
|
<docvars>
|
|
<docvar key="armarmheading" value="T1" />
|
|
<docvar key="instr-class" value="general" />
|
|
<docvar key="isa" value="T32" />
|
|
<docvar key="mnemonic" value="DCPS3" />
|
|
</docvars>
|
|
<asmtemplate><text>DCPS3</text></asmtemplate>
|
|
</encoding>
|
|
<ps_section howmany="1">
|
|
<ps name="aarch32/instrs/DCPS3/T1_A.txt" mylink="aarch32.instrs.DCPS3.T1_A.txt" enclabels="" sections="1" secttype="noheading">
|
|
<pstext mayhavelinks="1" section="Decode" rep_section="decode">if !<a link="impl-shared.HaveEL.1" file="shared_pseudocode.xml" hover="function: boolean HaveEL(bits(2) el)">HaveEL</a>(<a link="EL3" file="shared_pseudocode.xml" hover="constant bits(2) EL3 = '11'">EL3</a>) then UNDEFINED;</pstext>
|
|
</ps>
|
|
</ps_section>
|
|
</iclass>
|
|
</classes>
|
|
<explanations scope="all"></explanations>
|
|
<ps_section howmany="1">
|
|
<ps name="aarch32/instrs/DCPS3/Op_A.txt" mylink="execute" enclabels="" sections="1" secttype="Operation">
|
|
<pstext mayhavelinks="1" section="Execute" rep_section="execute">if !<a link="impl-shared.Halted.0" file="shared_pseudocode.xml" hover="function: boolean Halted()">Halted</a>() || EDSCR.SDD == '1' then UNDEFINED;
|
|
|
|
if <a link="impl-shared.ELUsingAArch32.1" file="shared_pseudocode.xml" hover="function: boolean ELUsingAArch32(bits(2) el)">ELUsingAArch32</a>(<a link="EL3" file="shared_pseudocode.xml" hover="constant bits(2) EL3 = '11'">EL3</a>) then
|
|
from_secure = <a link="impl-shared.CurrentSecurityState.0" file="shared_pseudocode.xml" hover="function: SecurityState CurrentSecurityState()">CurrentSecurityState</a>() == <a link="SS_Secure" file="shared_pseudocode.xml" hover="enumeration SecurityState { SS_NonSecure, SS_Root, SS_Realm, SS_Secure }">SS_Secure</a>;
|
|
if PSTATE.M == <a link="M32_Monitor" file="shared_pseudocode.xml" hover="constant bits(5) M32_Monitor = '10110'">M32_Monitor</a> then SCR.NS = '0';
|
|
<a link="AArch32.WriteMode.1" file="shared_pseudocode.xml" hover="function: AArch32.WriteMode(bits(5) mode)">AArch32.WriteMode</a>(<a link="M32_Monitor" file="shared_pseudocode.xml" hover="constant bits(5) M32_Monitor = '10110'">M32_Monitor</a>);
|
|
if <a link="impl-shared.HavePANExt.0" file="shared_pseudocode.xml" hover="function: boolean HavePANExt()">HavePANExt</a>() then
|
|
if !from_secure then
|
|
PSTATE.PAN = '0';
|
|
elsif SCTLR.SPAN == '0' then
|
|
PSTATE.PAN = '1';
|
|
PSTATE.E = SCTLR.EE;
|
|
|
|
LR_mon = bits(32) UNKNOWN;
|
|
SPSR_mon = bits(32) UNKNOWN;
|
|
|
|
DLR = bits(32) UNKNOWN;
|
|
DSPSR = bits(32) UNKNOWN;
|
|
else // Targeting EL3 using AArch64
|
|
<a link="AArch64.MaybeZeroRegisterUppers.0" file="shared_pseudocode.xml" hover="function: AArch64.MaybeZeroRegisterUppers()">AArch64.MaybeZeroRegisterUppers</a>();
|
|
MaybeZeroSVEUppers(EL3);
|
|
PSTATE.nRW = '0';
|
|
PSTATE.SP = '1';
|
|
PSTATE.EL = <a link="EL3" file="shared_pseudocode.xml" hover="constant bits(2) EL3 = '11'">EL3</a>;
|
|
if <a link="impl-shared.HaveUAOExt.0" file="shared_pseudocode.xml" hover="function: boolean HaveUAOExt()">HaveUAOExt</a>() then PSTATE.UAO = '0';
|
|
|
|
ELR_EL3 = bits(64) UNKNOWN;
|
|
ESR_EL3 = bits(64) UNKNOWN;
|
|
SPSR_EL3 = bits(64) UNKNOWN;
|
|
|
|
DLR_EL0 = bits(64) UNKNOWN;
|
|
DSPSR_EL0 = bits(64) UNKNOWN;
|
|
|
|
sync_errors = <a link="impl-shared.HaveIESB.0" file="shared_pseudocode.xml" hover="function: boolean HaveIESB()">HaveIESB</a>() && SCTLR_EL3.IESB == '1';
|
|
if <a link="impl-shared.HaveDoubleFaultExt.0" file="shared_pseudocode.xml" hover="function: boolean HaveDoubleFaultExt()">HaveDoubleFaultExt</a>() && <a link="impl-shared.EffectiveEA.0" file="shared_pseudocode.xml" hover="function: bit EffectiveEA()">EffectiveEA</a>() == '1' && SCR_EL3.NMEA == '1' then
|
|
sync_errors = TRUE;
|
|
// SCTLR_EL3.IESB might be ignored in Debug state.
|
|
if !<a link="impl-shared.ConstrainUnpredictableBool.1" file="shared_pseudocode.xml" hover="function: boolean ConstrainUnpredictableBool(Unpredictable which)">ConstrainUnpredictableBool</a>(<a link="Unpredictable_IESBinDebug" file="shared_pseudocode.xml" hover="enumeration Unpredictable { Unpredictable_VMSR, Unpredictable_WBOVERLAPLD, Unpredictable_WBOVERLAPST, Unpredictable_LDPOVERLAP, Unpredictable_BASEOVERLAP, Unpredictable_DATAOVERLAP, Unpredictable_DEVPAGE2, Unpredictable_INSTRDEVICE, Unpredictable_RESCPACR, Unpredictable_RESMAIR, Unpredictable_S1CTAGGED, Unpredictable_S2RESMEMATTR, Unpredictable_RESTEXCB, Unpredictable_RESPRRR, Unpredictable_RESDACR, Unpredictable_RESVTCRS, Unpredictable_RESTnSZ, Unpredictable_RESTCF, Unpredictable_DEVICETAGSTORE, Unpredictable_OORTnSZ, Unpredictable_LARGEIPA, Unpredictable_ESRCONDPASS, Unpredictable_ILZEROIT, Unpredictable_ILZEROT, Unpredictable_BPVECTORCATCHPRI, Unpredictable_VCMATCHHALF, Unpredictable_VCMATCHDAPA, Unpredictable_WPMASKANDBAS, Unpredictable_WPBASCONTIGUOUS, Unpredictable_RESWPMASK, Unpredictable_WPMASKEDBITS, Unpredictable_RESBPWPCTRL, Unpredictable_BPNOTIMPL, Unpredictable_RESBPTYPE, Unpredictable_BPNOTCTXCMP, Unpredictable_BPMATCHHALF, Unpredictable_BPMISMATCHHALF, Unpredictable_RESTARTALIGNPC, Unpredictable_RESTARTZEROUPPERPC, Unpredictable_ZEROUPPER, Unpredictable_ERETZEROUPPERPC, Unpredictable_A32FORCEALIGNPC, Unpredictable_SMD, Unpredictable_NONFAULT, Unpredictable_SVEZEROUPPER, Unpredictable_SVELDNFDATA, Unpredictable_SVELDNFZERO, Unpredictable_CHECKSPNONEACTIVE, Unpredictable_SMEZEROUPPER, Unpredictable_NVNV1, Unpredictable_Shareability, Unpredictable_AFUPDATE, Unpredictable_DBUPDATE, Unpredictable_IESBinDebug, Unpredictable_BADPMSFCR, Unpredictable_ZEROBTYPE, Unpredictable_EL2TIMESTAMP, Unpredictable_EL1TIMESTAMP, Unpredictable_RESERVEDNSxB, Unpredictable_WFxTDEBUG, Unpredictable_LS64UNSUPPORTED, Unpredictable_MISALIGNEDATOMIC, Unpredictable_CLEARERRITEZERO, Unpredictable_ALUEXCEPTIONRETURN, Unpredictable_IGNORETRAPINDEBUG, Unpredictable_DBGxVR_RESS, Unpredictable_PMUEVENTCOUNTER, Unpredictable_PMSCR_PCT, Unpredictable_CounterReservedForEL2, Unpredictable_BRBFILTRATE, Unpredictable_MOPSOVERLAP31, Unpredictable_STOREONLYTAGCHECKEDCAS, Unpredictable_RESTC }">Unpredictable_IESBinDebug</a>) then
|
|
sync_errors = FALSE;
|
|
if sync_errors then <a link="impl-shared.SynchronizeErrors.0" file="shared_pseudocode.xml" hover="function: SynchronizeErrors()">SynchronizeErrors</a>();
|
|
|
|
<a link="impl-shared.UpdateEDSCRFields.0" file="shared_pseudocode.xml" hover="function: UpdateEDSCRFields()">UpdateEDSCRFields</a>(); // Update EDSCR PE state flags</pstext>
|
|
</ps>
|
|
</ps_section>
|
|
</instructionsection>
|