riscv-fast-interrupt icon indicating copy to clipboard operation
riscv-fast-interrupt copied to clipboard

The smclicshv extension naming (i.e. sm*) suggests it only has M-mode features but it affects S-mode and has one S-mode CSR bit

Open james-ball-qualcomm opened this issue 1 year ago • 4 comments

The smclicshv extension naming (i.e. sm*) suggests it only has M-mode features. Does it have S-mode features too? I ask because the smclicshv chapter uses the 'x' prefix notation instead of 'm'. What gives?

james-ball-qualcomm avatar Sep 30 '24 17:09 james-ball-qualcomm

From my side this extension is affecting all mode supported by the CLIC.

If CLIC is supporting only M mode, then this extension will affect only M registers If CLIC is supporting M and S mode, then this extension will affect M and S mode.

As soon as you get Selective Hardware vectoring supported on M mode, the cost to support it for S is for free. So x prefix is the good one from my side.

Maybe I forget some aspects. We can discuss this tonight.

jb-brelot-nxp avatar Oct 07 '24 14:10 jb-brelot-nxp

i think there is no precedent for an x prefix in an extension. the normal thing to do is to have a smclicshv and a ssclicshv. However, here we do not want them to be selectable individually. So if smclicshv and sslic are supported, ssclicshv is mandatory. Otherwise, ssclicshv is forbidden.

christian-herber-nxp avatar Oct 07 '24 14:10 christian-herber-nxp

Precedent in Priv ISA manual:

Chapter 5. "Smcsrind/Sscsrind" Indirect CSR Access, Version 1.0.0 5.1. Introduction Smcsrind/Sscsrind is an ISA extension that extends the indirect CSR access mechanism originally defined as part of the Smaia/Ssaia extensions, in order to make it available for use by other extensions without creating an unnecessary dependence on Smaia/Ssaia. This extension confers two benefits:

james-ball-qualcomm avatar Oct 07 '24 16:10 james-ball-qualcomm

Another:

Chapter 4. "Smstateen/Ssstateen" Extensions, Version 1.0.0

james-ball-qualcomm avatar Oct 07 '24 16:10 james-ball-qualcomm

shv extension was removed

christian-herber-nxp avatar Jun 16 '25 16:06 christian-herber-nxp