Skip to content

Commit 0bc4118

Browse files
author
Andrei Warkentin
committed
Add RISC-V hart reqs and tests over from server soc spec.
As per mailing list discussion and agreement between Greg and Ved, these will move from the Server SoC spec. Signed-off-by: Andrei Warkentin <[email protected]>
1 parent 1ee1dc9 commit 0bc4118

6 files changed

+193
-47
lines changed

riscv-server-platform-ts.pdf

6.93 KB
Binary file not shown.

riscv-server-platform.pdf

8.63 KB
Binary file not shown.

server_platform.bib

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
@electronic{ACPI,
2+
title = {Advanced Configuration and Power Interface (ACPI) Specification},
3+
url = {https://uefi.org/specifications}
4+
}
5+
@electronic{AHCI,
6+
title = {Advanced Host Controller Interface (AHCI)},
7+
url = {https://www.intel.com/content/dam/www/public/us/en/documents/technical-specifications/serial-ata-ahci-spec-rev1-3-1.pdf},
8+
year = {}
9+
}
110
@electronic{BRS,
211
title = {RISC-V Boot and Runtime Services Specification},
312
url = {https://github.com/riscv-non-isa/riscv-brs},
@@ -8,6 +17,25 @@ @electronic{BRSTest
817
url = {https://github.com/riscv-non-isa/riscv-brs},
918
year = {}
1019
}
20+
@electronic{NS16550,
21+
title = {National Semiconductor PC16550D UART Datasheet},
22+
url = {https://www.scs.stanford.edu/10wi-cs140/pintos/specs/pc16550d.pdf},
23+
year = {}
24+
}
25+
@electronic{PCI,
26+
title = {PCI Express® Base Specification Revision 6.0},
27+
url = {https://pcisig.com/pci-express-6.0-specification},
28+
year = {}
29+
}
30+
@electronic{RFC_2119,
31+
title = {Key words for use in RFCs to Indicate Requirement Levels},
32+
url = {https://datatracker.ietf.org/doc/html/rfc2119}
33+
}
34+
@electronic{RVA23,
35+
title = {RVA23 Profiles},
36+
url = {https://github.com/riscv/riscv-profiles/blob/main/rva23-profile.adoc},
37+
year = {}
38+
}
1139
@electronic{ServerSoC,
1240
title = {RISC-V Server SoC Specification},
1341
url = {https://github.com/riscv-non-isa/server-soc},
@@ -18,35 +46,12 @@ @electronic{ServerSoCTest
1846
url = {https://github.com/riscv-non-isa/server-soc},
1947
year = {}
2048
}
21-
@electronic{RFC_2119,
22-
title = {Key words for use in RFCs to Indicate Requirement Levels},
23-
url = {https://datatracker.ietf.org/doc/html/rfc2119}
24-
}
25-
@electronic{ACPI,
26-
title = {Advanced Configuration and Power Interface (ACPI) Specification},
27-
url = {https://uefi.org/specifications}
28-
}
2949
@electronic{UEFI,
3050
title = {Unified Extensible Firmware Interface},
3151
url = {https://uefi.org/specifications}
3252
}
33-
@electronic{PCI,
34-
title = {PCI Express® Base Specification Revision 6.0},
35-
url = {https://pcisig.com/pci-express-6.0-specification},
36-
year = {}
37-
}
38-
@electronic{NS16550,
39-
title = {National Semiconductor PC16550D UART Datasheet},
40-
url = {https://www.scs.stanford.edu/10wi-cs140/pintos/specs/pc16550d.pdf},
41-
year = {}
42-
}
4353
@electronic{XHCI,
4454
title = {eXtensible Host Controller Interface for Universal Serial Bus 1.2},
4555
url = {https://www.intel.com/content/dam/www/public/us/en/documents/technical-specifications/extensible-host-controler-interface-usb-xhci.pdf},
4656
year = {}
4757
}
48-
@electronic{AHCI,
49-
title = {Advanced Host Controller Interface (AHCI)},
50-
url = {https://www.intel.com/content/dam/www/public/us/en/documents/technical-specifications/serial-ata-ahci-spec-rev1-3-1.pdf},
51-
year = {}
52-
}

server_platform_intro.adoc

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,22 @@ computing systems that may be used for one or more of these purposes.
2121
.Components of a RISC-V Server Platform
2222
image::riscv-server-platform.png[width=800]
2323

24-
The RISC-V server platform is defined as the collection of SoC hardware,
25-
peripherals, platform firmware, boot/runtime services, and platform security services.
26-
The platform provides hardware interfaces (e.g., harts, timers, interrupt
27-
controllers, PCIe root ports, etc.) to portable system software. It also offers a set of
28-
standardized boot and runtime services based on the UEFI and ACPI standards. To
29-
support provisioning and platform management, it interfaces with a baseboard
30-
management controller (BMC) through both in-band and out-of-band (OOB)
31-
management interfaces. The in-band management interfaces support the use of
32-
standard manageability specifications like MCTP, PLDM, IPMI, and Redfish for
33-
provisioning and management of the operating system executing on the platform.
34-
The OOB interface supports the use of standard manageability specifications like
35-
MCTP, PLDM, Redfish, and IPMI for functions such as power management, telemetry,
36-
debug, and provisioning. The platform security model includes guidelines and requirements
37-
for aspects such as debug authorization, secure/measured boot, firmware updates,
38-
firmware resilience, and confidential computing, among others.
24+
The RISC-V server platform is defined as the collection of RVA profile-compliant
25+
application processor harts, SoC hardware, peripherals, platform firmware,
26+
boot/runtime services, and platform security services. The platform provides
27+
hardware interfaces (e.g., harts, timers, interrupt controllers, PCIe root ports, etc.)
28+
to portable system software. It also offers a set of standardized boot and runtime
29+
services based on the UEFI and ACPI standards. To support provisioning and
30+
platform management, it interfaces with a baseboard management controller (BMC)
31+
through both in-band and out-of-band (OOB) management interfaces. The in-band
32+
management interfaces support the use of standard manageability specifications
33+
like MCTP, PLDM, IPMI, and Redfish for provisioning and management of the operating
34+
system executing on the platform. The OOB interface supports the use of standard
35+
manageability specifications like MCTP, PLDM, Redfish, and IPMI for functions such
36+
as power management, telemetry, debug, and provisioning. The platform security model
37+
includes guidelines and requirements for aspects such as debug authorization,
38+
secure/measured boot, firmware updates, firmware resilience, and confidential
39+
computing, among others.
3940

4041
The platform firmware, typically operating at privilege level M, is
4142
considered part of the platform and is usually expected to be customized and
@@ -45,13 +46,13 @@ and platform security.
4546

4647
This specification standardizes the requirements for hardware and software
4748
interfaces and capabilities by building on top of relevant RISC-V standards,
48-
such as the Server SoC, Boot and Runtime Services and Platform Security
49-
specifications for server software executing on the application processor harts
50-
at privilege levels below M. It enables OS and hypervisor vendors to support such
51-
platforms with a single binary OS image distribution model. The requirements posed by this
52-
specification represent a standard set of infrastructural capabilities,
53-
encompassing areas where divergence is typically unnecessary and where novelty
54-
is absent across implementations.
49+
such as the RISC-V Architecture Profiles, Server SoC, Boot and Runtime Services
50+
and Platform Security specifications for server software executing on the application
51+
processor harts at privilege levels below M. It enables OS and hypervisor vendors to
52+
support such platforms with a single binary OS image distribution model. The
53+
requirements posed by this specification represent a standard set of infrastructural
54+
capabilities, encompassing areas where divergence is typically unnecessary and
55+
where novelty is absent across implementations.
5556

5657
To be compliant with this specification, the server platform MUST support all
5758
mandatory requirements and MUST support the listed versions of the specifications.

server_platform_requirements.adoc

Lines changed: 81 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,87 @@
11
== Server Platform Hardware Requirements
22

3-
=== RISC-V SoC
3+
=== RISC-V Harts
4+
5+
A RISC-V server platform includes a RISC-V application processor and may include
6+
one or more service processors. These service processors may provide services such
7+
as security and power management to software executing on the application
8+
processors, and they may themselves implement the RISC-V ISA. The requirements
9+
in this section apply solely to harts in the application processors of the SoC.
10+
11+
[width=100%]
12+
[%header, cols="5,25"]
13+
|===
14+
| ID# ^| Requirement
15+
| RVA_010 | The RISC-V application processor harts in the SoC MUST support the
16+
RVA23 ISA profile cite:[RVA23].
17+
2+| _The next major release of the profiles is expected to be RVA24, which is
18+
still under construction. This specification should be updated to comply
19+
with the RVA24 profiles as the profile definition becomes more finalized._
20+
21+
| RVA_020 a| The RISC-V application processor harts in the SoC MUST support the
22+
following extensions:
23+
24+
* Sv48
25+
* Sv48x4
26+
* Svadu
27+
* Sdtrig
28+
* Sdext
29+
* H
30+
* Sscofpmf
31+
* Zkr
32+
* Ssecorrupt
33+
* Ssccfg
34+
* Ssctr
35+
* Sscrind
36+
37+
2+| _Ssccfg, Sscind, and Ssctr are under construction._ +
38+
+
39+
_Many of these mandated extensions are optional in the RVA23 ISA profile.
40+
This requirement is placed here as a placeholder. These mandates may be
41+
moved into a new ISA profile specification._
42+
43+
| RVA_030 | The ISA extensions and associated CSR field widths implemented by
44+
any of the RISC-V application processor harts in the SoC MUST be
45+
identical.
46+
2+| _The RVA23 profile supports a set of optional extensions. The set of
47+
optional extensions implemented by the harts must be identical. Where the
48+
extension supports optionality in the form of field widths (e.g.,
49+
ASIDLEN, VLEN, allowed vstart values, physical address width, debug
50+
triggers, cache-block size, etc.), the implementation of these must also be
51+
identical. Having an identical ISA on all harts allows system software to
52+
migrate tasks among the harts without constraints._
53+
54+
| RVA_040 | The RISC-V application processor harts in the SoC MAY support
55+
different power and performance characteristics but MUST be
56+
otherwise indistinguishable from each other from a software
57+
execution viewpoint.
58+
2+| _All harts in the SoC being indistinguishable from a software execution
59+
viewpoint allows system software to migrate tasks among the harts without
60+
constraints._
61+
62+
| RVA_050 a| The RISC-V application processor hart MUST support:
63+
64+
* Single stepping using the step bit in `dcsr`
65+
* Debug scratch register 0 (`dscratch0`)
66+
67+
| RVA_060 a| The RISC-V application processor hart MUST support:
68+
69+
* At least 4 instruction address match triggers.
70+
* At least 4 load/store address match triggers.
71+
* At least one icount trigger to support single stepping.
72+
* At least one interrupt trigger.
73+
* At least one exception trigger.
74+
* Trigger filtering using `hcontext`.
75+
* Trigger filtering using all VMID encodings supported by the hart.
76+
* Trigger filtering using `scontext`.
77+
* Trigger filtering using all ASID encodings supported by the hart.
78+
79+
| RVA_070 | The RISC-V application processor MUST support at least 6 hardware
80+
performance counters defined by the Zihpm extension in addition to
81+
the three counters defined by Zicntr extension.
82+
|===
483

5-
A RISC-V server platform is based on a RISC-V SoC with RISC-V application processors.
84+
=== RISC-V SoC
685

786
[width=100%]
887
[%header, cols="5,25"]

server_platform_tests.adoc

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,67 @@
22

33
=== Server Platform Hardware Requirements
44

5+
==== RISC-V Harts
6+
7+
[width=100%]
8+
[%header, cols="8,25"]
9+
|===
10+
| ID# ^| Algorithm
11+
| ME_RVA_010_010 a| For each application processor hart:
12+
13+
. Determine the ISA node in ACPI RHCT table for that hart.
14+
. Parse the ISA string in the ISA node and verify that all
15+
mandatory extensions are supported.
16+
. Verify that the ISA string matches that of hart 0.
17+
. Report the ISA string of hart 0 into the test output log.
18+
| ME_RVA_020_010 | See T_RVA_010_010.
19+
| ME_RVA_030_010 a| . The T_RVA_010_010 verifies that all ISA strings are
20+
identical.
21+
. For each ISA extension reported in the ISA string, if
22+
there are CSRs associated with that extension, then probe
23+
the CSR to determine the width of the CSR fields and the
24+
legal encodings on each application processor hart. The
25+
CSR field widths and legal encodings supported by each
26+
hart must match that of hart 0.
27+
| ME_RVA_040_010 | See ME_RVA_030_010.
28+
| ME_RVA_050_010 a| No test.
29+
| MF_RVA_060_010 a| Install 4 instruction address match triggers using the debug
30+
triggers SBI and verify that each trigger fires.
31+
| MF_RVA_060_020 a| Install 4 load address match triggers using the debug
32+
triggers SBI and verify that each trigger fires.
33+
| MF_RVA_060_030 a| Install 4 store address match triggers using the debug
34+
triggers SBI and verify that each trigger fires.
35+
| MF_RVA_060_040 a| Install an `icount` trigger using the debug triggers SBI and
36+
verify single-step.
37+
| MF_RVA_060_050 a| . Install an interrupt trigger to match supervisor timer
38+
interrupt using the debug triggers SBI.
39+
. Program a timer deadline in `stimecmp`
40+
. Verify that the trigger fires on reaching the programmed
41+
deadline.
42+
| MF_RVA_060_060 a| . Install an exception trigger to match ECALL to S-mode
43+
exception using the debug triggers SBI.
44+
. Transition to U-mode and invoke an ECALL.
45+
. Verify that the trigger fires.
46+
| MF_RVA_060_070 a| . Verify `hcontext` exists.
47+
. Repeat MF_RVA_060_010 and MF_RVA_060_050 with a matching
48+
and non-matching `hcontext` value.
49+
| ME_RVA_060_080 a| . Install and read-back triggers with VMID values between 0
50+
and `VMIDLEN`.
51+
| MF_RVA_060_090 a| . Verify `scontext` exists.
52+
. Repeat MF_RVA_060_010 and MF_RVA_060_050 with a matching
53+
and non-matching `scontext` value.
54+
| ME_RVA_060_100 a| . Install and read-back triggers with ASID values between 0
55+
and `ASIDLEN`.
56+
| ME_RVA_070_010 a| . Request delegation of all HPM counters using the SBI.
57+
. Verify at least 6 programmable HPM counter are implemented.
58+
. Verify that the `scountovf` CSR is implemented
59+
. Verify `cycles` and `instret` are writeable.
60+
. Verify ability to toggle counter enable for each
61+
implemented HPM, `cycles`, and `instret` counters.
62+
|===
63+
64+
<<<
65+
566
==== RISC-V SoC
667

768
[width=100%]

0 commit comments

Comments
 (0)