Currently we're using the default settings of privilege modes in ISS tools.
Whisper needs a 'u' in the ISA string for the User mode to be enabled. Spike, on the other hand, enables both Supervisor and User modes by default (it has a --priv arugment with the default of msu.)
We can make it consistent by adding an argument to select the modes to be enabled in simulation.
With these changes, the default selection is M-mode only.
The --priv argument allows enabling Supervisor and User mode, while Machine mode is mandatory and can't be disabled.
I would appreciate feedback on the default value for the --priv argument. I can see several ways to implement it here:
default is "", which means M mode enabled, allows selecting S and U as [su]. (currently implemented)
default is "m", which means M mode enabled, allows selecting S and U as m[su] - in my view this is worse because M is mandatory anyway. Contrary to (1.) this doesn't use empty string for default.
default is "msu" - which means M,S,U modes are enabled. This wouldn't affect the default spike command line
Currently we're using the default settings of privilege modes in ISS tools. Whisper needs a 'u' in the ISA string for the User mode to be enabled. Spike, on the other hand, enables both Supervisor and User modes by default (it has a
--priv
arugment with the default ofmsu
.)We can make it consistent by adding an argument to select the modes to be enabled in simulation. With these changes, the default selection is M-mode only. The
--priv
argument allows enabling Supervisor and User mode, while Machine mode is mandatory and can't be disabled.I would appreciate feedback on the default value for the
--priv
argument. I can see several ways to implement it here:""
, which means M mode enabled, allows selecting S and U as[su]
. (currently implemented)"m"
, which means M mode enabled, allows selecting S and U asm[su]
- in my view this is worse because M is mandatory anyway. Contrary to (1.) this doesn't use empty string for default."msu"
- which means M,S,U modes are enabled. This wouldn't affect the defaultspike
command lineHere's a PR in VeeR where I've proven VeeR's CI passes with these changes and
--priv u
: https://github.com/chipsalliance/Cores-VeeR-EL2/pull/197