Skip to content

Commit d159605

Browse files
committed
Add H csr vsip,hegeie,hideleg,hie,hip,hvip,vsie,vsscratch,hgeip
1 parent 5cb2bd9 commit d159605

File tree

9 files changed

+411
-0
lines changed

9 files changed

+411
-0
lines changed

arch/csr/H/hgeie.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# yaml-language-server: $schema=../../../schemas/csr_schema.json
2+
3+
$schema: "csr_schema.json#"
4+
kind: csr
5+
name: hgeie
6+
long_name: Hypervisor Guest External Interrupt Enable Register
7+
description: |
8+
The `hgeie` register is an HSXLEN-bit read/write register that contains enable bits
9+
for the guest external interrupts at this hart. Each bit in `hgeie` corresponds to
10+
a guest external interrupt and determines whether that interrupt is enabled.
11+
address: 0x607
12+
priv_mode: S
13+
definedBy: H
14+
length: SXLEN
15+
fields:
16+
GEI_0:
17+
location: 0
18+
type: RW
19+
reset_value: 0
20+
description: |
21+
Guest External Interrupt 0 enable bit. When set, enables guest external interrupt 0.
22+
23+
GEI_1:
24+
location: 1
25+
type: RW
26+
reset_value: 0
27+
description: |
28+
Guest External Interrupt 1 enable bit. When set, enables guest external interrupt 1.
29+
30+
GEI_2:
31+
location: 2
32+
type: RW
33+
reset_value: 0
34+
description: |
35+
Guest External Interrupt 2 enable bit. When set, enables guest external interrupt 2.
36+
37+
GEI_3:
38+
location: 3
39+
type: RW
40+
reset_value: 0
41+
description: |
42+
Guest External Interrupt 3 enable bit. When set, enables guest external interrupt 3.

arch/csr/H/hgeip.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# yaml-language-server: $schema=../../../schemas/csr_schema.json
2+
3+
$schema: "csr_schema.json#"
4+
kind: csr
5+
name: hgeip
6+
long_name: Hypervisor Guest External Interrupt Pending Register
7+
description: |
8+
The `hgeip` register is an HSXLEN-bit read-only register that indicates pending guest external interrupts for this hart.
9+
Each bit of `hgeip` corresponds to a guest external interrupt for a virtual machine.
10+
The register reflects interrupts directed to virtual machines in VS-level and provides an interrupt-pending status.
11+
address: 0xE12
12+
priv_mode: S
13+
definedBy: H
14+
length: SXLEN
15+
fields:
16+
guest_external_interrupts:
17+
location: 1
18+
type: RO
19+
reset_value: 0
20+
description: |
21+
Pending guest external interrupt bits. Each bit corresponds to an individual interrupt directed to a virtual machine.
22+
This register is read-only and the bit values indicate whether a particular interrupt is pending.
23+
24+
reserved_1_to_hsxlens_minus_1:
25+
location: 2
26+
type: RO
27+
reset_value: 0
28+
description: |
29+
Reserved bits. These bits are not writable and must always be read as zero.

arch/csr/H/hideleg.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# yaml-language-server: $schema=../../../schemas/csr_schema.json
2+
3+
$schema: "csr_schema.json#"
4+
kind: csr
5+
name: hideleg
6+
long_name: Hypervisor Interrupt Delegation Register
7+
description: |
8+
Register hideleg is an HSXLEN-bit read/write register that controls delegation of interrupts from HS-mode
9+
to VS-mode. An interrupt that has been delegated to HS-mode (using mideleg) is further delegated to VS-mode
10+
if the corresponding hideleg bit is set. Among bits 15:0 of hideleg, bits 10, 6, and 2 (corresponding to the
11+
standard VS-level interrupts) are writable, and bits 12, 9, 5, and 1 (corresponding to the standard S-level
12+
interrupts) are read-only zeros.
13+
address: 0x603
14+
priv_mode: S
15+
definedBy: H
16+
length: SXLEN
17+
fields:
18+
SSIP:
19+
location: 1
20+
type: RO
21+
reset_value: 0
22+
description: Standard S-level interrupt. Read-only zero.
23+
24+
VSIP:
25+
location: 2
26+
type: RW
27+
reset_value: 0
28+
description: Virtual Supervisor Software Interrupt.
29+
30+
STIP:
31+
location: 5
32+
type: RO
33+
reset_value: 0
34+
description: Standard S-level interrupt. Read-only zero.
35+
36+
VSTIP:
37+
location: 6
38+
type: RW
39+
reset_value: 0
40+
description: Virtual Supervisor Timer Interrupt.
41+
42+
SEIP:
43+
location: 9
44+
type: RO
45+
reset_value: 0
46+
description: Standard S-level interrupt. Read-only zero.
47+
48+
VSEIP:
49+
location: 10
50+
type: RW
51+
reset_value: 0
52+
description: Virtual Supervisor External Interrupt.
53+
54+
LCOFIP:
55+
location: 13
56+
type: RW
57+
reset_value: 0
58+
description: Local Counter Overflow Interrupt.

