Skip to content

Conversation

@wsipak
Copy link
Contributor

@wsipak wsipak commented Jun 28, 2024

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:

  1. default is "", which means M mode enabled, allows selecting S and U as [su]. (currently implemented)
  2. 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.
  3. default is "msu" - which means M,S,U modes are enabled. This wouldn't affect the default spike command line

Here's a PR in VeeR where I've proven VeeR's CI passes with these changes and --priv u:
chipsalliance/Cores-VeeR-EL2#197

@wkkuna
Copy link
Collaborator

wkkuna commented Feb 7, 2025

The changes have been approved and merged with #1001.
Closing.

@wkkuna wkkuna closed this Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants