Date
1 - 2 of 2
CSR address for debug scontext and hcontext
Greg Favor
I'll chime in with support for setting aside a small allocation of supervisor and hypervisor CSR numbers for debug use (similar to the current small allocation of machine CSRs for debug use). While Ernie describes two uses that need supervisor and hypervisor CSR numbers, it would be good to allow room for future growth in architectural debug functionality. And note that this is only allocating two 16-number CSR groups. Greg On Mon, Aug 3, 2020 at 11:03 AM Ernie Edgar <ernie.edgar@...> wrote:
|
|
Ernie Edgar
Hello, Background: Using ASID instead of scontext to qualify breakpoints has been suggested. However, many systems do not implement ASID or only implement a narrow field, forcing the OS to recycle ASID values. This makes ASID useless for breakpoint qualification. For those familiar with ARM, the equivalent registers in that architecture are CONTEXTIDR_EL1 and CONTEXTIDR_EL2. Problem: The Debug Spec was ratified before work on the hypervisor had gotten very far, so Debug Spec 0.13 does not provide full support for hypervisor-based systems. Among the missing items is a definition for an "hcontext" register to qualify breakpoints in a particular virtual machine. An argument could be made to use VMID for this, but the discussion above about ASID qualification would also apply to VMID. Proposed Solution: The Debug Task Group would like to suggest allocating a range of CSR addresses in one of the Supervisor Standard read/write regions and in one of the Hypervisor Standard read/write regions to use for debug registers. Our suggestion is 0x5A0-0x5AF for S-mode and 0x6A0-0x6AF for HS-mode, complementing the 0x7A0-0x7AF already defined for M-mode debug registers. Allocating more than just one address gives the Debug TG flexibility for the future. Thanks, Ernie Edgar RISC-V Debug Task Group |
|