riscv / riscv-isa-manual

RISC-V Instruction Set Manual
https://riscv.org/
Creative Commons Attribution 4.0 International
3.52k stars 605 forks source link

state enable bit for small priv-1.13-era extensions #1147

Open aswaterman opened 10 months ago

aswaterman commented 10 months ago

Going forward, we'd like to allocate only a single stateen bit for small extensions defined between priv-spec releases, rather than allocating a bit for every small extension. This isn't an absolute rule; it's just an attempt to cut down on stateen bit count when practical.

The plan is that the qosid register will be controlled by the priv-1.13 stateen bit, and possibly other registers will, too.

ved-rivos commented 8 months ago

@aswaterman is there a position defined for this bit.

aswaterman commented 8 months ago

I'm pretty swamped right now. Can you make a proposal (and a PR once we an agree)?

ved-rivos commented 8 months ago

Will do.

Bits that are presently defined in xstateen0.

This issue proposes to define a single xstateen0 bit - bit 55 - to govern new state introduced by Priv-1.14-era extensions.

The state of the following extensions is expected to be governed by the bit 55:

ved-rivos commented 8 months ago

The bit 56 was initially intended for use by the counter delegation extension but was not pursued/approved. The updated definition is as follows:

An architecture decisions shall be made, per 1.14-era extensions, to determine if the extension should be governed by the bit provided in xstateen0 for the 1.14-era extensions or the extension should be governed by an extension specific bit. This determination is pending for Ssclic and Ssctr.

Bit 56 in CSR xstateen0 is defined to govern new state introduced by Priv-1.14-era extensions. Access to the CSR srmcfg introduced by the Ssqosid extension shall be governed by the bit 56 of CSR mstateen0.

aswaterman commented 8 months ago

Agreed.

ved-rivos commented 8 months ago

Bit 56 in CSR mstateen0 controls access to CSR henvcfgh.

Bit 55 in CSR mstateen0 is defined to control access to new state introduced by the following small extensions of Priv-1.14-era: