(no commit message)
[libreriscv.git] / openpower / sv / sprs.mdwn
index 8c832ba8cbd3b3e4e6385d94f6e6c9903a481dfb..284ee61c3c7122d69cc7295c7425a559b8c791b4 100644 (file)
@@ -2,6 +2,11 @@
 
 # SPRs <a name="sprs"></a>
 
+Note OpenPOWER v3.1B p12:
+
+     The designated SPR sandbox consists of non-privileged SPRs
+     704-719 and privileged SPRs 720-735.
+
 There are five SPRs, available in any privilege level:
 
 * MVL (the Maximum Vector Length)
@@ -67,16 +72,16 @@ The format of the STATE SPR is as follows:
 
 | Field | Name     | Description           |
 | ----- | -------- | --------------------- |
-| 0:6   | maxvl    | Max Vector Length |
-| 7:13  |    vl    | Vector Length |
-| 14:20 | srcstep  | |
-| 21:27 | dststep  | |
-| 28:29 | subvl    | |
-| 30:31 | svstep   | |
+| 0:6   | maxvl    | Max Vector Length     |
+| 7:13  |    vl    | Vector Length         |
+| 14:20 | srcstep  | for srcstep = 0..VL-1 |
+| 21:27 | dststep  | for dststep = 0..VL-1 |
+| 28:29 | subvl    | Sub-vector length     |
+| 30:31 | svstep   | for svstep = 0..SUBVL-1  |
 
 The relationship between SUBVL and the subvl field is:
 
-| SUBVL | (25..24) |
+| SUBVL | (29..28) |
 | ----- | -------- |
 | 1     | 0b00     |
 | 2     | 0b01     |
@@ -92,12 +97,12 @@ Notes:
 
 # SVSRR0
 
-In scalar v3.0B traps, exceptions and interrupts, two SRRs are saved/resyored:
+In scalar v3.0B traps, exceptions and interrupts, two SRRs are saved/restored:
 
-* SRR0 to store the PC
+* SRR0 to store the PC (CIA/NIA)
 * SRR1 to store a copy of the MSR
 
-Given that SVSTATE is effectively a Sub-PC it is critically important to add saving/restoring of SVSTATE as a full peer equal in status to PC.  At any time PC is saved or restored, so is SVSTATE in **exactly** the same way for **exactly** the same reasons.
+Given that SVSTATE is effectively a Sub-PC it is critically important to add saving/restoring of SVSTATE as a full peer equal in status to PC, in every way.  At any time PC is saved or restored, so is SVSTATE in **exactly** the same way for **exactly** the same reasons.
 
 The SPR name given for the purposes of saving/restoring SVSTATE is SVSRR0.