Date
1 - 3 of 3
[PATCH v4 3/3] riscv-platform-spec: Initial server firmware requirements
Sunil V L
Hi Heinrich,
On Fri, Apr 30, 2021 at 11:37:37AM +0200, Heinrich Schuchardt wrote: On 30.04.21 09:37, Sunil V L wrote:EFI_LOAD_FILE2_PROTOCOL is required to load from PCIe option ROM.This specifies mandatory requirements for server class platforms inWhat do you really mean here? Also, there is a plan to support initrd in edk2 also https://github.com/riscv/riscv-edk2-platforms/issues/6
|
|
On 30.04.21 09:37, Sunil V L wrote:
This specifies mandatory requirements for server class platforms inWhat do you really mean here? Should LoadImage() be able to load from an EFI_LOAD_FILE2_PROTOCOL? Sure that is needed. Otherwise, please, describe which files should be presented via an instance of the EFI_LOAD_FILE2_PROTOCOL. The only use case I see is in presenting the initial ramdisk to Linux, if you want to boot without GRUB. In U-Boot we just have merged patches that allow to specify the initrd in a boot option and to provide an EFI_LOAD_FILE2_PROTOCOL matching the selected boot option cf. https://patchwork.ozlabs.org/project/uboot/list/?series=234603&archive=both&state=* To my knowledge in EDK II such a capability is not available. Best regards Heinrich +|EFI_DECOMPRESS_PROTOCOL | 19.5 | |
|
Sunil V L
This specifies mandatory requirements for server class platforms in
addition to the requirements in base specification. Many dependencies and granular details are still TBD. But this is a good starting point to understand and refine the requirements for server platforms. Signed-off-by: Sunil V L <sunilvl@...> Changes in v4: - Used "required or depricated" convention. Changes in v3: - Referred to the PCI chapter in UEFI specification. Changes in v2: - Aligned to 80 characters. - Removed protocols related to graphics support. - Referred to SMBIOS conformance guidelines. --- changelog.adoc | 2 + riscv-platform-spec.adoc | 178 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 171 insertions(+), 9 deletions(-) diff --git a/changelog.adoc b/changelog.adoc index af1d1df..3e15b8e 100644 --- a/changelog.adoc +++ b/changelog.adoc @@ -8,6 +8,8 @@ ## Change Log ### version 0.2-rc0 +* 2021-04-08: +** Initial commit of server firmware requirements * 2021-03-25: ** Initial commit of Embedded-2022 specification * 2021-03-16: diff --git a/riscv-platform-spec.adoc b/riscv-platform-spec.adoc index ee5511f..100f20b 100644 --- a/riscv-platform-spec.adoc +++ b/riscv-platform-spec.adoc @@ -9,10 +9,12 @@ :author: RISC-V Platform Specification Task Group :email: tech-unixplatformspec@... :revnumber: 0.2-rc0 -:revdate: Mar 2021 +:revdate: Apr 2021 :doctype: book :sectnums: +:sectnumlevels: 5 :toc: macro +:toclevels: 5 // table of contents toc::[] @@ -68,14 +70,172 @@ include::profiles.adoc[] // Server extension for Linux-2022 Platform === Server Extension -==== Boot Process -* Firmware -* Boot-Loader -* Discovery Mechanisms - -==== Runtime services -* SBI -* UEFI +The server extension specifies additional requirements apart from base +requirements for RV64I based server class platforms. Support for RV128I +based platforms will be in future when available. + +The platforms which conform to server extension are required to implement + +- Advanced Platform-Level Interrupt Controller (APLIC). [*Dependency: + AIA spec should be ratified*] +- Incoming MSI Controller (IMSIC) [*Dependency: AIA spec should be +ratified*] + +- RISC-V Hypervisor-level Instruction-Set Extensions. [*Dependency: +Spec should be ratified*] +- Incoming MSI Controller (IMSIC) with at least 1 guest interrupt +file for each HART ?? (*TBD*) +- IOMMU with support for memory resident interrupt files ?? (*TBD*) + +==== Boot and Runtime Requirements +===== Firmware +The boot and system firmware for the RV64I server platforms required to be +based on UEFI as per the base specification with some additional +requirements as mentioned below. + +====== PCIe support +The platforms are required to implement *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL* and other +protocols as specified in Chapter 14 of UEFI specification version 2.9. + +====== UEFI configuration tables +The platforms are required to provide following tables. + +* *EFI_ACPI_20_TABLE_GUID* ACPI configuration table which is at version 6.4+ or +newer with HW-Reduced ACPI model. +* *SMBIOS3_TABLE_GUID* SMBIOS table which conforms to version 3.4 or later. + +====== UEFI Protocol support +The UEFI protocols listed below are required to be implemented in addition to +the base spec requirements. + +.Required UEFI Protocols +[cols="3,1,1", width=95%, align="center", options="header"] +|=== +|Protocol | UEFI 2.9 $ | Note +|EFI_LOAD_FILE2_PROTOCOL | 13.2 | +|EFI_DECOMPRESS_PROTOCOL | 19.5 | +|=== + +===== Boot-Loader +*TBD* + +===== Discovery Mechanisms (ACPI) +For RV64I server platforms, ACPI tables are required to be passed via UEFI +to the operating system for the purpose of discovery and the configuration of +the hardware. This section defines the required ACPI tables and objects. All +other ACPI tables for RISC-V can be implemented as needed adhering to the ACPI +spec version 6.4+(RISC-V support when added). + +====== ACPI System Description Tables + + +.Required ACPI tables +[cols="3,1,2", width=95%, align="center", options="header"] +|=== +|ACPI Table |ACPI 6.4+ $|Note +|Root System Description Pointer (RSDP) |5.2.5 | +|Extended System Description Table (XSDT) |5.2.8 | +|Fixed ACPI Description Table (FADT) |5.2.9 | +|Differentiated System Description Table (DSDT)|5.2.11.1 | +|Multiple APIC Description Table (MADT) |5.2.12 |*TBD*: Need ECR + to add + APLIC & IMSIC + (AIA) to MADT +|RISC-V Timer Description Table |New |*TBD*: _DSD to + communicate + timebase-frequency? +|Processor Properties Topology Table (PPTT) |5.2.29 |CPU/Cache topology + information +|Memory-mapped ConFiGuration space (MCFG) |PCI-SIG |Required for PCIe + support +|Debug Port Table 2 (DBG2) |Microsoft |*TBD*: 16550D? +|Serial Port Console Redirection (SPCR) |Microsoft |*TBD*: 16550D? +|System Resource Affinity Table (SRAT) |5.2.16 |Required if the + platform supports NUMA +|System Locality Information Table (SLIT) |5.2.17 |Required if the + platform supports NUMA +|IOMMU Information Table | |*TBD*: New IOMMU + table need to be + defined (like IVRS) +|Software Delegated Exception Interface (SDEI) |SDEI |*TBD*: New table + and SBI extension + also may be required +|PMU event mapping table? |New |*TBD*: New table + required +|=== + +====== ACPI Namespace + +- Processors are required to be defined under the System Bus (\_SB) name space. +- Below list of Device Objects and Methods are required for each device + definition in the DSDT. + +.Required Device Objects and Methods +[cols="1,2,3", width=95%, align="center", options="header"] +|=== +|Object/Method | ACPI 6.4+ $ | Note +|_AEI | 5.6.5.2 | Required for GPIO-signalled events. +|_EVT | 5.6.5.3 | Required for interrupt-signalled events. +|_ADR | 6.1.1 | Required for PCI +|_HID | 6.1.5 | +|_UID | 6.1.12 | +|_CRS | 6.2.2 | +|_CCA | 6.2.17 | Required for DMA capable devices +|_STA | 6.3.7/7.2.4 | Device status +|=== + +===== Runtime services +====== SBI +*TBD* + +====== UEFI +The UEFI run time services listed below are required to be implemented. + +.Required UEFI Runtime Services +[cols="3,1,3", width=95%, align="center", options="header"] +|=== +|Service | UEFI 2.9 $ | Note +|GetVariable | 8.2 | +|GetNextVariableName | 8.2 | +|SetVariable | 8.2 | A dedicated storage for firmware is +requuired so that there is no conflict in access by both firmware and the OS. +|QueryVariableInfo | 8.2 | +|GetTime | 8.3 | RTC Access by the OS +|SetTime | 8.3 | If it is not possible to set the RTC, +the SetTime() can return an error. +|GetWakeupTime | 8.3 | Interface is required to be +implemented but it can return EFI_UNSUPPORTED. +|SetWakeupTime | 8.3 | Interface is required to be +implemented but it can return EFI_UNSUPPORTED. +|SetVirtualAddressMap | 8.4 | +|ConvertPointer | 8.4 | +|GetNextHighMonotonicCount | 8.5 | +|ResetSystem | 8.5 | If SBI SRST implementation is +also available, the OS should not use the SBI interface directly but use this +UEFI interface. +|UpdateCapsule | 8.5 | Interface is required to be +implemented but it can return EFI_UNSUPPORTED. +|QueryCapsuleCapabilities | 8.5 | Interface is required to be +implemented but it can return EFI_UNSUPPORTED. +|=== + +====== SMBIOS +The System Management BIOS (SMBIOS) table is required for the platform +complaint to server extension. The SMBIOS table is identified using +*SMBIOS3_TABLE_GUID* in UEFI configuration table. The memory type used for the +SMBIOS table is required to be of type *EfiRuntimeServicesData*. + +In addition to the conformance guidelines as mentioned in ANNEX A / 6.2 of the +SMBIOS specification 3.4.0, below additional structures are required. + +.Required SMBIOS structures +[cols="4,1,2", width=95%, align="center", options="header"] +|=== +|Structure Type | SMBIOS 3.4.0 $ | Note +|Management Controller Host Interface (Type 42) | 7.43 | Required for +Redfish Host Interface. +|Processor Additional Information (Type 44) | 7.45 | +|=== ==== System Peripherals * PCI-E -- 2.25.1 |
|