arch/csr/H/hie.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# yaml-language-server: $schema=../../../schemas/csr_schema.json
2+
3+
$schema: "csr_schema.json#"
4+
kind: csr
5+
name: hie
6+
long_name: Hypervisor Interrupt Enable Register
7+
description: |
8+
The `hie` register is a read/write register in HS-mode that enables interrupts.
9+
It corresponds to the enable bits for VS-level and hypervisor-specific interrupts, and supplements
10+
the HS-level `sie` register.
11+
address: 0x604
12+
priv_mode: S
13+
definedBy: H
14+
length: SXLEN
15+
fields:
16+
SGEIE:
17+
location: 0
18+
type: RW-H
19+
reset_value: 0
20+
description: |
21+
Hypervisor guest external interrupt enable bit. When set, allows external interrupts to be delivered
22+
to VS-mode based on the `hgeie` setting.
23+
24+
VSEIE:
25+
location: 4
26+
type: RW-H
27+
reset_value: 0
28+
description: |
29+
VS-level external interrupt enable bit. When set, allows external interrupts directed to VS-level
30+
to be processed based on the configuration in `hvip` and other platform-specific sources.
31+
32+
VSTIE:
33+
location: 8
34+
type: RW-H
35+
reset_value: 0
36+
description: |
37+
VS-level timer interrupt enable bit. When set, allows VS-level timer interrupts to be processed
38+
based on the `hvip` configuration and any platform-specific timer interrupts.
39+
40+
VSSIE:
41+
location: 12
42+
type: RW-H
43+
reset_value: 0
44+
description: |
45+
VS-level software interrupt enable bit. When set, allows software interrupts directed to VS-level
46+
to be processed, based on the configuration in `hvip`.
47+
48+
reserved:
49+
location: 13-15
50+
type: RO
51+
reset_value: 0
52+
description: |
53+
Reserved bits, must always be zero.

arch/csr/H/hip.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# yaml-language-server: $schema=../../../schemas/csr_schema.json
2+
3+
$schema: "csr_schema.json#"
4+
kind: csr
5+
name: hip
6+
long_name: Hypervisor Interrupt Pending Register
7+
description: |
8+
The `hip` register is an HSXLEN-bit read/write register that indicates pending interrupts at the hypervisor level.
9+
It contains interrupt-pending bits for both VS-level and hypervisor-specific interrupts.
10+
address: 0x608
11+
priv_mode: S
12+
definedBy: H
13+
length: SXLEN
14+
fields:
15+
SGEIP:
16+
location: 0
17+
type: RO
18+
reset_value: 0
19+
description: |
20+
Pending interrupt bit for supervisor guest external interrupts (SGEI).
21+
This bit is 1 if and only if the logical AND of `hgeip` and `hgeie` is nonzero.
22+
23+
VSEIP:
24+
location: 1
25+
type: RO
26+
reset_value: 0
27+
description: |
28+
Pending interrupt bit for VS-level external interrupts (VSEI).
29+
This bit is the logical OR of `vseip` from `hvip`, the interrupt from `hgeip` selected by `hstatus.VGEIN`,
30+
and any other external interrupt signal directed to VS-level.
31+
32+
VSTIP:
33+
location: 3
34+
type: RO
35+
reset_value: 0
36+
description: |
37+
Pending interrupt bit for VS-level timer interrupts (VSTI).
38+
This bit is the logical OR of `vstip` from `hvip` and any other timer interrupt directed to VS-level.
39+
40+
VSSIP:
41+
location: 5
42+
type: RO
43+
reset_value: 0
44+
description: |
45+
Pending interrupt bit for VS-level software interrupts (VSSI).
46+
This bit is an alias of the `vssip` bit in `hvip`.

