From ced8daa54e23c2e0463b9dae5e9b29cb9f018810 Mon Sep 17 00:00:00 2001 From: Deepak Gupta Date: Tue, 22 Nov 2022 00:02:10 -0800 Subject: [PATCH] cfi_forward: Typo fixes and updating csr name Fixing a type for lpsul. xcfistatus no longer is part of spec. Changing xcfistatus to xstatus whereever applicable. Signed-off-by: Deepak Gupta --- cfi_forward.adoc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cfi_forward.adoc b/cfi_forward.adoc index 47c2e70..851a0f6 100644 --- a/cfi_forward.adoc +++ b/cfi_forward.adoc @@ -291,7 +291,7 @@ The operation of this instruction is as follows: [source, text] ---- If xFCFIACT == 1 - lplr.ML = inst.MLPL + lplr.UL = inst.ULPL else [rd] = 0; endif @@ -329,12 +329,12 @@ bar: A trap may need to be delivered to the same or higher privilege level on completion of JALR but before the instruction at the target of JALR was decoded. To avoid losing previous ELP state, MPELP and SPELP bits are provided in the -mcfistatus CSR for M-mode and HS/S-mode respectively. The `SPELP` bits can be -accessed through the `scfistatus` CSR. To avoid losing `ELP` state on traps to -VS-mode, `SPELP` bits are provided in `vcfistatus` (VS-modes version of -`scfistatus`) to hold the `ELP`. When a trap is taken into VS-mode, the `SPELP` -bits of `vcfistatus` CSR are updated with `ELP`. When `V=1`, `scfistatus` -aliases to `vcfistatus` CSR. The `xPELP` fields in `mcfistatus` and `vcfistatus` +mstatus CSR for M-mode and HS/S-mode respectively. The `SPELP` bits can be +accessed through the `sstatus` CSR. To avoid losing `ELP` state on traps to +VS-mode, `SPELP` bits are provided in `vsstatus` (VS-modes version of +`sstatus`) to hold the `ELP`. When a trap is taken into VS-mode, the `SPELP` +bits of `vsstatus` CSR are updated with `ELP`. When `V=1`, `sstatus` +aliases to `vsstatus` CSR. The `xPELP` fields in `mstatus` and `vsstatus` are WARL fields. The trap handler should preserve the `lplr` CSR. When a trap is taken into privilege mode `x`, the `xELP` bits are updated with @@ -342,5 +342,5 @@ current `ELP` and `ELP` is set to `NO_LP_EXPECTED`. `MRET` or `SRET` instruction is used to return from a trap in M-mode or S-mode respectively. When executing an `xRET` instruction, the `ELP` is set to `xPELP` -and xPELP is set to `NO_LP_EXPECTED`. The trap handler should put back the +and xPELP is set to `NO_LP_EXPECTED`. The trap handler should restore the preserved `lplr` value before invoking `SRET` or `MRET`.