Skip to content

Add H csr vsip,hgeie,hideleg,hie,hip,hvip,vsie,vsscratch,hgeip #617

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions arch/csr/H/hgeie.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# yaml-language-server: $schema=../../../schemas/csr_schema.json

$schema: "csr_schema.json#"
kind: csr
name: hgeie
long_name: Hypervisor Guest External Interrupt Enable Register
description: |
The hgeie register is an HSXLEN-bit read/write register that contains enable bits for the guest external interrupts at this hart. Guest external interrupt number i corresponds with bit i in hgeie.

Guest external interrupts represent interrupts directed to individual virtual machines at VS-level. If a RISC-V platform supports placing a physical device under the direct control of a guest OS with minimal hypervisor intervention (known as pass-through or direct assignment between a virtual machine and the physical device), then, in such circumstance, interrupts from the device are intended for a specific virtual machine.

[Note]
Support for guest external interrupts requires an interrupt controller that can collect virtual-machine-directed interrupts separately from other interrupts.

The number of bits implemented in hgeie for guest external interrupts is UNSPECIFIED and may be zero. This number is known as GEILEN. The least-significant bits are implemented first, apart from bit 0. Hence, if GEILEN is nonzero, bits GEILEN:1 shall be writable in hgeie, and all other bit positions shall be read-only zeros.

Register hgeie selects the subset of guest external interrupts that cause a supervisor-level (HS-level) guest external interrupt. The enable bits in hgeie do not affect the VS-level external interrupt signal selected from hgeip by hstatus.VGEIN.
Comment on lines +7 to +17
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's change this to the new structured description. Should look like:

description:
  - id: csr-hgeie-purpose
    normative: true
    text: |
      The hgeie register is an HSXLEN-bit read/write register that contains enable bits for the guest external interrupts at this hart.
  - id: csr-hgeie-bits
    normative: true
    text: Guest external interrupt number i corresponds with bit i in hgeie.
  - id: csr-hgeie-interrupts
    normative: true
    text: |
      Guest external interrupts represent interrupts directed to individual virtual machines
      at VS-level.
      If a RISC-V platform supports placing a physical device under the direct control of a
      guest OS with minimal hypervisor intervention (known as pass-through or direct assignment
      between a virtual machine and the physical device), then, in such circumstance,
      interrupts from the device are intended for a specific virtual machine.
  - id: csr-hgeie-controller-req
    normative: false
    text: |
      Support for guest external interrupts requires an interrupt controller that can collect
      virtual-machine-directed interrupts separately from other interrupts.
  - id: csr-hgeie-geilen
    normative: true
    text: |
      The number of bits implemented in hgeie for guest external interrupts is UNSPECIFIED and
      may be zero.
      This number is known as `GEILEN`.
  - id: csr-hgeie-bitorder
    normative: true
    text: |
      The least-significant bits are implemented first, apart from bit 0.
  - id: csr-hgeie-nonzero-geilen
    normative: true
    text: |
      Hence, if GEILEN is nonzero, bits `GEILEN`:1 shall be writable in hgeie, and all other
      bit positions shall be read-only zeros.
  - id: csr-hgeie-select
    normative: true
    text: |
      Register hgeie selects the subset of guest external interrupts that cause a
      supervisor-level (HS-level) guest external interrupt.
  - id: csr-hgeie-hgeip
    normative: true
    text: |
      The enable bits in hgeie do not affect the VS-level external interrupt signal selected
      from hgeip by hstatus.VGEIN.

We should do this for all the descriptiong in the PR.

address: 0x607
priv_mode: S
definedBy: H
length: SXLEN
fields:
GEI_ENABLE:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add:

  long_name: Guest external interrupt enable bits

location_rv32: 31-1
location_rv64: 63-1
type: RW
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this field is WARL, the type is configuration-dependent; it's read-only if GEILEN is zero, and read/write otherwise. As a complication, UDB has encoded GEILEN as NUM_EXTERNAL_GUEST_INTERRUPTS.

  type(): return NUM_EXTERNAL_GUEST_INTERRUPTS > 0 ? CsrFieldType::RW : CsrFieldType::RO;

reset_value: 0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UNDEFINED_LEGAL

