Date
1 - 7 of 7
[PATCH v4] Base boot and runtime requirements - initial commit
Rahul Pathak
Initial changes for the Base Boot & Runtime requirements.
The sections which are currently in-progress are marked as TBD.
These changes can serve as the starting point and more details/changes
can be done tailored for RISC-V.
Updated the section "Storage and Partition" along with details on
SBI Extensions in Runtime Section.
There is an patch to add RISC-V details in the EBBR spec sent by Atish.
That patch is not yet merged in the EBBR. The section on the
"Startup Protocol" in this spec will refer to the requirements there
and currently that link is marked as TBD.
Corrected SBI Spec version
Signed-off-by: Rahul Pathak <rpathak@...>
---
riscv-platform-spec.adoc | 134 +++++++++++++++++++++++++++++++++++++--
1 file changed, 127 insertions(+), 7 deletions(-)
diff --git a/riscv-platform-spec.adoc b/riscv-platform-spec.adoc
index 160c74a..8827476 100644
--- a/riscv-platform-spec.adoc
+++ b/riscv-platform-spec.adoc
@@ -34,6 +34,36 @@ include::profiles.adoc[]
// Linux-2022 Platform
== Linux-2022 Platform
+=== Terminology
+[cols="1,2", width=80%, align="left", options="header"]
+|===
+|TERM | DESCRIPTION
+|SBI | Supervisor Binary Interface
+|UEFI | Unified Extensible Firmware Interface
+|ACPI | Advanced Configuration and Power Interface
+|SMBIOS | System Management Basic I/O System
+|DTS | Devicetree source file
+|DTB | Devicetree binary
+|RVA22 | RISC-V Application 2022
+|EE | Execution Environment
+|RV32GC | RISC-V 32-bit general purpose ISA described as RV32IMAFDC.
+|RV64GC | RISC-V 64-bit general purpose ISA described as RV64IMAFDC.
+|===
+
+=== Specifications
+[cols="1,2", width=80%, align="left", options="header"]
+|===
+|SPECIFICATION | VERSION
+|link:https://uefi.org/sites/default/files/resources/UEFI_Spec_2_9_2021_03_18.pdf[UEFI Specification] | v2.9
+|link:https://github.com/devicetree-org/devicetree-specification/releases/tag/v0.3[Devicetree Specification] | v0.3
+|link:https://github.com/riscv/riscv-sbi-doc/blob/master/riscv-sbi.adoc[SBI Specification] | v0.3-rc0
+|link:[RVA22 Specification] | TBD
+|link:https://arm-software.github.io/ebbr/[EBBR Specification] | v2.0.0-pre1
+|link:https://uefi.org/sites/default/files/resources/ACPI_Spec_6_4_Jan22.pdf[ACPI Specification] | v6.4
+|link:https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.4.0.pdf[SMBIOS Specification] | v3.4.0
+|link:[Platform Policy] | TBD
+|===
+
// Base feature set for Linux-2022 Platform
=== Base
==== Architecture
@@ -59,14 +89,104 @@ include::profiles.adoc[]
* Timers
* Watchdog Timers
-==== Boot Process
-* Firmware
-* Boot-Loader
-* Discovery Mechanisms
+==== Boot and Runtime Requirements
+- The base specification defines the interface between the firmware and the
+operating system suitable for the RISC-V platforms with rich operating
+systems.
+- These requirements specifies the required boot and runtime services, device
+discovery mechanism, etc.
+- The requirements are operating system agnostic, specific firmware/bootloader
+implementation agnostic.
+- Any RV32GC or RV64GC platform seeking compliance with the base specification
+require to implement all three privilege modes i.e. M, S and U mode.
+- For the generic mandatory requirements this base specification will refer to
+the EBBR Specification. Any deviation from the EBBR will be explicitly
+mentioned in the requirements.
+- Specifications followed are mentioned in the
+<<Specifications,Specification Section>>
+
+
+===== Firmware
+- UEFI Platform is required to adhere to RISC-V Platform requirements on
+calling conventions, ABI support specific to RISC-V. Refer Chapter - 2.3.7
+RISC-V Platforms of UEFI specification.
+- For compliance with base specification platform is required to implement
+link:https://arm-software.github.io/ebbr/#required-elements[EBBR - UEFI Required Elements],
+link:https://arm-software.github.io/ebbr/#required-platform-specific-elements[EBBR - UEFI Platform Specific Elements]
+and following
+link:https://arm-software.github.io/ebbr/#required-global-variables[EBBR - Global Variables].
+
+====== Storage and Partitioning
+- Firmware is required to implement requirements as per the
+link:https://arm-software.github.io/ebbr/#firmware-storage[EBBR Firmware Storage].
+requirements.
+- For shared storage base spec requires GPT partitioning, MBR is deprecated.
+
+===== Boot Services
+- All functions defined as boot services are required. Methods for
+unsupported or unimplemented behavior must return an appropriate error
+code.
+
+====== Startup Protocol
+- UEFI firmware could be executed in either Machine mode or Supervisor mode
+during the entire POST, according to the hart capability and the platform
+design. For detailed requirements on startup protocol refer link:[**TBD** - EBBR LINK FOR STARTUP PROTOCOL]
+and UEFI chapter 2.3.7 RISC-V Platforms.
+
+
+====== Memory Map
+- Base specification requires UEFI environment to provide a system memory map
+as per the requirements link:https://arm-software.github.io/ebbr/#memory-map[EBBR - Memory Map].
+
+
+===== Discovery Mechanisms
+- Devicetree is the required mechanism for system description.
+- System is required to implement link:https://arm-software.github.io/ebbr/#devicetree[EBBR - Devicetree requirements]
+to comply with this base specification. Also refer Devicetree tables section in
+chapter - 4.6 EFI Configuration Table & Properties Table of UEFI specification.
+
+===== Runtime Services
+====== SBI
-==== Runtime services
-* SBI
-* UEFI
+- Required SBI spec version is 0.3 or higher.
+- Legacy Extensions from the SBI Specification are deprecated.
+- Required SBI extensions -
+
+[cols="1,2", width=80%, align="left", options="header"]
+|===
+|EXTENSION | CONDITIONS
+|SBI TIME | if **stimecmp** CSR not available
+|SBI IPI |
+|SBI RFENCE |
+|SBI HSM |
+|SBI SRST |
+|SBI PMU |
+|===
+
+- Required responsibilities of M-Mode runtime also includes -
+ ** Interrupt and Exception Delegation
+ ** Misaligned Load & Stores handling
+ ** Missing CSRs emulation
+ ** PMP Configuration
+
+- Wherever applicable firmware must implement UEFI interfaces over similar
+interfaces and services present in the SBI specification. For example, UEFI
+runtime services must implement ResetSystem() via SBI Reset extension.
+
+====== UEFI
+- Firmware must conform to the
+link:https://arm-software.github.io/ebbr/#uefi-runtime-services[EBBR - UEFI EFI_RUNTIME_SERVICES requirements].
+- Firmware must meet the requirements for
+link:https://arm-software.github.io/ebbr/#runtime-device-mappings[EBBR - Runtime Device Mappings]
+to avoid conflict between the firmware and OS when accessing the mapped
+devices.
+- Compliant UEFI runtime environment must meet the requirements for the
+link:https://arm-software.github.io/ebbr/#runtime-variable-access[EBBR - Runtime Variable Access].
+- Compliant implementation must meet the Realtime Clock requirements
+link:https://arm-software.github.io/ebbr/#real-time-clock-rtc[EBBR - UEFI RTC interface]
+if RTC is present in the system.
+- OS should prioritize calling the UEFI interfaces before the SBI or Platform
+specific mechanisms.
// Server extension for Linux-2022 Platform
=== Server Extension
--
2.25.1
The sections which are currently in-progress are marked as TBD.
These changes can serve as the starting point and more details/changes
can be done tailored for RISC-V.
Updated the section "Storage and Partition" along with details on
SBI Extensions in Runtime Section.
There is an patch to add RISC-V details in the EBBR spec sent by Atish.
That patch is not yet merged in the EBBR. The section on the
"Startup Protocol" in this spec will refer to the requirements there
and currently that link is marked as TBD.
Corrected SBI Spec version
Signed-off-by: Rahul Pathak <rpathak@...>
---
riscv-platform-spec.adoc | 134 +++++++++++++++++++++++++++++++++++++--
1 file changed, 127 insertions(+), 7 deletions(-)
diff --git a/riscv-platform-spec.adoc b/riscv-platform-spec.adoc
index 160c74a..8827476 100644
--- a/riscv-platform-spec.adoc
+++ b/riscv-platform-spec.adoc
@@ -34,6 +34,36 @@ include::profiles.adoc[]
// Linux-2022 Platform
== Linux-2022 Platform
+=== Terminology
+[cols="1,2", width=80%, align="left", options="header"]
+|===
+|TERM | DESCRIPTION
+|SBI | Supervisor Binary Interface
+|UEFI | Unified Extensible Firmware Interface
+|ACPI | Advanced Configuration and Power Interface
+|SMBIOS | System Management Basic I/O System
+|DTS | Devicetree source file
+|DTB | Devicetree binary
+|RVA22 | RISC-V Application 2022
+|EE | Execution Environment
+|RV32GC | RISC-V 32-bit general purpose ISA described as RV32IMAFDC.
+|RV64GC | RISC-V 64-bit general purpose ISA described as RV64IMAFDC.
+|===
+
+=== Specifications
+[cols="1,2", width=80%, align="left", options="header"]
+|===
+|SPECIFICATION | VERSION
+|link:https://uefi.org/sites/default/files/resources/UEFI_Spec_2_9_2021_03_18.pdf[UEFI Specification] | v2.9
+|link:https://github.com/devicetree-org/devicetree-specification/releases/tag/v0.3[Devicetree Specification] | v0.3
+|link:https://github.com/riscv/riscv-sbi-doc/blob/master/riscv-sbi.adoc[SBI Specification] | v0.3-rc0
+|link:[RVA22 Specification] | TBD
+|link:https://arm-software.github.io/ebbr/[EBBR Specification] | v2.0.0-pre1
+|link:https://uefi.org/sites/default/files/resources/ACPI_Spec_6_4_Jan22.pdf[ACPI Specification] | v6.4
+|link:https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.4.0.pdf[SMBIOS Specification] | v3.4.0
+|link:[Platform Policy] | TBD
+|===
+
// Base feature set for Linux-2022 Platform
=== Base
==== Architecture
@@ -59,14 +89,104 @@ include::profiles.adoc[]
* Timers
* Watchdog Timers
-==== Boot Process
-* Firmware
-* Boot-Loader
-* Discovery Mechanisms
+==== Boot and Runtime Requirements
+- The base specification defines the interface between the firmware and the
+operating system suitable for the RISC-V platforms with rich operating
+systems.
+- These requirements specifies the required boot and runtime services, device
+discovery mechanism, etc.
+- The requirements are operating system agnostic, specific firmware/bootloader
+implementation agnostic.
+- Any RV32GC or RV64GC platform seeking compliance with the base specification
+require to implement all three privilege modes i.e. M, S and U mode.
+- For the generic mandatory requirements this base specification will refer to
+the EBBR Specification. Any deviation from the EBBR will be explicitly
+mentioned in the requirements.
+- Specifications followed are mentioned in the
+<<Specifications,Specification Section>>
+
+
+===== Firmware
+- UEFI Platform is required to adhere to RISC-V Platform requirements on
+calling conventions, ABI support specific to RISC-V. Refer Chapter - 2.3.7
+RISC-V Platforms of UEFI specification.
+- For compliance with base specification platform is required to implement
+link:https://arm-software.github.io/ebbr/#required-elements[EBBR - UEFI Required Elements],
+link:https://arm-software.github.io/ebbr/#required-platform-specific-elements[EBBR - UEFI Platform Specific Elements]
+and following
+link:https://arm-software.github.io/ebbr/#required-global-variables[EBBR - Global Variables].
+
+====== Storage and Partitioning
+- Firmware is required to implement requirements as per the
+link:https://arm-software.github.io/ebbr/#firmware-storage[EBBR Firmware Storage].
+requirements.
+- For shared storage base spec requires GPT partitioning, MBR is deprecated.
+
+===== Boot Services
+- All functions defined as boot services are required. Methods for
+unsupported or unimplemented behavior must return an appropriate error
+code.
+
+====== Startup Protocol
+- UEFI firmware could be executed in either Machine mode or Supervisor mode
+during the entire POST, according to the hart capability and the platform
+design. For detailed requirements on startup protocol refer link:[**TBD** - EBBR LINK FOR STARTUP PROTOCOL]
+and UEFI chapter 2.3.7 RISC-V Platforms.
+
+
+====== Memory Map
+- Base specification requires UEFI environment to provide a system memory map
+as per the requirements link:https://arm-software.github.io/ebbr/#memory-map[EBBR - Memory Map].
+
+
+===== Discovery Mechanisms
+- Devicetree is the required mechanism for system description.
+- System is required to implement link:https://arm-software.github.io/ebbr/#devicetree[EBBR - Devicetree requirements]
+to comply with this base specification. Also refer Devicetree tables section in
+chapter - 4.6 EFI Configuration Table & Properties Table of UEFI specification.
+
+===== Runtime Services
+====== SBI
-==== Runtime services
-* SBI
-* UEFI
+- Required SBI spec version is 0.3 or higher.
+- Legacy Extensions from the SBI Specification are deprecated.
+- Required SBI extensions -
+
+[cols="1,2", width=80%, align="left", options="header"]
+|===
+|EXTENSION | CONDITIONS
+|SBI TIME | if **stimecmp** CSR not available
+|SBI IPI |
+|SBI RFENCE |
+|SBI HSM |
+|SBI SRST |
+|SBI PMU |
+|===
+
+- Required responsibilities of M-Mode runtime also includes -
+ ** Interrupt and Exception Delegation
+ ** Misaligned Load & Stores handling
+ ** Missing CSRs emulation
+ ** PMP Configuration
+
+- Wherever applicable firmware must implement UEFI interfaces over similar
+interfaces and services present in the SBI specification. For example, UEFI
+runtime services must implement ResetSystem() via SBI Reset extension.
+
+====== UEFI
+- Firmware must conform to the
+link:https://arm-software.github.io/ebbr/#uefi-runtime-services[EBBR - UEFI EFI_RUNTIME_SERVICES requirements].
+- Firmware must meet the requirements for
+link:https://arm-software.github.io/ebbr/#runtime-device-mappings[EBBR - Runtime Device Mappings]
+to avoid conflict between the firmware and OS when accessing the mapped
+devices.
+- Compliant UEFI runtime environment must meet the requirements for the
+link:https://arm-software.github.io/ebbr/#runtime-variable-access[EBBR - Runtime Variable Access].
+- Compliant implementation must meet the Realtime Clock requirements
+link:https://arm-software.github.io/ebbr/#real-time-clock-rtc[EBBR - UEFI RTC interface]
+if RTC is present in the system.
+- OS should prioritize calling the UEFI interfaces before the SBI or Platform
+specific mechanisms.
// Server extension for Linux-2022 Platform
=== Server Extension
--
2.25.1
Rahul Pathak
Initial changes for the Base Boot & Runtime requirements.
The sections which are currently in-progress are marked as TBD.
These changes can serve as the starting point and more details/changes
can be done tailored for RISC-V.
Updated the section "Storage and Partition" along with details on
SBI Extensions in Runtime Section.
There is an patch to add RISC-V details in the EBBR spec sent by Atish.
That patch is not yet merged in the EBBR. The section on the
"Startup Protocol" in this spec will refer to the requirements there
and currently that link is marked as TBD.
Corrected SBI Spec version
Signed-off-by: Rahul Pathak <rpathak@...>
---
riscv-platform-spec.adoc | 134 +++++++++++++++++++++++++++++++++++++--
1 file changed, 127 insertions(+), 7 deletions(-)
diff --git a/riscv-platform-spec.adoc b/riscv-platform-spec.adoc
index 160c74a..8827476 100644
--- a/riscv-platform-spec.adoc
+++ b/riscv-platform-spec.adoc
@@ -34,6 +34,36 @@ include::profiles.adoc[]
// Linux-2022 Platform
== Linux-2022 Platform
+=== Terminology
+[cols="1,2", width=80%, align="left", options="header"]
+|===
+|TERM | DESCRIPTION
+|SBI | Supervisor Binary Interface
+|UEFI | Unified Extensible Firmware Interface
+|ACPI | Advanced Configuration and Power Interface
+|SMBIOS | System Management Basic I/O System
+|DTS | Devicetree source file
+|DTB | Devicetree binary
+|RVA22 | RISC-V Application 2022
+|EE | Execution Environment
+|RV32GC | RISC-V 32-bit general purpose ISA described as RV32IMAFDC.
+|RV64GC | RISC-V 64-bit general purpose ISA described as RV64IMAFDC.
+|===
+
+=== Specifications
+[cols="1,2", width=80%, align="left", options="header"]
+|===
+|SPECIFICATION | VERSION
+|link:https://uefi.org/sites/default/files/resources/UEFI_Spec_2_9_2021_03_18.pdf[UEFI Specification] | v2.9
+|link:https://github.com/devicetree-org/devicetree-specification/releases/tag/v0.3[Devicetree Specification] | v0.3
+|link:https://github.com/riscv/riscv-sbi-doc/blob/master/riscv-sbi.adoc[SBI Specification] | v0.3-rc0
+|link:[RVA22 Specification] | TBD
+|link:https://arm-software.github.io/ebbr/[EBBR Specification] | v2.0.0-pre1
+|link:https://uefi.org/sites/default/files/resources/ACPI_Spec_6_4_Jan22.pdf[ACPI Specification] | v6.4
+|link:https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.4.0.pdf[SMBIOS Specification] | v3.4.0
+|link:[Platform Policy] | TBD
+|===
+
// Base feature set for Linux-2022 Platform
=== Base
==== Architecture
@@ -59,14 +89,104 @@ include::profiles.adoc[]
* Timers
* Watchdog Timers
-==== Boot Process
-* Firmware
-* Boot-Loader
-* Discovery Mechanisms
+==== Boot and Runtime Requirements
+- The base specification defines the interface between the firmware and the
+operating system suitable for the RISC-V platforms with rich operating
+systems.
+- These requirements specifies the required boot and runtime services, device
+discovery mechanism, etc.
+- The requirements are operating system agnostic, specific firmware/bootloader
+implementation agnostic.
+- Any RV32GC or RV64GC platform seeking compliance with the base specification
+require to implement all three privilege modes i.e. M, S and U mode.
+- For the generic mandatory requirements this base specification will refer to
+the EBBR Specification. Any deviation from the EBBR will be explicitly
+mentioned in the requirements.
+- Specifications followed are mentioned in the
+<<Specifications,Specification Section>>
+
+
+===== Firmware
+- UEFI Platform is required to adhere to RISC-V Platform requirements on
+calling conventions, ABI support specific to RISC-V. Refer Chapter - 2.3.7
+RISC-V Platforms of UEFI specification.
+- For compliance with base specification platform is required to implement
+link:https://arm-software.github.io/ebbr/#required-elements[EBBR - UEFI Required Elements],
+link:https://arm-software.github.io/ebbr/#required-platform-specific-elements[EBBR - UEFI Platform Specific Elements]
+and following
+link:https://arm-software.github.io/ebbr/#required-global-variables[EBBR - Global Variables].
+
+====== Storage and Partitioning
+- Firmware is required to implement requirements as per the
+link:https://arm-software.github.io/ebbr/#firmware-storage[EBBR Firmware Storage].
+requirements.
+- For shared storage base spec requires GPT partitioning, MBR is deprecated.
+
+===== Boot Services
+- All functions defined as boot services are required. Methods for
+unsupported or unimplemented behavior must return an appropriate error
+code.
+
+====== Startup Protocol
+- UEFI firmware could be executed in either Machine mode or Supervisor mode
+during the entire POST, according to the hart capability and the platform
+design. For detailed requirements on startup protocol refer link:[**TBD** - EBBR LINK FOR STARTUP PROTOCOL]
+and UEFI chapter 2.3.7 RISC-V Platforms.
+
+
+====== Memory Map
+- Base specification requires UEFI environment to provide a system memory map
+as per the requirements link:https://arm-software.github.io/ebbr/#memory-map[EBBR - Memory Map].
+
+
+===== Discovery Mechanisms
+- Devicetree is the required mechanism for system description.
+- System is required to implement link:https://arm-software.github.io/ebbr/#devicetree[EBBR - Devicetree requirements]
+to comply with this base specification. Also refer Devicetree tables section in
+chapter - 4.6 EFI Configuration Table & Properties Table of UEFI specification.
+
+===== Runtime Services
+====== SBI
-==== Runtime services
-* SBI
-* UEFI
+- Required SBI spec version is 0.3 or higher.
+- Legacy Extensions from the SBI Specification are deprecated.
+- Required SBI extensions -
+
+[cols="1,2", width=80%, align="left", options="header"]
+|===
+|EXTENSION | CONDITIONS
+|SBI TIME | if **stimecmp** CSR not available
+|SBI IPI |
+|SBI RFENCE |
+|SBI HSM |
+|SBI SRST |
+|SBI PMU |
+|===
+
+- Required responsibilities of M-Mode runtime also includes -
+ ** Interrupt and Exception Delegation
+ ** Misaligned Load & Stores handling
+ ** Missing CSRs emulation
+ ** PMP Configuration
+
+- Wherever applicable firmware must implement UEFI interfaces over similar
+interfaces and services present in the SBI specification. For example, UEFI
+runtime services must implement ResetSystem() via SBI Reset extension.
+
+====== UEFI
+- Firmware must conform to the
+link:https://arm-software.github.io/ebbr/#uefi-runtime-services[EBBR - UEFI EFI_RUNTIME_SERVICES requirements].
+- Firmware must meet the requirements for
+link:https://arm-software.github.io/ebbr/#runtime-device-mappings[EBBR - Runtime Device Mappings]
+to avoid conflict between the firmware and OS when accessing the mapped
+devices.
+- Compliant UEFI runtime environment must meet the requirements for the
+link:https://arm-software.github.io/ebbr/#runtime-variable-access[EBBR - Runtime Variable Access].
+- Compliant implementation must meet the Realtime Clock requirements
+link:https://arm-software.github.io/ebbr/#real-time-clock-rtc[EBBR - UEFI RTC interface]
+if RTC is present in the system.
+- OS should prioritize calling the UEFI interfaces before the SBI or Platform
+specific mechanisms.
// Server extension for Linux-2022 Platform
=== Server Extension
--
2.25.1
The sections which are currently in-progress are marked as TBD.
These changes can serve as the starting point and more details/changes
can be done tailored for RISC-V.
Updated the section "Storage and Partition" along with details on
SBI Extensions in Runtime Section.
There is an patch to add RISC-V details in the EBBR spec sent by Atish.
That patch is not yet merged in the EBBR. The section on the
"Startup Protocol" in this spec will refer to the requirements there
and currently that link is marked as TBD.
Corrected SBI Spec version
Signed-off-by: Rahul Pathak <rpathak@...>
---
riscv-platform-spec.adoc | 134 +++++++++++++++++++++++++++++++++++++--
1 file changed, 127 insertions(+), 7 deletions(-)
diff --git a/riscv-platform-spec.adoc b/riscv-platform-spec.adoc
index 160c74a..8827476 100644
--- a/riscv-platform-spec.adoc
+++ b/riscv-platform-spec.adoc
@@ -34,6 +34,36 @@ include::profiles.adoc[]
// Linux-2022 Platform
== Linux-2022 Platform
+=== Terminology
+[cols="1,2", width=80%, align="left", options="header"]
+|===
+|TERM | DESCRIPTION
+|SBI | Supervisor Binary Interface
+|UEFI | Unified Extensible Firmware Interface
+|ACPI | Advanced Configuration and Power Interface
+|SMBIOS | System Management Basic I/O System
+|DTS | Devicetree source file
+|DTB | Devicetree binary
+|RVA22 | RISC-V Application 2022
+|EE | Execution Environment
+|RV32GC | RISC-V 32-bit general purpose ISA described as RV32IMAFDC.
+|RV64GC | RISC-V 64-bit general purpose ISA described as RV64IMAFDC.
+|===
+
+=== Specifications
+[cols="1,2", width=80%, align="left", options="header"]
+|===
+|SPECIFICATION | VERSION
+|link:https://uefi.org/sites/default/files/resources/UEFI_Spec_2_9_2021_03_18.pdf[UEFI Specification] | v2.9
+|link:https://github.com/devicetree-org/devicetree-specification/releases/tag/v0.3[Devicetree Specification] | v0.3
+|link:https://github.com/riscv/riscv-sbi-doc/blob/master/riscv-sbi.adoc[SBI Specification] | v0.3-rc0
+|link:[RVA22 Specification] | TBD
+|link:https://arm-software.github.io/ebbr/[EBBR Specification] | v2.0.0-pre1
+|link:https://uefi.org/sites/default/files/resources/ACPI_Spec_6_4_Jan22.pdf[ACPI Specification] | v6.4
+|link:https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.4.0.pdf[SMBIOS Specification] | v3.4.0
+|link:[Platform Policy] | TBD
+|===
+
// Base feature set for Linux-2022 Platform
=== Base
==== Architecture
@@ -59,14 +89,104 @@ include::profiles.adoc[]
* Timers
* Watchdog Timers
-==== Boot Process
-* Firmware
-* Boot-Loader
-* Discovery Mechanisms
+==== Boot and Runtime Requirements
+- The base specification defines the interface between the firmware and the
+operating system suitable for the RISC-V platforms with rich operating
+systems.
+- These requirements specifies the required boot and runtime services, device
+discovery mechanism, etc.
+- The requirements are operating system agnostic, specific firmware/bootloader
+implementation agnostic.
+- Any RV32GC or RV64GC platform seeking compliance with the base specification
+require to implement all three privilege modes i.e. M, S and U mode.
+- For the generic mandatory requirements this base specification will refer to
+the EBBR Specification. Any deviation from the EBBR will be explicitly
+mentioned in the requirements.
+- Specifications followed are mentioned in the
+<<Specifications,Specification Section>>
+
+
+===== Firmware
+- UEFI Platform is required to adhere to RISC-V Platform requirements on
+calling conventions, ABI support specific to RISC-V. Refer Chapter - 2.3.7
+RISC-V Platforms of UEFI specification.
+- For compliance with base specification platform is required to implement
+link:https://arm-software.github.io/ebbr/#required-elements[EBBR - UEFI Required Elements],
+link:https://arm-software.github.io/ebbr/#required-platform-specific-elements[EBBR - UEFI Platform Specific Elements]
+and following
+link:https://arm-software.github.io/ebbr/#required-global-variables[EBBR - Global Variables].
+
+====== Storage and Partitioning
+- Firmware is required to implement requirements as per the
+link:https://arm-software.github.io/ebbr/#firmware-storage[EBBR Firmware Storage].
+requirements.
+- For shared storage base spec requires GPT partitioning, MBR is deprecated.
+
+===== Boot Services
+- All functions defined as boot services are required. Methods for
+unsupported or unimplemented behavior must return an appropriate error
+code.
+
+====== Startup Protocol
+- UEFI firmware could be executed in either Machine mode or Supervisor mode
+during the entire POST, according to the hart capability and the platform
+design. For detailed requirements on startup protocol refer link:[**TBD** - EBBR LINK FOR STARTUP PROTOCOL]
+and UEFI chapter 2.3.7 RISC-V Platforms.
+
+
+====== Memory Map
+- Base specification requires UEFI environment to provide a system memory map
+as per the requirements link:https://arm-software.github.io/ebbr/#memory-map[EBBR - Memory Map].
+
+
+===== Discovery Mechanisms
+- Devicetree is the required mechanism for system description.
+- System is required to implement link:https://arm-software.github.io/ebbr/#devicetree[EBBR - Devicetree requirements]
+to comply with this base specification. Also refer Devicetree tables section in
+chapter - 4.6 EFI Configuration Table & Properties Table of UEFI specification.
+
+===== Runtime Services
+====== SBI
-==== Runtime services
-* SBI
-* UEFI
+- Required SBI spec version is 0.3 or higher.
+- Legacy Extensions from the SBI Specification are deprecated.
+- Required SBI extensions -
+
+[cols="1,2", width=80%, align="left", options="header"]
+|===
+|EXTENSION | CONDITIONS
+|SBI TIME | if **stimecmp** CSR not available
+|SBI IPI |
+|SBI RFENCE |
+|SBI HSM |
+|SBI SRST |
+|SBI PMU |
+|===
+
+- Required responsibilities of M-Mode runtime also includes -
+ ** Interrupt and Exception Delegation
+ ** Misaligned Load & Stores handling
+ ** Missing CSRs emulation
+ ** PMP Configuration
+
+- Wherever applicable firmware must implement UEFI interfaces over similar
+interfaces and services present in the SBI specification. For example, UEFI
+runtime services must implement ResetSystem() via SBI Reset extension.
+
+====== UEFI
+- Firmware must conform to the
+link:https://arm-software.github.io/ebbr/#uefi-runtime-services[EBBR - UEFI EFI_RUNTIME_SERVICES requirements].
+- Firmware must meet the requirements for
+link:https://arm-software.github.io/ebbr/#runtime-device-mappings[EBBR - Runtime Device Mappings]
+to avoid conflict between the firmware and OS when accessing the mapped
+devices.
+- Compliant UEFI runtime environment must meet the requirements for the
+link:https://arm-software.github.io/ebbr/#runtime-variable-access[EBBR - Runtime Variable Access].
+- Compliant implementation must meet the Realtime Clock requirements
+link:https://arm-software.github.io/ebbr/#real-time-clock-rtc[EBBR - UEFI RTC interface]
+if RTC is present in the system.
+- OS should prioritize calling the UEFI interfaces before the SBI or Platform
+specific mechanisms.
// Server extension for Linux-2022 Platform
=== Server Extension
--
2.25.1
Rahul Pathak
Ping for review
On Tue, May 11, 2021 at 9:12 AM Rahul Pathak via lists.riscv.org <rpathak=ventanamicro.com@...> wrote:
Initial changes for the Base Boot & Runtime requirements.
The sections which are currently in-progress are marked as TBD.
These changes can serve as the starting point and more details/changes
can be done tailored for RISC-V.
Updated the section "Storage and Partition" along with details on
SBI Extensions in Runtime Section.
There is an patch to add RISC-V details in the EBBR spec sent by Atish.
That patch is not yet merged in the EBBR. The section on the
"Startup Protocol" in this spec will refer to the requirements there
and currently that link is marked as TBD.
Corrected SBI Spec version
Signed-off-by: Rahul Pathak <rpathak@...>
---
riscv-platform-spec.adoc | 134 +++++++++++++++++++++++++++++++++++++--
1 file changed, 127 insertions(+), 7 deletions(-)
diff --git a/riscv-platform-spec.adoc b/riscv-platform-spec.adoc
index 160c74a..8827476 100644
--- a/riscv-platform-spec.adoc
+++ b/riscv-platform-spec.adoc
@@ -34,6 +34,36 @@ include::profiles.adoc[]
// Linux-2022 Platform
== Linux-2022 Platform
+=== Terminology
+[cols="1,2", width=80%, align="left", options="header"]
+|===
+|TERM | DESCRIPTION
+|SBI | Supervisor Binary Interface
+|UEFI | Unified Extensible Firmware Interface
+|ACPI | Advanced Configuration and Power Interface
+|SMBIOS | System Management Basic I/O System
+|DTS | Devicetree source file
+|DTB | Devicetree binary
+|RVA22 | RISC-V Application 2022
+|EE | Execution Environment
+|RV32GC | RISC-V 32-bit general purpose ISA described as RV32IMAFDC.
+|RV64GC | RISC-V 64-bit general purpose ISA described as RV64IMAFDC.
+|===
+
+=== Specifications
+[cols="1,2", width=80%, align="left", options="header"]
+|===
+|SPECIFICATION | VERSION
+|link:https://uefi.org/sites/default/files/resources/UEFI_Spec_2_9_2021_03_18.pdf[UEFI Specification] | v2.9
+|link:https://github.com/devicetree-org/devicetree-specification/releases/tag/v0.3[Devicetree Specification] | v0.3
+|link:https://github.com/riscv/riscv-sbi-doc/blob/master/riscv-sbi.adoc[SBI Specification] | v0.3-rc0
+|link:[RVA22 Specification] | TBD
+|link:https://arm-software.github.io/ebbr/[EBBR Specification] | v2.0.0-pre1
+|link:https://uefi.org/sites/default/files/resources/ACPI_Spec_6_4_Jan22.pdf[ACPI Specification] | v6.4
+|link:https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.4.0.pdf[SMBIOS Specification] | v3.4.0
+|link:[Platform Policy] | TBD
+|===
+
// Base feature set for Linux-2022 Platform
=== Base
==== Architecture
@@ -59,14 +89,104 @@ include::profiles.adoc[]
* Timers
* Watchdog Timers
-==== Boot Process
-* Firmware
-* Boot-Loader
-* Discovery Mechanisms
+==== Boot and Runtime Requirements
+- The base specification defines the interface between the firmware and the
+operating system suitable for the RISC-V platforms with rich operating
+systems.
+- These requirements specifies the required boot and runtime services, device
+discovery mechanism, etc.
+- The requirements are operating system agnostic, specific firmware/bootloader
+implementation agnostic.
+- Any RV32GC or RV64GC platform seeking compliance with the base specification
+require to implement all three privilege modes i.e. M, S and U mode.
+- For the generic mandatory requirements this base specification will refer to
+the EBBR Specification. Any deviation from the EBBR will be explicitly
+mentioned in the requirements.
+- Specifications followed are mentioned in the
+<<Specifications,Specification Section>>
+
+
+===== Firmware
+- UEFI Platform is required to adhere to RISC-V Platform requirements on
+calling conventions, ABI support specific to RISC-V. Refer Chapter - 2.3.7
+RISC-V Platforms of UEFI specification.
+- For compliance with base specification platform is required to implement
+link:https://arm-software.github.io/ebbr/#required-elements[EBBR - UEFI Required Elements],
+link:https://arm-software.github.io/ebbr/#required-platform-specific-elements[EBBR - UEFI Platform Specific Elements]
+and following
+link:https://arm-software.github.io/ebbr/#required-global-variables[EBBR - Global Variables].
+
+====== Storage and Partitioning
+- Firmware is required to implement requirements as per the
+link:https://arm-software.github.io/ebbr/#firmware-storage[EBBR Firmware Storage].
+requirements.
+- For shared storage base spec requires GPT partitioning, MBR is deprecated.
+
+===== Boot Services
+- All functions defined as boot services are required. Methods for
+unsupported or unimplemented behavior must return an appropriate error
+code.
+
+====== Startup Protocol
+- UEFI firmware could be executed in either Machine mode or Supervisor mode
+during the entire POST, according to the hart capability and the platform
+design. For detailed requirements on startup protocol refer link:[**TBD** - EBBR LINK FOR STARTUP PROTOCOL]
+and UEFI chapter 2.3.7 RISC-V Platforms.
+
+
+====== Memory Map
+- Base specification requires UEFI environment to provide a system memory map
+as per the requirements link:https://arm-software.github.io/ebbr/#memory-map[EBBR - Memory Map].
+
+
+===== Discovery Mechanisms
+- Devicetree is the required mechanism for system description.
+- System is required to implement link:https://arm-software.github.io/ebbr/#devicetree[EBBR - Devicetree requirements]
+to comply with this base specification. Also refer Devicetree tables section in
+chapter - 4.6 EFI Configuration Table & Properties Table of UEFI specification.
+
+===== Runtime Services
+====== SBI
-==== Runtime services
-* SBI
-* UEFI
+- Required SBI spec version is 0.3 or higher.
+- Legacy Extensions from the SBI Specification are deprecated.
+- Required SBI extensions -
+
+[cols="1,2", width=80%, align="left", options="header"]
+|===
+|EXTENSION | CONDITIONS
+|SBI TIME | if **stimecmp** CSR not available
+|SBI IPI |
+|SBI RFENCE |
+|SBI HSM |
+|SBI SRST |
+|SBI PMU |
+|===
+
+- Required responsibilities of M-Mode runtime also includes -
+ ** Interrupt and Exception Delegation
+ ** Misaligned Load & Stores handling
+ ** Missing CSRs emulation
+ ** PMP Configuration
+
+- Wherever applicable firmware must implement UEFI interfaces over similar
+interfaces and services present in the SBI specification. For example, UEFI
+runtime services must implement ResetSystem() via SBI Reset extension.
+
+====== UEFI
+- Firmware must conform to the
+link:https://arm-software.github.io/ebbr/#uefi-runtime-services[EBBR - UEFI EFI_RUNTIME_SERVICES requirements].
+- Firmware must meet the requirements for
+link:https://arm-software.github.io/ebbr/#runtime-device-mappings[EBBR - Runtime Device Mappings]
+to avoid conflict between the firmware and OS when accessing the mapped
+devices.
+- Compliant UEFI runtime environment must meet the requirements for the
+link:https://arm-software.github.io/ebbr/#runtime-variable-access[EBBR - Runtime Variable Access].
+- Compliant implementation must meet the Realtime Clock requirements
+link:https://arm-software.github.io/ebbr/#real-time-clock-rtc[EBBR - UEFI RTC interface]
+if RTC is present in the system.
+- OS should prioritize calling the UEFI interfaces before the SBI or Platform
+specific mechanisms.
// Server extension for Linux-2022 Platform
=== Server Extension
--
2.25.1
Rahul Pathak <rpathak@...> 於 2021年5月12日 週三 下午5:30寫道:
Ping for reviewOn Tue, May 11, 2021 at 9:12 AM Rahul Pathak via lists.riscv.org <rpathak=ventanamicro.com@...> wrote:Initial changes for the Base Boot & Runtime requirements.
The sections which are currently in-progress are marked as TBD.
These changes can serve as the starting point and more details/changes
can be done tailored for RISC-V.
Updated the section "Storage and Partition" along with details on
SBI Extensions in Runtime Section.
There is an patch to add RISC-V details in the EBBR spec sent by Atish.
That patch is not yet merged in the EBBR. The section on the
"Startup Protocol" in this spec will refer to the requirements there
and currently that link is marked as TBD.
Corrected SBI Spec version
Signed-off-by: Rahul Pathak <rpathak@...>
---
riscv-platform-spec.adoc | 134 +++++++++++++++++++++++++++++++++++++--
1 file changed, 127 insertions(+), 7 deletions(-)
diff --git a/riscv-platform-spec.adoc b/riscv-platform-spec.adoc
index 160c74a..8827476 100644
--- a/riscv-platform-spec.adoc
+++ b/riscv-platform-spec.adoc
@@ -34,6 +34,36 @@ include::profiles.adoc[]
// Linux-2022 Platform
== Linux-2022 Platform
+=== Terminology
+[cols="1,2", width=80%, align="left", options="header"]
+|===
+|TERM | DESCRIPTION
+|SBI | Supervisor Binary Interface
+|UEFI | Unified Extensible Firmware Interface
+|ACPI | Advanced Configuration and Power Interface
+|SMBIOS | System Management Basic I/O System
+|DTS | Devicetree source file
+|DTB | Devicetree binary
+|RVA22 | RISC-V Application 2022
+|EE | Execution Environment
+|RV32GC | RISC-V 32-bit general purpose ISA described as RV32IMAFDC.
+|RV64GC | RISC-V 64-bit general purpose ISA described as RV64IMAFDC.
+|===
+
+=== Specifications
+[cols="1,2", width=80%, align="left", options="header"]
+|===
+|SPECIFICATION | VERSION
+|link:https://uefi.org/sites/default/files/resources/UEFI_Spec_2_9_2021_03_18.pdf[UEFI Specification] | v2.9
+|link:https://github.com/devicetree-org/devicetree-specification/releases/tag/v0.3[Devicetree Specification] | v0.3
+|link:https://github.com/riscv/riscv-sbi-doc/blob/master/riscv-sbi.adoc[SBI Specification] | v0.3-rc0
+|link:[RVA22 Specification] | TBD
+|link:https://arm-software.github.io/ebbr/[EBBR Specification] | v2.0.0-pre1
+|link:https://uefi.org/sites/default/files/resources/ACPI_Spec_6_4_Jan22.pdf[ACPI Specification] | v6.4
+|link:https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.4.0.pdf[SMBIOS Specification] | v3.4.0
+|link:[Platform Policy] | TBD
+|===
+
// Base feature set for Linux-2022 Platform
=== Base
==== Architecture
@@ -59,14 +89,104 @@ include::profiles.adoc[]
* Timers
* Watchdog Timers
-==== Boot Process
-* Firmware
-* Boot-Loader
-* Discovery Mechanisms
+==== Boot and Runtime Requirements
+- The base specification defines the interface between the firmware and the
+operating system suitable for the RISC-V platforms with rich operating
+systems.
+- These requirements specifies the required boot and runtime services, device
+discovery mechanism, etc.
+- The requirements are operating system agnostic, specific firmware/bootloader
+implementation agnostic.
+- Any RV32GC or RV64GC platform seeking compliance with the base specification
+require to implement all three privilege modes i.e. M, S and U mode.
+- For the generic mandatory requirements this base specification will refer to
+the EBBR Specification. Any deviation from the EBBR will be explicitly
+mentioned in the requirements.
+- Specifications followed are mentioned in the
+<<Specifications,Specification Section>>
+
+
+===== Firmware
+- UEFI Platform is required to adhere to RISC-V Platform requirements on
+calling conventions, ABI support specific to RISC-V. Refer Chapter - 2.3.7
+RISC-V Platforms of UEFI specification.
+- For compliance with base specification platform is required to implement
+link:https://arm-software.github.io/ebbr/#required-elements[EBBR - UEFI Required Elements],
+link:https://arm-software.github.io/ebbr/#required-platform-specific-elements[EBBR - UEFI Platform Specific Elements]
+and following
+link:https://arm-software.github.io/ebbr/#required-global-variables[EBBR - Global Variables].
+
+====== Storage and Partitioning
+- Firmware is required to implement requirements as per the
+link:https://arm-software.github.io/ebbr/#firmware-storage[EBBR Firmware Storage].
+requirements.
+- For shared storage base spec requires GPT partitioning, MBR is deprecated.
I give my RB for this patch below to keep this work moves on.
I would like to have the statement in the Server extension section
addition to this requirement because the Firmware Storage section in EBBR is mainly for the embedded system and FSBL can access the partition to load FW in the early stage. On the server platform, the FW is mandated by BMC for the root of trust, firmware update, and other OEM features. Also, the FW image is not visible to the processor until BMC exposes the image to the processer address space. Some fundamental designs are different , and I think OEMs don't want to diverge their BMC code for the different processor archs.
+
+===== Boot Services
+- All functions defined as boot services are required. Methods for
+unsupported or unimplemented behavior must return an appropriate error
+code.
+
+====== Startup Protocol
+- UEFI firmware could be executed in either Machine mode or Supervisor mode
+during the entire POST, according to the hart capability and the platform
+design. For detailed requirements on startup protocol refer link:[**TBD** - EBBR LINK FOR STARTUP PROTOCOL]
+and UEFI chapter 2.3.7 RISC-V Platforms.
+
+
+====== Memory Map
+- Base specification requires UEFI environment to provide a system memory map
+as per the requirements link:https://arm-software.github.io/ebbr/#memory-map[EBBR - Memory Map].
+
+
+===== Discovery Mechanisms
+- Devicetree is the required mechanism for system description.
+- System is required to implement link:https://arm-software.github.io/ebbr/#devicetree[EBBR - Devicetree requirements]
+to comply with this base specification. Also refer Devicetree tables section in
+chapter - 4.6 EFI Configuration Table & Properties Table of UEFI specification.
I would withdraw the feedback I gave in the previous patch that regards the SMBOS as the discovery mechanism. We have that already in the server extension.
Reviewed-by: Abner Chang <renba.chang@...>
Abner
+
+===== Runtime Services
+====== SBI
-==== Runtime services
-* SBI
-* UEFI
+- Required SBI spec version is 0.3 or higher.
+- Legacy Extensions from the SBI Specification are deprecated.
+- Required SBI extensions -
+
+[cols="1,2", width=80%, align="left", options="header"]
+|===
+|EXTENSION | CONDITIONS
+|SBI TIME | if **stimecmp** CSR not available
+|SBI IPI |
+|SBI RFENCE |
+|SBI HSM |
+|SBI SRST |
+|SBI PMU |
+|===
+
+- Required responsibilities of M-Mode runtime also includes -
+ ** Interrupt and Exception Delegation
+ ** Misaligned Load & Stores handling
+ ** Missing CSRs emulation
+ ** PMP Configuration
+
+- Wherever applicable firmware must implement UEFI interfaces over similar
+interfaces and services present in the SBI specification. For example, UEFI
+runtime services must implement ResetSystem() via SBI Reset extension.
+
+====== UEFI
+- Firmware must conform to the
+link:https://arm-software.github.io/ebbr/#uefi-runtime-services[EBBR - UEFI EFI_RUNTIME_SERVICES requirements].
+- Firmware must meet the requirements for
+link:https://arm-software.github.io/ebbr/#runtime-device-mappings[EBBR - Runtime Device Mappings]
+to avoid conflict between the firmware and OS when accessing the mapped
+devices.
+- Compliant UEFI runtime environment must meet the requirements for the
+link:https://arm-software.github.io/ebbr/#runtime-variable-access[EBBR - Runtime Variable Access].
+- Compliant implementation must meet the Realtime Clock requirements
+link:https://arm-software.github.io/ebbr/#real-time-clock-rtc[EBBR - UEFI RTC interface]
+if RTC is present in the system.
+- OS should prioritize calling the UEFI interfaces before the SBI or Platform
+specific mechanisms.
// Server extension for Linux-2022 Platform
=== Server Extension
--
2.25.1
Sunil V L
Hi Rahul,
On Wed, May 12, 2021 at 02:59:56PM +0530, Rahul Pathak wrote:
On Wed, May 12, 2021 at 02:59:56PM +0530, Rahul Pathak wrote:
Ping for reviewNIT: specifies -> specify
On Tue, May 11, 2021 at 9:12 AM Rahul Pathak via lists.riscv.org <rpathak=
ventanamicro.com@...> wrote:Initial changes for the Base Boot & Runtime requirements.
The sections which are currently in-progress are marked as TBD.
These changes can serve as the starting point and more details/changes
can be done tailored for RISC-V.
Updated the section "Storage and Partition" along with details on
SBI Extensions in Runtime Section.
There is an patch to add RISC-V details in the EBBR spec sent by Atish.
That patch is not yet merged in the EBBR. The section on the
"Startup Protocol" in this spec will refer to the requirements there
and currently that link is marked as TBD.
Corrected SBI Spec version
Signed-off-by: Rahul Pathak <rpathak@...>
---
riscv-platform-spec.adoc | 134 +++++++++++++++++++++++++++++++++++++--
1 file changed, 127 insertions(+), 7 deletions(-)
diff --git a/riscv-platform-spec.adoc b/riscv-platform-spec.adoc
index 160c74a..8827476 100644
--- a/riscv-platform-spec.adoc
+++ b/riscv-platform-spec.adoc
@@ -34,6 +34,36 @@ include::profiles.adoc[]
// Linux-2022 Platform
== Linux-2022 Platform
+=== Terminology
+[cols="1,2", width=80%, align="left", options="header"]
+|===
+|TERM | DESCRIPTION
+|SBI | Supervisor Binary Interface
+|UEFI | Unified Extensible Firmware Interface
+|ACPI | Advanced Configuration and Power Interface
+|SMBIOS | System Management Basic I/O System
+|DTS | Devicetree source file
+|DTB | Devicetree binary
+|RVA22 | RISC-V Application 2022
+|EE | Execution Environment
+|RV32GC | RISC-V 32-bit general purpose ISA described as RV32IMAFDC.
+|RV64GC | RISC-V 64-bit general purpose ISA described as RV64IMAFDC.
+|===
+
+=== Specifications
+[cols="1,2", width=80%, align="left", options="header"]
+|===
+|SPECIFICATION | VERSION
+|link:
https://uefi.org/sites/default/files/resources/UEFI_Spec_2_9_2021_03_18.pdf[UEFI
Specification] | v2.9
+|link:
https://github.com/devicetree-org/devicetree-specification/releases/tag/v0.3[Devicetree
Specification] | v0.3
+|link:
https://github.com/riscv/riscv-sbi-doc/blob/master/riscv-sbi.adoc[SBI
Specification] | v0.3-rc0
+|link:[RVA22 Specification]
| TBD
+|link:https://arm-software.github.io/ebbr/[EBBR Specification]
| v2.0.0-pre1
+|link:
https://uefi.org/sites/default/files/resources/ACPI_Spec_6_4_Jan22.pdf[ACPI
Specification] | v6.4
+|link:
https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.4.0.pdf[SMBIOS
Specification] | v3.4.0
+|link:[Platform Policy]
| TBD
+|===
+
// Base feature set for Linux-2022 Platform
=== Base
==== Architecture
@@ -59,14 +89,104 @@ include::profiles.adoc[]
* Timers
* Watchdog Timers
-==== Boot Process
-* Firmware
-* Boot-Loader
-* Discovery Mechanisms
+==== Boot and Runtime Requirements
+- The base specification defines the interface between the firmware and
the
+operating system suitable for the RISC-V platforms with rich operating
+systems.
+- These requirements specifies the required boot and runtime services,
device
+discovery mechanism, etc.
+- The requirements are operating system agnostic, specific
firmware/bootloader
+implementation agnostic.
+- Any RV32GC or RV64GC platform seeking compliance with the base
specification
+require to implement all three privilege modes i.e. M, S and U mode.
+- For the generic mandatory requirements this base specification will
refer to
+the EBBR Specification. Any deviation from the EBBR will be explicitly
+mentioned in the requirements.
+- Specifications followed are mentioned in the
+<<Specifications,Specification Section>>
+
+
+===== Firmware
+- UEFI Platform is required to adhere to RISC-V Platform requirements on
+calling conventions, ABI support specific to RISC-V. Refer Chapter -
2.3.7
+RISC-V Platforms of UEFI specification.
+- For compliance with base specification platform is required to
implement
+link:https://arm-software.github.io/ebbr/#required-elements[EBBR - UEFI
Required Elements],
+link:
https://arm-software.github.io/ebbr/#required-platform-specific-elements[EBBR
- UEFI Platform Specific Elements]
+and following
+link:https://arm-software.github.io/ebbr/#required-global-variables[EBBR
- Global Variables].
+
+====== Storage and Partitioning
+- Firmware is required to implement requirements as per the
+link:https://arm-software.github.io/ebbr/#firmware-storage[EBBR Firmware
Storage].
+requirements.
+- For shared storage base spec requires GPT partitioning, MBR is
deprecated.
+
+===== Boot Services
+- All functions defined as boot services are required. Methods for
+unsupported or unimplemented behavior must return an appropriate error
+code.
+
+====== Startup Protocol
+- UEFI firmware could be executed in either Machine mode or Supervisor
mode
+during the entire POST, according to the hart capability and the platform
+design. For detailed requirements on startup protocol refer link:[**TBD**
- EBBR LINK FOR STARTUP PROTOCOL]
+and UEFI chapter 2.3.7 RISC-V Platforms.
+
+
+====== Memory Map
+- Base specification requires UEFI environment to provide a system memory
map
+as per the requirements link:
https://arm-software.github.io/ebbr/#memory-map[EBBR - Memory Map].
+
+
+===== Discovery Mechanisms
+- Devicetree is the required mechanism for system description.
+- System is required to implement link:
https://arm-software.github.io/ebbr/#devicetree[EBBR - Devicetree
requirements]
+to comply with this base specification. Also refer Devicetree tables
section in
+chapter - 4.6 EFI Configuration Table & Properties Table of UEFI
specification.
+
+===== Runtime Services
+====== SBI
-==== Runtime services
-* SBI
-* UEFI
+- Required SBI spec version is 0.3 or higher.
+- Legacy Extensions from the SBI Specification are deprecated.
+- Required SBI extensions -
+
+[cols="1,2", width=80%, align="left", options="header"]
+|===
+|EXTENSION | CONDITIONS
+|SBI TIME | if **stimecmp** CSR not available
+|SBI IPI |
+|SBI RFENCE |
+|SBI HSM |
+|SBI SRST |
+|SBI PMU |
+|===
+
+- Required responsibilities of M-Mode runtime also includes -
+ ** Interrupt and Exception Delegation
+ ** Misaligned Load & Stores handling
+ ** Missing CSRs emulation
+ ** PMP Configuration
+
+- Wherever applicable firmware must implement UEFI interfaces over
similar
+interfaces and services present in the SBI specification. For example,
UEFI
+runtime services must implement ResetSystem() via SBI Reset extension.
+
+====== UEFI
+- Firmware must conform to the
+link:https://arm-software.github.io/ebbr/#uefi-runtime-services[EBBR -
UEFI EFI_RUNTIME_SERVICES requirements].
+- Firmware must meet the requirements for
+link:https://arm-software.github.io/ebbr/#runtime-device-mappings[EBBR -
Runtime Device Mappings]
+to avoid conflict between the firmware and OS when accessing the mapped
+devices.
+- Compliant UEFI runtime environment must meet the requirements for the
+link:https://arm-software.github.io/ebbr/#runtime-variable-access[EBBR -
Runtime Variable Access].
+- Compliant implementation must meet the Realtime Clock requirements
+link:https://arm-software.github.io/ebbr/#real-time-clock-rtc[EBBR -
UEFI RTC interface]
+if RTC is present in the system.
+- OS should prioritize calling the UEFI interfaces before the SBI or
Platform
+specific mechanisms.
// Server extension for Linux-2022 Platform
=== Server Extension
--
2.25.1
On 11.05.21 05:41, Rahul Pathak wrote:
Use instead:
"MBR support is not required."
this.
Best regards
Heinrich
Initial changes for the Base Boot & Runtime requirements."deprecated" implies is required but will be removed in next version.
The sections which are currently in-progress are marked as TBD.
These changes can serve as the starting point and more details/changes
can be done tailored for RISC-V.
Updated the section "Storage and Partition" along with details on
SBI Extensions in Runtime Section.
There is an patch to add RISC-V details in the EBBR spec sent by Atish.
That patch is not yet merged in the EBBR. The section on the
"Startup Protocol" in this spec will refer to the requirements there
and currently that link is marked as TBD.
Corrected SBI Spec version
Signed-off-by: Rahul Pathak <rpathak@...>
---
riscv-platform-spec.adoc | 134 +++++++++++++++++++++++++++++++++++++--
1 file changed, 127 insertions(+), 7 deletions(-)
diff --git a/riscv-platform-spec.adoc b/riscv-platform-spec.adoc
index 160c74a..8827476 100644
--- a/riscv-platform-spec.adoc
+++ b/riscv-platform-spec.adoc
@@ -34,6 +34,36 @@ include::profiles.adoc[]
// Linux-2022 Platform
== Linux-2022 Platform
+=== Terminology
+[cols="1,2", width=80%, align="left", options="header"]
+|===
+|TERM | DESCRIPTION
+|SBI | Supervisor Binary Interface
+|UEFI | Unified Extensible Firmware Interface
+|ACPI | Advanced Configuration and Power Interface
+|SMBIOS | System Management Basic I/O System
+|DTS | Devicetree source file
+|DTB | Devicetree binary
+|RVA22 | RISC-V Application 2022
+|EE | Execution Environment
+|RV32GC | RISC-V 32-bit general purpose ISA described as RV32IMAFDC.
+|RV64GC | RISC-V 64-bit general purpose ISA described as RV64IMAFDC.
+|===
+
+=== Specifications
+[cols="1,2", width=80%, align="left", options="header"]
+|===
+|SPECIFICATION | VERSION
+|link:https://uefi.org/sites/default/files/resources/UEFI_Spec_2_9_2021_03_18.pdf[UEFI Specification] | v2.9
+|link:https://github.com/devicetree-org/devicetree-specification/releases/tag/v0.3[Devicetree Specification] | v0.3
+|link:https://github.com/riscv/riscv-sbi-doc/blob/master/riscv-sbi.adoc[SBI Specification] | v0.3-rc0
+|link:[RVA22 Specification] | TBD
+|link:https://arm-software.github.io/ebbr/[EBBR Specification] | v2.0.0-pre1
+|link:https://uefi.org/sites/default/files/resources/ACPI_Spec_6_4_Jan22.pdf[ACPI Specification] | v6.4
+|link:https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.4.0.pdf[SMBIOS Specification] | v3.4.0
+|link:[Platform Policy] | TBD
+|===
+
// Base feature set for Linux-2022 Platform
=== Base
==== Architecture
@@ -59,14 +89,104 @@ include::profiles.adoc[]
* Timers
* Watchdog Timers
-==== Boot Process
-* Firmware
-* Boot-Loader
-* Discovery Mechanisms
+==== Boot and Runtime Requirements
+- The base specification defines the interface between the firmware and the
+operating system suitable for the RISC-V platforms with rich operating
+systems.
+- These requirements specifies the required boot and runtime services, device
+discovery mechanism, etc.
+- The requirements are operating system agnostic, specific firmware/bootloader
+implementation agnostic.
+- Any RV32GC or RV64GC platform seeking compliance with the base specification
+require to implement all three privilege modes i.e. M, S and U mode.
+- For the generic mandatory requirements this base specification will refer to
+the EBBR Specification. Any deviation from the EBBR will be explicitly
+mentioned in the requirements.
+- Specifications followed are mentioned in the
+<<Specifications,Specification Section>>
+
+
+===== Firmware
+- UEFI Platform is required to adhere to RISC-V Platform requirements on
+calling conventions, ABI support specific to RISC-V. Refer Chapter - 2.3.7
+RISC-V Platforms of UEFI specification.
+- For compliance with base specification platform is required to implement
+link:https://arm-software.github.io/ebbr/#required-elements[EBBR - UEFI Required Elements],
+link:https://arm-software.github.io/ebbr/#required-platform-specific-elements[EBBR - UEFI Platform Specific Elements]
+and following
+link:https://arm-software.github.io/ebbr/#required-global-variables[EBBR - Global Variables].
+
+====== Storage and Partitioning
+- Firmware is required to implement requirements as per the
+link:https://arm-software.github.io/ebbr/#firmware-storage[EBBR Firmware Storage].
+requirements.
+- For shared storage base spec requires GPT partitioning, MBR is deprecated.
Use instead:
"MBR support is not required."
+Please, remove this sentence because we do not require to implement
+===== Boot Services
+- All functions defined as boot services are required. Methods for
+unsupported or unimplemented behavior must return an appropriate error
+code.
+
+====== Startup Protocol
+- UEFI firmware could be executed in either Machine mode or Supervisor mode
+during the entire POST, according to the hart capability and the platform
+design. For detailed requirements on startup protocol refer link:[**TBD** - EBBR LINK FOR STARTUP PROTOCOL]
+and UEFI chapter 2.3.7 RISC-V Platforms.
+
+
+====== Memory Map
+- Base specification requires UEFI environment to provide a system memory map
+as per the requirements link:https://arm-software.github.io/ebbr/#memory-map[EBBR - Memory Map].
+
+
+===== Discovery Mechanisms
+- Devicetree is the required mechanism for system description.
+- System is required to implement link:https://arm-software.github.io/ebbr/#devicetree[EBBR - Devicetree requirements]
+to comply with this base specification. Also refer Devicetree tables section in
+chapter - 4.6 EFI Configuration Table & Properties Table of UEFI specification.
+
+===== Runtime Services
+====== SBI
-==== Runtime services
-* SBI
-* UEFI
+- Required SBI spec version is 0.3 or higher.
+- Legacy Extensions from the SBI Specification are deprecated.
this.
Best regards
Heinrich
+- Required SBI extensions -
+
+[cols="1,2", width=80%, align="left", options="header"]
+|===
+|EXTENSION | CONDITIONS
+|SBI TIME | if **stimecmp** CSR not available
+|SBI IPI |
+|SBI RFENCE |
+|SBI HSM |
+|SBI SRST |
+|SBI PMU |
+|===
+
+- Required responsibilities of M-Mode runtime also includes -
+ ** Interrupt and Exception Delegation
+ ** Misaligned Load & Stores handling
+ ** Missing CSRs emulation
+ ** PMP Configuration
+
+- Wherever applicable firmware must implement UEFI interfaces over similar
+interfaces and services present in the SBI specification. For example, UEFI
+runtime services must implement ResetSystem() via SBI Reset extension.
+
+====== UEFI
+- Firmware must conform to the
+link:https://arm-software.github.io/ebbr/#uefi-runtime-services[EBBR - UEFI EFI_RUNTIME_SERVICES requirements].
+- Firmware must meet the requirements for
+link:https://arm-software.github.io/ebbr/#runtime-device-mappings[EBBR - Runtime Device Mappings]
+to avoid conflict between the firmware and OS when accessing the mapped
+devices.
+- Compliant UEFI runtime environment must meet the requirements for the
+link:https://arm-software.github.io/ebbr/#runtime-variable-access[EBBR - Runtime Variable Access].
+- Compliant implementation must meet the Realtime Clock requirements
+link:https://arm-software.github.io/ebbr/#real-time-clock-rtc[EBBR - UEFI RTC interface]
+if RTC is present in the system.
+- OS should prioritize calling the UEFI interfaces before the SBI or Platform
+specific mechanisms.
// Server extension for Linux-2022 Platform
=== Server Extension
Rahul Pathak
Alright, Thanks
On Mon, May 17, 2021 at 9:54 PM Heinrich Schuchardt <xypron.glpk@...> wrote:
On 11.05.21 05:41, Rahul Pathak wrote:
> Initial changes for the Base Boot & Runtime requirements.
> The sections which are currently in-progress are marked as TBD.
> These changes can serve as the starting point and more details/changes
> can be done tailored for RISC-V.
>
> Updated the section "Storage and Partition" along with details on
> SBI Extensions in Runtime Section.
>
> There is an patch to add RISC-V details in the EBBR spec sent by Atish.
> That patch is not yet merged in the EBBR. The section on the
> "Startup Protocol" in this spec will refer to the requirements there
> and currently that link is marked as TBD.
>
> Corrected SBI Spec version
>
> Signed-off-by: Rahul Pathak <rpathak@...>
> ---
> riscv-platform-spec.adoc | 134 +++++++++++++++++++++++++++++++++++++--
> 1 file changed, 127 insertions(+), 7 deletions(-)
>
> diff --git a/riscv-platform-spec.adoc b/riscv-platform-spec.adoc
> index 160c74a..8827476 100644
> --- a/riscv-platform-spec.adoc
> +++ b/riscv-platform-spec.adoc
> @@ -34,6 +34,36 @@ include::profiles.adoc[]
> // Linux-2022 Platform
> == Linux-2022 Platform
>
> +=== Terminology
> +[cols="1,2", width=80%, align="left", options="header"]
> +|===
> +|TERM | DESCRIPTION
> +|SBI | Supervisor Binary Interface
> +|UEFI | Unified Extensible Firmware Interface
> +|ACPI | Advanced Configuration and Power Interface
> +|SMBIOS | System Management Basic I/O System
> +|DTS | Devicetree source file
> +|DTB | Devicetree binary
> +|RVA22 | RISC-V Application 2022
> +|EE | Execution Environment
> +|RV32GC | RISC-V 32-bit general purpose ISA described as RV32IMAFDC.
> +|RV64GC | RISC-V 64-bit general purpose ISA described as RV64IMAFDC.
> +|===
> +
> +=== Specifications
> +[cols="1,2", width=80%, align="left", options="header"]
> +|===
> +|SPECIFICATION | VERSION
> +|link:https://uefi.org/sites/default/files/resources/UEFI_Spec_2_9_2021_03_18.pdf[UEFI Specification] | v2.9
> +|link:https://github.com/devicetree-org/devicetree-specification/releases/tag/v0.3[Devicetree Specification] | v0.3
> +|link:https://github.com/riscv/riscv-sbi-doc/blob/master/riscv-sbi.adoc[SBI Specification] | v0.3-rc0
> +|link:[RVA22 Specification] | TBD
> +|link:https://arm-software.github.io/ebbr/[EBBR Specification] | v2.0.0-pre1
> +|link:https://uefi.org/sites/default/files/resources/ACPI_Spec_6_4_Jan22.pdf[ACPI Specification] | v6.4
> +|link:https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.4.0.pdf[SMBIOS Specification] | v3.4.0
> +|link:[Platform Policy] | TBD
> +|===
> +
> // Base feature set for Linux-2022 Platform
> === Base
> ==== Architecture
> @@ -59,14 +89,104 @@ include::profiles.adoc[]
> * Timers
> * Watchdog Timers
>
> -==== Boot Process
> -* Firmware
> -* Boot-Loader
> -* Discovery Mechanisms
> +==== Boot and Runtime Requirements
> +- The base specification defines the interface between the firmware and the
> +operating system suitable for the RISC-V platforms with rich operating
> +systems.
> +- These requirements specifies the required boot and runtime services, device
> +discovery mechanism, etc.
> +- The requirements are operating system agnostic, specific firmware/bootloader
> +implementation agnostic.
> +- Any RV32GC or RV64GC platform seeking compliance with the base specification
> +require to implement all three privilege modes i.e. M, S and U mode.
> +- For the generic mandatory requirements this base specification will refer to
> +the EBBR Specification. Any deviation from the EBBR will be explicitly
> +mentioned in the requirements.
> +- Specifications followed are mentioned in the
> +<<Specifications,Specification Section>>
> +
> +
> +===== Firmware
> +- UEFI Platform is required to adhere to RISC-V Platform requirements on
> +calling conventions, ABI support specific to RISC-V. Refer Chapter - 2.3.7
> +RISC-V Platforms of UEFI specification.
> +- For compliance with base specification platform is required to implement
> +link:https://arm-software.github.io/ebbr/#required-elements[EBBR - UEFI Required Elements],
> +link:https://arm-software.github.io/ebbr/#required-platform-specific-elements[EBBR - UEFI Platform Specific Elements]
> +and following
> +link:https://arm-software.github.io/ebbr/#required-global-variables[EBBR - Global Variables].
> +
> +====== Storage and Partitioning
> +- Firmware is required to implement requirements as per the
> +link:https://arm-software.github.io/ebbr/#firmware-storage[EBBR Firmware Storage].
> +requirements.
> +- For shared storage base spec requires GPT partitioning, MBR is deprecated.
"deprecated" implies is required but will be removed in next version.
Use instead:
"MBR support is not required."
> +
> +===== Boot Services
> +- All functions defined as boot services are required. Methods for
> +unsupported or unimplemented behavior must return an appropriate error
> +code.
> +
> +====== Startup Protocol
> +- UEFI firmware could be executed in either Machine mode or Supervisor mode
> +during the entire POST, according to the hart capability and the platform
> +design. For detailed requirements on startup protocol refer link:[**TBD** - EBBR LINK FOR STARTUP PROTOCOL]
> +and UEFI chapter 2.3.7 RISC-V Platforms.
> +
> +
> +====== Memory Map
> +- Base specification requires UEFI environment to provide a system memory map
> +as per the requirements link:https://arm-software.github.io/ebbr/#memory-map[EBBR - Memory Map].
> +
> +
> +===== Discovery Mechanisms
> +- Devicetree is the required mechanism for system description.
> +- System is required to implement link:https://arm-software.github.io/ebbr/#devicetree[EBBR - Devicetree requirements]
> +to comply with this base specification. Also refer Devicetree tables section in
> +chapter - 4.6 EFI Configuration Table & Properties Table of UEFI specification.
> +
> +===== Runtime Services
> +====== SBI
>
> -==== Runtime services
> -* SBI
> -* UEFI
> +- Required SBI spec version is 0.3 or higher.
> +- Legacy Extensions from the SBI Specification are deprecated.
Please, remove this sentence because we do not require to implement
this.
Best regards
Heinrich
> +- Required SBI extensions -
> +
> +[cols="1,2", width=80%, align="left", options="header"]
> +|===
> +|EXTENSION | CONDITIONS
> +|SBI TIME | if **stimecmp** CSR not available
> +|SBI IPI |
> +|SBI RFENCE |
> +|SBI HSM |
> +|SBI SRST |
> +|SBI PMU |
> +|===
> +
> +- Required responsibilities of M-Mode runtime also includes -
> + ** Interrupt and Exception Delegation
> + ** Misaligned Load & Stores handling
> + ** Missing CSRs emulation
> + ** PMP Configuration
> +
> +- Wherever applicable firmware must implement UEFI interfaces over similar
> +interfaces and services present in the SBI specification. For example, UEFI
> +runtime services must implement ResetSystem() via SBI Reset extension.
> +
> +====== UEFI
> +- Firmware must conform to the
> +link:https://arm-software.github.io/ebbr/#uefi-runtime-services[EBBR - UEFI EFI_RUNTIME_SERVICES requirements].
> +- Firmware must meet the requirements for
> +link:https://arm-software.github.io/ebbr/#runtime-device-mappings[EBBR - Runtime Device Mappings]
> +to avoid conflict between the firmware and OS when accessing the mapped
> +devices.
> +- Compliant UEFI runtime environment must meet the requirements for the
> +link:https://arm-software.github.io/ebbr/#runtime-variable-access[EBBR - Runtime Variable Access].
> +- Compliant implementation must meet the Realtime Clock requirements
> +link:https://arm-software.github.io/ebbr/#real-time-clock-rtc[EBBR - UEFI RTC interface]
> +if RTC is present in the system.
> +- OS should prioritize calling the UEFI interfaces before the SBI or Platform
> +specific mechanisms.
>
> // Server extension for Linux-2022 Platform
> === Server Extension
>