Skip to content

Commit bcd05b7

Browse files
authored
Merge pull request #1071 from ved-rivos/zicfilp
Integrated ratified Zicfilp extension
2 parents 4a00837 + e7b36d4 commit bcd05b7

File tree

4 files changed

+22
-2
lines changed

4 files changed

+22
-2
lines changed

Sdext.adoc

+8
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ acts as an illegal instruction, all such instructions must act as
6262
illegal instructions.
6363
. Instructions that depend on the value of the PC (e.g. `auipc`) may act
6464
as illegal instructions.
65+
. When the Zicfilp extension is implemented, the `ELP` state is
66+
`NO_LP_EXPECTED` and is not updated by any instructions. LPAD instruction
67+
executes as a no-op.
6568
. Effective XLEN is DXLEN.
6669
. Forward progress is guaranteed.
6770

@@ -176,6 +179,8 @@ When a hart halts:
176179

177180
. {dcsr-cause} is updated.
178181
. {dcsr-prv} and {dcsr-v} are set to reflect current privilege mode and virtualization mode.
182+
. If the Zicfilp extension is implemented, {dcsr-pelp} is set to the current
183+
`ELP` state and `ELP` is set to `NO_LP_EXPECTED`
179184
. {csr-dpc} is set to the next instruction that should be executed.
180185
. If the current instruction can be partially executed and should be
181186
restarted to complete, then the relevant state for that is updated. E.g.
@@ -191,6 +196,9 @@ When a hart resumes:
191196
. `pc` changes to the value stored in {csr-dpc}.
192197
. The current privilege mode and virtualization mode are changed to that
193198
specified by {dcsr-prv} and {dcsr-v}.
199+
. If the Zicfilp extension is enabled at the new privilege mode, the current
200+
`ELP` state is changed to that specified by {dcsr-pelp} else it is set to
201+
`NO_LP_EXPECTED`. {dcsr-pelp} is set to `NO_LP_EXPECTED`.
194202
. If the new privilege mode is less privileged than M-mode, `MPRV` in `mstatus` is cleared.
195203
. If the Smdbltrp extension is implemented and the new privilege mode is not M,
196204
then the `MDT` bit is set to 0.

implementations.adoc

+2-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ To resume execution, the debug module sets a flag which causes the hart
6565
to execute a `dret`. `dret` is an instruction that only has meaning
6666
while in Debug Mode and not executing from the Program Buffer. Its
6767
recommended encoding is 0x7b200073. When `dret` is executed, is restored
68-
from {csr-dpc} and normal execution resumes at the privilege set by {dcsr-prv} and {dcsr-v}.
68+
from {csr-dpc} and normal execution resumes at the privilege set by {dcsr-prv} and {dcsr-v},
69+
and the ELP state set by {dcsr-pelp}.
6970

7071
{dm-data0} etc. are mapped into regular memory at an address relative to with only
7172
a 12-bit `imm`. The exact address is an implementation detail that a

introduction.adoc

+2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ functionality.
4343
*DXLEN*:: Debug XLEN, which is the widest XLEN a hart supports, ignoring the
4444
current value of `mxl` in `misa`.
4545

46+
*ELP*:: Expected landing pad state, define by the Zicfilp extension.
47+
4648
*essential feature*:: An essential feature must be present in order for debug to work correctly.
4749

4850
*GPR*:: General Purpose Register.

xml/core_registers.xml

+10-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,16 @@ same project unless stated otherwise.
115115
reset using the Debug Module reset control.
116116
====
117117
</field>
118-
<field name="0" bits="18" access="R" reset="0" />
118+
<field name="pelp" bits="18" access="WARL" reset="0">
119+
This bit is part of ((Zicfilp)) and only exists when that extension
120+
is implemented.
121+
<value v="0" name="NO_LP_EXPECTED">
122+
No landing pad instruction expected.
123+
</value>
124+
<value v="1" name="LP_EXPECTED">
125+
A landing pad instruction is expected.
126+
</value>
127+
</field>
119128
<field name="ebreakvs" bits="17" access="WARL" reset="0">
120129
<value v="0" name="exception">
121130
`ebreak` instructions in VS-mode behave as described in the

0 commit comments

Comments
 (0)