Skip to content

Commit

Permalink
Moved deprecated M-profile text into separate file.
Browse files Browse the repository at this point in the history
  • Loading branch information
kasanovic committed Feb 15, 2022
1 parent 77598e1 commit a4c37df
Show file tree
Hide file tree
Showing 2 changed files with 150 additions and 137 deletions.
116 changes: 116 additions & 0 deletions old-m-profiles.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
////
This file contains text on M-mode profiles that was deleted from the proposal.

=== RVA20M64 Profile

The RVA20M64 profile is defined to help provide compatibilty for
application-processor platforms that specify an M-mode execution
environment for portable software.

NOTE: Most OS platforms will have no code specified to run in M-mode,
instead accessing lower-level platform services via abstract
environment calls from supervisor mode.

NOTE: M-mode will often inherently include implementation-specific
features in addition to the profile requirements.

==== RVA20M64 Mandatory Extensions

- All RVA20S64 mandatory extensions, _except_ F, D, and misaligned loads
and stores.
- Sm1p11
- mvendorid, marchid, and mimpid registers must be nonzero.
- mstatus.TVM, mstatus.TW, and mstatus.TSR must be writable.
- mtvec.MODE must be capable of holding the value 0 (Direct).
When mtvec.MODE=Direct,
mtvec.BASE must be capable of holding any valid four-byte-aligned address.
- medeleg bits 3, 8, 12, 13, and 15 must be writable.
- mideleg bits 1, 5, and 9 must be writable. mideleg bits 3, 7, and 11
must be read-only zero.
- For any mhpmcounter that is writable, the corresponding bit
in mcounteren must be writable.
- mtval must be written with the faulting virtual address for load, store, and
instruction page-fault, access-fault, and misaligned exceptions, and for
breakpoint exceptions other than those caused by execution of the EBREAK or
C.EBREAK instructions.
For illegal-instruction exceptions, mtval must be written with the faulting
instruction.
- PMP entries 0-3 must be implemented and must support modes OFF, NAPOT,
and TOR, with a granularity of at most 4 KiB.

==== RVA20M64 Supported Optional Extensions

- All RVA20S64 supported optional extensions
- F
- D
- Misaligned loads and stores

NOTE: There are other options and parameters in the privileged
architecture that should be detailed here.

==== RVA20M64 Unsupported Optional Extensions

- All RVA20S64 unsupported optional extensions

==== RVA20M64 Incompatible Extensions

- All RVA20S64 incompatible extensions

////
////
IGNORE this text

=== RVA22M64 Profile

==== RVA22M64 Mandatory Extensions

- All RVA22S64 mandatory extensions, _except_ F, D, and misaligned loads
and stores.
- Sm1p12
- mvendorid, marchid, and mimpid registers must be nonzero.
- mstatus.TVM, mstatus.TW, and mstatus.TSR must be writable.
- mstatus.MBE, mstatus.SBE, and mstatus.UBE must not be read-only 1.
- mtvec.MODE must be capable of holding the value 0 (Direct).
When mtvec.MODE=Direct,
mtvec.BASE must be capable of holding any valid four-byte-aligned address.
- medeleg bits 3, 8, 12, 13, and 15 must be writable.
- mideleg bits 1, 5, and 9 must be writable. mideleg bits 3, 7, and 11
must be read-only zero.
- For any mhpmcounter that is writable, the corresponding bits
in mcounteren and mcountinhibit must be writable.
- mtval must be written with the faulting virtual address for load, store, and
instruction page-fault, access-fault, and misaligned exceptions, and for
breakpoint exceptions other than those caused by execution of the EBREAK or
C.EBREAK instructions.
For illegal-instruction exceptions, mtval must be written with the faulting
instruction.
- PMP entries 0-3 must be implemented and must support modes OFF, NAPOT,
and TOR, with a granularity of at most 4 KiB.

If the hypervisor extension is implemented, the following are also mandatory:
- medeleg bits 10, 20, 21, 22, and 23 must additionally be writable.
- mtval2 must be written with the faulting guest physical address in all
circumstances permitted by the ISA.

==== RVA22M64 Supported Optional Extensions

- All RVA22S64 supported optional extensions
- F
- D
- Misaligned loads and stores

