Machine Scratch Register (mscratch): 0x340
The mscratch register is a 32-bit read/write register dedicated for use
by machine mode. Typically, it is used to hold a pointer to a machine mode hart-local
context space and swapped with a user register upon entry to an M-mode trap handler.
| 31 | 0 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| mscratch | ||||||||||||
| Bits | Field | Description | Single/Multi-Core | w/FPU | w/MMU |
|---|---|---|---|---|---|
| 0-31 | mscratch | A temporary scratch space that can be used by machine mode software. | Read/Write | Read/Write | Read/Write |