arch/csr/H/hvip.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# yaml-language-server: $schema=../../../schemas/csr_schema.json
2+
3+
$schema: "csr_schema.json#"
4+
kind: csr
5+
name: hvip
6+
long_name: Hypervisor Virtual Interrupt Pending Register
7+
description: |
8+
The `hvip` register is an HSXLEN-bit read/write register that a hypervisor can write to indicate virtual interrupts intended for VS-mode.
9+
It contains interrupt-pending bits for virtual interrupts such as VS-level external interrupts, timer interrupts, and software interrupts.
10+
address: 0x645
11+
priv_mode: S
12+
definedBy: H
13+
length: SXLEN
14+
fields:
15+
VSEIP:
16+
location: 1
17+
type: RW
18+
reset_value: 0
19+
description: |
20+
Pending interrupt bit for VS-level external interrupts. This bit is writable and
21+
is set to 1 to assert a VS-level external interrupt.
22+
23+
VSTIP:
24+
location: 3
25+
type: RW
26+
reset_value: 0
27+
description: |
28+
Pending interrupt bit for VS-level timer interrupts. This bit is writable and
29+
is set to 1 to assert a VS-level timer interrupt.
30+
31+
VSSIP:
32+
location: 5
33+
type: RW
34+
reset_value: 0
35+
description: |
36+
Pending interrupt bit for VS-level software interrupts. This bit is writable and
37+
is set to 1 to assert a VS-level software interrupt.
38+
39+
reserved_6_15:
40+
location: 6
41+
type: RO
42+
reset_value: 0
43+
description: |
44+
Reserved bits. These bits must always be zero and are not writable.

arch/csr/H/vsie.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# yaml-language-server: $schema=../../../schemas/csr_schema.json
2+
3+
$schema: "csr_schema.json#"
4+
kind: csr
5+
name: vsie
6+
address: 0x204
7+
virtual_address: 0x144
8+
long_name: Virtual Supervisor Interrupt Enable
9+
description: |
10+
The vsie register is a VSXLEN-bit read/write register that is VS-mode’s version of
11+
supervisor CSR sie. When V=1, vsie substitutes for the usual sie, so instructions that
12+
normally read or modify sie actually access vsie instead. However, interrupts directed to
13+
HS-level continue to be indicated in the HS-level sip register, not in vsip, when V=1.
14+
15+
The standard portion (bits 15:0) of vsie is formatted as follows:
16+
15 14 13 12 10 9 8 6 5 4 2 1 0
17+
0 LCOFIE 0 SEIE 0 STIE 0 SSIE 0
18+
2 1 3 1 3 1 3 1 1
19+
20+
When bit 13 of hideleg is zero, vsie.LCOFIE is read-only zero. Else, vsie.LCOFIE is an alias of sie.LCOFIE.
21+
When bit 10 of hideleg is zero, vsie.SEIE is read-only zero. Else, vsie.SEIE is an alias of hie.VSEIE.
22+
When bit 6 of hideleg is zero, vsie.STIE is read-only zero. Else, vsie.STIE is an alias of hie.VSTIE.
23+
When bit 2 of hideleg is zero, vsie.SSIE is read-only zero. Else, vsie.SSIE is an alias of hie.VSSIE.
24+
priv_mode: VS
25+
definedBy: H
26+
length: VSXLEN
27+
fields:
28+
SSIE:
29+
location: 1
30+
type: RW-H
31+
reset_value: UNDEFINED_LEGAL
32+
alias: hie.VSSIE[0]
33+
description: |
34+
SSIE. Read-only zero when hideleg[2] is 0. Else, alias of hie.VSSIE.
35+
36+
STIE:
37+
location: 5
38+
type: RW-H
39+
reset_value: UNDEFINED_LEGAL
40+
alias: hie.VSTIE[0]
41+
description: |
42+
STIE. Read-only zero when hideleg[6] is 0. Else, alias of hie.VSTIE.
43+
44+
SEIE:
45+
location: 9
46+
type: RW-H
47+
reset_value: UNDEFINED_LEGAL
48+
alias: hie.VSEIE[0]
49+
description: |
50+
SEIE. Read-only zero when hideleg[10] is 0. Else, alias of hie.VSEIE.
51+
52+
LCOFIE:
53+
location: 13
54+
type: RW-H
55+
reset_value: UNDEFINED_LEGAL
56+
alias: sie.LCOFIE[0]
57+
description: |
58+
LCOFIE. Read-only zero when hideleg[13] is 0. Else, alias of sie.LCOFIE.

0 commit comments

Comments
 (0)