NOTE: Consider making Zicbom supported-optional here to facilitate
trap & emulate, for systems that use some out-of-band mechanism?

NOTE: There are options and parameters in the privileged architecture
that should be detailed here.

==== RVA22M64 Unsupported Optional Extensions

- All RVA22S64 unsupported optional extensions

==== RVA22M64 Incompatible Extensions

- All RVA22S64 incompatible extensions
////
171 changes: 34 additions & 137 deletions profiles.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,9 @@ are the first to be defined. The others will be added later.

== RVA20 Profiles

The RVA20 profiles are intended to be used for application processors
running rich OS stacks. Only user-mode (RVA20U64) and supervisor-mode
(RVA20S64) profiles are specified in this family.
The RVA20 profiles are intended to be used for 64-bit application
processors running rich OS stacks. Only user-mode (RVA20U64) and
supervisor-mode (RVA20S64) profiles are specified in this family.

NOTE: There is no machine-mode profile defined. A machine-mode profile
for application processors would only be used in specifying platforms
Expand Down Expand Up @@ -484,9 +484,6 @@ NOTE: This extension is not expected to be widely used.
NOTE: Hardware vectoring of exception/interrupt traps is not generally
used by rich operating systems.




==== RVA20S64 Incompatible Extensions

There are no incompatible unprivileged extensions.
Expand All @@ -502,103 +499,50 @@ instruction support (e.g., by setting the `misa.c` bit) before
creating a supervisor-mode execution environment following the
RVA20S64 profile.

////
OLD TEXT TO BE IGNORED
=== RVA20M64 Profile
The RVA20M64 profile is defined to help provide compatibilty for
application-processor platforms that specify an M-mode execution
environment for portable software.
NOTE: Most OS platforms will have no code specified to run in M-mode,
instead accessing lower-level platform services via abstract
environment calls from supervisor mode.
NOTE: M-mode will often inherently include implementation-specific
features in addition to the profile requirements.
==== RVA20M64 Mandatory Extensions
- All RVA20S64 mandatory extensions, _except_ F, D, and misaligned loads
and stores.
- Sm1p11
- mvendorid, marchid, and mimpid registers must be nonzero.
- mstatus.TVM, mstatus.TW, and mstatus.TSR must be writable.
- mtvec.MODE must be capable of holding the value 0 (Direct).
When mtvec.MODE=Direct,
mtvec.BASE must be capable of holding any valid four-byte-aligned address.
- medeleg bits 3, 8, 12, 13, and 15 must be writable.
- mideleg bits 1, 5, and 9 must be writable. mideleg bits 3, 7, and 11
must be read-only zero.
- For any mhpmcounter that is writable, the corresponding bit
in mcounteren must be writable.
- mtval must be written with the faulting virtual address for load, store, and
instruction page-fault, access-fault, and misaligned exceptions, and for
breakpoint exceptions other than those caused by execution of the EBREAK or
C.EBREAK instructions.
For illegal-instruction exceptions, mtval must be written with the faulting
instruction.
- PMP entries 0-3 must be implemented and must support modes OFF, NAPOT,
and TOR, with a granularity of at most 4 KiB.
==== RVA20M64 Supported Optional Extensions
- All RVA20S64 supported optional extensions
- F
- D
- Misaligned loads and stores
NOTE: There are other options and parameters in the privileged
architecture that should be detailed here.
==== RVA20M64 Unsupported Optional Extensions

- All RVA20S64 unsupported optional extensions

==== RVA20M64 Incompatible Extensions

- All RVA20S64 incompatible extensions

////

== RVA22 Profiles

The RVA22 family of profiles are intended to be used for 64-bit
application processors running rich OS stacks.

NOTE: Only 64-bit is shown here, but should also include 32-bit
variant.
The RVA22 profiles are intended to be used for 64-bit application
processors running rich OS stacks. Only user-mode (RVA22U64) and
supervisor-mode (RVA22S64) profiles are specified in this family.

=== RVA22U64 Profile

The RVA22U64 profile represents the behavior of unprivileged code in
applications processors.
The RVA22U64 profile e specifies the ISA features available to
user-mode execution environments in 64-bit applications processors.
This is the most important profile within the application processor
family in terms of the amount of software that targets this profile.