description: |
The number of bits implemented in hgeie for guest external interrupts is UNSPECIFIED and may be zero. This number is known as GEILEN. The least-significant bits are implemented first, apart from bit 0. Hence, if GEILEN is nonzero, bits GEILEN:1 shall be writable in hgeie, and all other bit positions shall be read-only zeros in hgeie.
Register hgeie selects the subset of guest external interrupts that cause a supervisor-level (HS-level) guest external interrupt. The enable bits in hgeie do not affect the VS-level external interrupt signal selected from hgeip by hstatus.VGEIN.
Comment on lines +28 to +30
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description here is already stated in the description of the CSR overall. For this field, I would just say "Enable bits; see description of hgeie".

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a sw_write function that masks any read-only bits:

  sw_write(csr_value): |
    return ((MXLEN`1 << NUM_EXTERNAL_GUEST_INTERRUPTS) - 1) & csr_value.GEI_ENABLE;

32 changes: 32 additions & 0 deletions arch/csr/H/hgeip.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# yaml-language-server: $schema=../../../schemas/csr_schema.json
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of the comments for hgeie apply here, too.


$schema: "csr_schema.json#"
kind: csr
name: hgeip
long_name: Hypervisor Guest External Interrupt Pending Register
description: |
The hgeip register is an HSXLEN-bit read-only register, formatted as that indicates pending guest external interrupts for this hart.

Guest external interrupts represent interrupts directed to individual virtual machines at VS-level.
If a RISC-V platform supports placing a physical device under the direct control of a guest OS with minimal hypervisor intervention (known as pass-through or direct assignment between a virtual machine and the physical device), then, in such circumstance, interrupts from the device are intended for a specific virtual machine.
Each bit of hgeip summarizes all pending interrupts directed to one virtual hart, as collected and reported by an interrupt controller. To distinguish specific pending interrupts from multiple devices, software must query the interrupt controller.

The number of bits implemented in hgeip and hgeie for guest external interrupts is UNSPECIFIED and may be zero.
This number is known as GEILEN. The least-significant bits are implemented first, apart from bit 0. Hence, if GEILEN is nonzero, bits GEILEN:1 shall be writable in hgeie, and all other bit positions shall be read-only zeros in both hgeip and hgeie
address: 0xE12
priv_mode: S
definedBy: H
length: SXLEN
fields:
GEI_PENDING:
location_rv32: 31-1
location_rv64: 63-1
type: RO
reset_value: 0
description: |
Each bit of hgeip summarizes all pending interrupts directed to one virtual hart, as collected and reported by an interrupt controller.
To distinguish specific pending interrupts from multiple devices, software must query the interrupt controller.

The number of bits implemented in hgeip and hgeie for guest external interrupts is UNSPECIFIED and may be zero. This number is known as GEILEN.
The least-significant bits are implemented first, apart from bit 0.
Hence, if GEILEN is nonzero, bits GEILEN:1 shall be writable in hgeie, and all other bit positions shall be read-only zeros in both hgeip and hgeie.
64 changes: 64 additions & 0 deletions arch/csr/H/hideleg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# yaml-language-server: $schema=../../../schemas/csr_schema.json

$schema: "csr_schema.json#"
kind: csr
name: hideleg
long_name: Hypervisor Interrupt Delegation Register
description: |
Register hideleg is an HSXLEN-bit read/write register. By default, all traps at any privilege level are handled in M-mode, though M-mode usually uses the medeleg and mideleg CSRs to delegate some traps to HS-mode.
The hedeleg and hideleg CSRs allow these traps to be further delegated to a VS-mode guest; their layout is the same as medeleg and mideleg.
An interrupt that has been delegated to HS-mode (using mideleg) is further delegated to VS-mode if the corresponding hideleg bit is set.
Among bits 15:0 of hideleg, bits 10, 6, and 2 (corresponding to the standard VS-level interrupts) are writable, and bits 12, 9, 5, and 1 (corresponding to the standard S-level interrupts) are read-only zeros.
address: 0x603
priv_mode: S
definedBy: H
length: SXLEN
fields:
SSI:
location: 1
type: RO
reset_value: 0
long_name: Supervisor Software Interrupt
description: Supervisor Software Interrupt

VSSI:
location: 2
type: RW
reset_value: 0
long_name: Virtual Supervisor Software Interrupt
description: Virtual Supervisor Software Interrupt
Comment on lines +24 to +29
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This applies to all the VS-level interrupt bits)

  • reset_value is UNDEFINED LEGAL
  • description should be "Delegates the Virtual Supervisor Software Interrupt to VS-mode"


STI:
location: 5
type: RO
reset_value: 0
long_name: Supervisor Timer Interrupt
description: Supervisor Timer Interrupt

VSTI:
location: 6
type: RW
reset_value: 0
long_name: Virtual Supervisor Timer Interrupt
description: Virtual Supervisor Timer Interrupt

SEI:
location: 9
type: RO
reset_value: 0
long_name: Supervisor External Interrupt
description: Supervisor External Interrupt

VSEI:
location: 10
type: RW
reset_value: 0
long_name: Virtual Supervisor External Interrupt
description: Virtual Supervisor External Interrupt

SGEI:
location: 12
type: RW
reset_value: 0
long_name: Supervisor Guest External Interrupt
description: Supervisor Guest External Interrupt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is also a Local Counter Overflow Interrupt (LCOFI) at bit 13. It is optional whether or not the bit is writable. As such, we need configuration-dependent type and reset_value for the field, and a new parameter:

LCOFI:
  location: 13
  definedBy: Sscofpmf
  long_name: Local Counter Overflow Interrupt
  description: Delegate Local Counter Overflow Interrupts to VS-mode.
  type(): return HIDELEG_LCOFI_MUTABLE ? CsrFieldType::RW : CsrFieldType::RO;
  reset_value(): return HIDELEG_LCOFI_MUTABLE ? UNDEFINED_LEGAL : 0;

in H.yaml:

# ...
parameters:
  # ...
  HIDELEG_LCOFI_MUTABLE:
    schema:
      type: boolean
    description: When true, `hideleg`[13] is writable, and Local Counter Overflow Interrupts can be delegated to VS-mode.

46 changes: 46 additions & 0 deletions arch/csr/H/hie.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# yaml-language-server: $schema=../../../schemas/csr_schema.json
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all reset values are UNDEFINED_LEGAL


$schema: "csr_schema.json#"
kind: csr
name: hie
long_name: Hypervisor Interrupt Enable Register
description: |
The `hie` register is a read/write register in HS-mode that enables interrupts.
It corresponds to the enable bits for VS-level and hypervisor-specific interrupts, and supplements
the HS-level `sie` register.
address: 0x604
priv_mode: S
definedBy: H
length: SXLEN
fields:
SGEIE:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also needs LCOFI

location: 12
type: RW-H
reset_value: 0
description: |
Hypervisor guest external interrupt enable bit. When set, allows external interrupts to be delivered
to VS-mode based on the `hgeie` setting.

VSEIE:
location: 10
type: RW-H
reset_value: 0
description: |
VS-level external interrupt enable bit. When set, allows external interrupts directed to VS-level
to be processed based on the configuration in `hvip` and other platform-specific sources.

VSTIE:
location: 6
type: RW-H
reset_value: 0
description: |
VS-level timer interrupt enable bit. When set, allows VS-level timer interrupts to be processed
based on the `hvip` configuration and any platform-specific timer interrupts.

VSSIE:
location: 2
type: RW-H
reset_value: 0
description: |
VS-level software interrupt enable bit. When set, allows software interrupts directed to VS-level
to be processed, based on the configuration in `hvip`.
46 changes: 46 additions & 0 deletions arch/csr/H/hip.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# yaml-language-server: $schema=../../../schemas/csr_schema.json
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This CSR needs a sw_read function that reflects the following (I've started a skeleton of it in the VSSIP comment):

SGEIP is read-only in hip, and is 1 if and only if the bitwise logical-AND of CSRs hgeip and hgeie is nonzero in any bit.

VSEIP is read-only in hip, and is the logical-OR of these interrupt sources:

  • bit VSEIP of hvip;
  • the bit of hgeip selected by hstatus.VGEIN; and
  • any other platform-specific external interrupt signal directed to VS-level.

VSTIP is read-only in hip, and is the logical-OR of hvip.VSTIP and any other platform-specific timer interrupt signal directed to VS-level.

VSSIP in hip is an alias (writable) of the same bit in hvip


$schema: "csr_schema.json#"
kind: csr
name: hip
long_name: Hypervisor Interrupt Pending Register
description: |
The `hip` register is an HSXLEN-bit read/write register that indicates pending interrupts at the hypervisor level.
It contains interrupt-pending bits for both VS-level and hypervisor-specific interrupts.
address: 0x608
priv_mode: S
definedBy: H
length: SXLEN
fields:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also needs LCOFI

SGEIP:
location: 12
type: RO
reset_value: 0
description: |
Pending interrupt bit for supervisor guest external interrupts (SGEI).
This bit is 1 if and only if the logical AND of `hgeip` and `hgeie` is nonzero.

VSEIP:
location: 10
type: RO
reset_value: 0
description: |
Pending interrupt bit for VS-level external interrupts (VSEI).
This bit is the logical OR of `vseip` from `hvip`, the interrupt from `hgeip` selected by `hstatus.VGEIN`,
and any other external interrupt signal directed to VS-level.

VSTIP:
location: 6
type: RO
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be RO-H

reset_value: 0
description: |
Pending interrupt bit for VS-level timer interrupts (VSTI).
This bit is the logical OR of `vstip` from `hvip` and any other timer interrupt directed to VS-level.
Comment on lines +32 to +38
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[[[ NOTE: I wrote this before I realized we haven't added any Sstc CSRs yet. Can you also add them so that this doesn't fall through the cracks? ]]]

VSTIP is altered by the Sstc extension.

19.2.2. Hypervisor Interrupt (hvip, hip, and hie) Registers
This extension modifies the description of the VSTIP/VSTIE bits in the hip/hie registers as follows:

Bits hip.VSTIP and hie.VSTIE are the interrupt-pending and interrupt-enable bits for VS-level timer interrupts. VSTIP is read-only in hip, and is the logical-OR of hvip.VSTIP and the timer interrupt signal resulting from vstimecmp (if vstimecmp is implemented). The hip.VSTIP bit, in response to timer interrupts generated by vstimecmp, is set and cleared by writing vstimecmp with a value that respectively is less than or equal to, or greater than, the current (time + htimedelta) value. The hip.VSTIP bit remains defined while V=0 as well as V=1.

This will require the function form of reset_value() on the field.

It will also require a sw_read() function for the CSR overall. Something like:

  sw_read(): |
    Bits<7> vstip_bit = 0;
    if (implemented?(ExtensionName::Sstc)) {
      if ((CSR[hvip].VSTIP == 1) | (CSR[vstimecmp].VALUE > (read_mtime() + CSR[htimedelta].DELTA)) {
        vstip_bit = 7'b1000000;
      }
    }

    Bits<3> vssip_bit = CSR[hvip].VSSIP == 0 ? 0 : 3'b100;
    # ...

    return lcofi_bit | sgeip_bit | vseip_bit | vstip_bit | vssip_bit;

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure ill add Sstc CSRs I believe these are they ?

  1. "Sstc" Extension for Supervisor-mode Timer Interrupts, Version 1.0.0 123
    16.1. Machine and Supervisor Level Additions 123
    16.1.1. Supervisor Timer Register (stimecmp) 123
    16.1.2. Machine Interrupt Registers (mip and mie) 124
    16.1.3. Supervisor Interrupt Registers (sip and sie) 124
    16.1.4. Machine Counter-Enable Register (mcounteren) 124
    16.2. Hypervisor Extension Additions 124
    16.2.1. Virtual Supervisor Timer Register (vstimecmp) 124
    16.2.2. Hypervisor Interrupt Registers (hvip, hip, and hie) 125
    16.2.3. Hypervisor Counter-Enable Register (hcounteren) 125
    16.3. Environment Config (menvcfg/henvcfg) Support


VSSIP:
location: 2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  alias: hvip.VSSIP
  sw_write(csr_value): CSR[hvip].VSSIP = csr_value.VSSIP;

type: RO
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RW

reset_value: 0
description: |
Pending interrupt bit for VS-level software interrupts (VSSI).
This bit is an alias of the `vssip` bit in `hvip`.
37 changes: 37 additions & 0 deletions arch/csr/H/hvip.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# yaml-language-server: $schema=../../../schemas/csr_schema.json

$schema: "csr_schema.json#"
kind: csr
name: hvip
long_name: Hypervisor Virtual Interrupt Pending Register
description: |
The `hvip` register is an HSXLEN-bit read/write register that a hypervisor can write to indicate virtual interrupts intended for VS-mode.
It contains interrupt-pending bits for virtual interrupts such as VS-level external interrupts, timer interrupts, and software interrupts.
address: 0x645
priv_mode: S
definedBy: H
length: SXLEN
fields:
VSEIP:
location: 10
type: RW
reset_value: 0
description: |
Pending interrupt bit for VS-level external interrupts. This bit is writable and
is set to 1 to assert a VS-level external interrupt.

VSTIP:
location: 6
type: RW
reset_value: 0
description: |
Pending interrupt bit for VS-level timer interrupts. This bit is writable and
is set to 1 to assert a VS-level timer interrupt.

VSSIP:
location: 2
type: RW
reset_value: 0
description: |
Pending interrupt bit for VS-level software interrupts. This bit is writable and
is set to 1 to assert a VS-level software interrupt.
53 changes: 53 additions & 0 deletions arch/csr/H/vsie.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# yaml-language-server: $schema=../../../schemas/csr_schema.json

$schema: "csr_schema.json#"
kind: csr
name: vsie
address: 0x204
virtual_address: 0x144
long_name: Virtual Supervisor Interrupt Enable
description: |
The vsie register is a VSXLEN-bit read/write register that is VS-mode’s version of
supervisor CSR sie. When V=1, vsie substitutes for the usual sie, so instructions that
normally read or modify sie actually access vsie instead. However, interrupts directed to
HS-level continue to be indicated in the HS-level sip register, not in vsip, when V=1.

When bit 13 of hideleg is zero, vsie.LCOFIE is read-only zero. Else, vsie.LCOFIE is an alias of sie.LCOFIE.
When bit 10 of hideleg is zero, vsie.SEIE is read-only zero. Else, vsie.SEIE is an alias of hie.VSEIE.
When bit 6 of hideleg is zero, vsie.STIE is read-only zero. Else, vsie.STIE is an alias of hie.VSTIE.
When bit 2 of hideleg is zero, vsie.SSIE is read-only zero. Else, vsie.SSIE is an alias of hie.VSSIE.
priv_mode: VS
definedBy: H
length: VSXLEN
fields:
SSIE:
location: 1
type: RW-H
reset_value: UNDEFINED_LEGAL
alias: hie.VSSIE[0]
description: |
SSIE. Read-only zero when hideleg[2] is 0. Else, alias of hie.VSSIE.

STIE:
location: 5
type: RW-H
reset_value: UNDEFINED_LEGAL
alias: hie.VSTIE[0]
description: |
STIE. Read-only zero when hideleg[6] is 0. Else, alias of hie.VSTIE.

SEIE:
location: 9
type: RW-H
reset_value: UNDEFINED_LEGAL
alias: hie.VSEIE[0]
description: |
SEIE. Read-only zero when hideleg[10] is 0. Else, alias of hie.VSEIE.

LCOFIE:
location: 13
type: RW-H
reset_value: UNDEFINED_LEGAL
alias: sie.LCOFIE[0]
description: |
LCOFIE. Read-only zero when hideleg[13] is 0. Else, alias of sie.LCOFIE.
64 changes: 64 additions & 0 deletions arch/csr/H/vsip.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# yaml-language-server: $schema=../../../schemas/csr_schema.json

$schema: "csr_schema.json#"
kind: csr
name: vsip
address: 0x244
virtual_address: 0x144
long_name: Virtual Supervisor Interrupt Pending
description: |
The `vsip` register is a VSXLEN-bit read/write register that is VS-mode’s version of the `sip` CSR.
When V=1, instructions that normally access `sip` instead access `vsip`. It holds the pending
interrupt status for supervisor-level traps in a virtualized environment.

However, interrupts directed to HS-level continue to be indicated in the HS-level `sip` register,
not in `vsip`, when V=1.

The standard portion (bits 15:0) includes individual interrupt-pending bits.
priv_mode: VS
definedBy: H
length: VSXLEN
fields:
SSIP:
location: 1
type: RW-H
reset_value: UNDEFINED_LEGAL
alias: hip.VSSIP[0]
description: |
*Supervisor Software Interrupt Pending*

Indicates a pending software interrupt at the supervisor level.
Read-only zero when `hideleg[2] == 0`, else aliased to `hip.VSSIP[0]`.

STIP:
location: 5
type: RW-H
reset_value: UNDEFINED_LEGAL
alias: hip.VSTIP[0]
description: |
*Supervisor Timer Interrupt Pending*

Indicates a pending timer interrupt at the supervisor level.
Read-only zero when `hideleg[6] == 0`, else aliased to `hip.VSTIP[0]`.

SEIP:
location: 9
type: RW-H
reset_value: UNDEFINED_LEGAL
alias: hip.VSEIP[0]
description: |
*Supervisor External Interrupt Pending*

Indicates a pending external interrupt at the supervisor level.
Read-only zero when `hideleg[10] == 0`, else aliased to `hip.VSEIP[0]`.

LCOFIP:
location: 13
type: RW-H
reset_value: UNDEFINED_LEGAL
alias: sip.LCOFIP[0]
description: |
*Local Counter Overflow Interrupt Pending*

Indicates an overflow of a local counter.
Read-only zero when `hideleg[13] == 0`, else aliased to `sip.LCOFIP[0]`.
17 changes: 17 additions & 0 deletions arch/csr/H/vsscratch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# yaml-language-server: $schema=../../../schemas/csr_schema.json

$schema: "csr_schema.json#"
kind: csr
name: vsscratch
address: 0x240
virtual_address: 0x140
long_name: Virtual Supervisor Scratch Register
description: |
The vsscratch register is a VSXLEN-bit read/write register that is VS-mode’s version of
supervisor register sscratch. When V=1, vsscratch substitutes for the usual sscratch,
so instructions that normally read or modify sscratch actually access vsscratch instead.
The contents of vsscratch never directly affect the behavior of the machine.
priv_mode: VS
length: VSXLEN
definedBy: H
fields: {}
Loading