The chapter 'smclic M-mode CLIC extension' shows the existence of the mscratchcsw CSR in its subsection on CLIC CSRs.
The subsection 'Scratch Swap CSR (xscratchcsw) for Multiple Privilege Modes' then states that 'a new CSR xscratchcsw can be defined for all but the lowest privilege mode ...'.
The meaning of 'lowest privilege mode' is a little bit ambiguous: Does it always mean 'user mode' (independent of what privilege modes a CPU might support) or does it mean 'lowest privilege mode supported in a given implementation'? The difference between these two interpretations is easily explained for a CPU that is machine mode only. I realize that in such a machine the mscratchcsw is useless, but the question is whether it shall still exist or not (its specified behavior is perfectly valid even if only machine mode exists).
So, on a machine mode only CPU is mscratchcsw still mandatory or shall it not be present?
Hi,
The chapter 'smclic M-mode CLIC extension' shows the existence of the mscratchcsw CSR in its subsection on CLIC CSRs.
The subsection 'Scratch Swap CSR (xscratchcsw) for Multiple Privilege Modes' then states that 'a new CSR xscratchcsw can be defined for all but the lowest privilege mode ...'.
The meaning of 'lowest privilege mode' is a little bit ambiguous: Does it always mean 'user mode' (independent of what privilege modes a CPU might support) or does it mean 'lowest privilege mode supported in a given implementation'? The difference between these two interpretations is easily explained for a CPU that is machine mode only. I realize that in such a machine the mscratchcsw is useless, but the question is whether it shall still exist or not (its specified behavior is perfectly valid even if only machine mode exists).
So, on a machine mode only CPU is mscratchcsw still mandatory or shall it not be present?
Best regards, Arjan