==== RVA22U64 Mandatory Base

RV64I is the mandatory base ISA for RVA22U64.

==== RVA22U64 Mandatory Extensions

- M
- A
- F
- D
- C
- Zicsr
- Zicntr
- Zihpm
- Zicbom
- Zicbop
- Zicboz
- Zihintpause
- Zba
- Zbb
- Zbs
- Misaligned loads and stores to main memory regions with both the
cacheability and coherence PMAs must be supported.
- *M* Integer multiplication and divison.
- *A* Atomic instructions.
- *F* Single-precision floating-point instructions.
- *D* Double-precision floating-point instructions.
- *C* Compressed Instructions.
- *Zicsr* CSR instructions. These are implied by presence of F.
- *Zicntr* Base counters and timers.
- *Zihpm* Hardware performance counters.
- *Zicbom*
- *Zicbop*
- *Zicboz*
- *Zihintpause*
- *Zba* Address computation.
- *Zbb* Basic bit manipulation.
- *Zbs* Single-bit instructions.
- Main memory regions with both the cacheability and coherence PMAs must
support instruction fetch, AMOArithmetic, and RsrvEventual.
- Reservation sets must be contiguous and at least 16 bytes and at most 128 bytes in size.
- Implementations are strongly recommended to raise illegal-instruction
exceptions when attempting to execute unimplemented opcodes.
- Misaligned loads and stores to main memory regions with both the
cacheability and coherence PMAs must be supported.

NOTE: Even when supported, misaligned loads and stores might execute
extremely slowly. Standard software distributions should assume their
Expand Down Expand Up @@ -717,58 +661,11 @@ architecture that should be detailed here.

- All RVA22U64 incompatible extensions

=== RVA22M64 Profile

==== RVA22M64 Mandatory Extensions

- All RVA22S64 mandatory extensions, _except_ F, D, and misaligned loads
and stores.
- Sm1p12
- mvendorid, marchid, and mimpid registers must be nonzero.
- mstatus.TVM, mstatus.TW, and mstatus.TSR must be writable.
- mstatus.MBE, mstatus.SBE, and mstatus.UBE must not be read-only 1.
- mtvec.MODE must be capable of holding the value 0 (Direct).
When mtvec.MODE=Direct,
mtvec.BASE must be capable of holding any valid four-byte-aligned address.
- medeleg bits 3, 8, 12, 13, and 15 must be writable.
- mideleg bits 1, 5, and 9 must be writable. mideleg bits 3, 7, and 11
must be read-only zero.
- For any mhpmcounter that is writable, the corresponding bits
in mcounteren and mcountinhibit must be writable.
- mtval must be written with the faulting virtual address for load, store, and
instruction page-fault, access-fault, and misaligned exceptions, and for
breakpoint exceptions other than those caused by execution of the EBREAK or
C.EBREAK instructions.
For illegal-instruction exceptions, mtval must be written with the faulting
instruction.
- PMP entries 0-3 must be implemented and must support modes OFF, NAPOT,
and TOR, with a granularity of at most 4 KiB.

If the hypervisor extension is implemented, the following are also mandatory:
- medeleg bits 10, 20, 21, 22, and 23 must additionally be writable.
- mtval2 must be written with the faulting guest physical address in all
circumstances permitted by the ISA.

==== RVA22M64 Supported Optional Extensions

- All RVA22S64 supported optional extensions
- F
- D
- Misaligned loads and stores

NOTE: Consider making Zicbom supported-optional here to facilitate
trap & emulate, for systems that use some out-of-band mechanism?
==== RVA22S64 Recommendations

NOTE: There are options and parameters in the privileged architecture
that should be detailed here.

==== RVA22M64 Unsupported Optional Extensions

- All RVA22S64 unsupported optional extensions

==== RVA22M64 Incompatible Extensions
- Implementations are strongly recommended to raise illegal-instruction
exceptions when attempting to execute unimplemented opcodes.

- All RVA22S64 incompatible extensions

== Glossary of ISA Extensions

Expand Down

0 comments on commit a4c37df

Please sign in to comment.