[PATCH] Clarify that a SBI extension cannot be partially implemented


Bin Meng
 

Hi Atish,

On Tue, Jun 8, 2021 at 2:09 AM Atish Patra <Atish.Patra@...> wrote:

On Fri, 2021-06-04 at 19:05 +0000, Atish Patra wrote:
On Fri, 2021-06-04 at 20:48 +0800, Bin Meng wrote:
Hi Heinrich,

On Fri, Jun 4, 2021 at 8:13 PM Heinrich Schuchardt <
xypron.glpk@...> wrote:

a
On 6/4/21 11:57 AM, Bin Meng wrote:
Signed-off-by: Bin Meng <bmeng.cn@...>
---

riscv-sbi.adoc | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/riscv-sbi.adoc b/riscv-sbi.adoc
index 11c30c3..8696f97 100644
--- a/riscv-sbi.adoc
+++ b/riscv-sbi.adoc
@@ -34,6 +34,7 @@ https://creativecommons.org/licenses/by/4.0/.
* Improved SBI introduction secion
* Improved documentation of SBI hart state managment
extension
* Added suspend function to SBI hart state managment
extension
+* Clarified that a SBI extension cannot be partially
implemented

=== Version 0.2

@@ -51,6 +52,11 @@ abstraction for platform (or hypervisor)
specific functionality. The design
of the SBI follows the general RISC-V philosophy of having a
small core along
with a set of optional modular extensions.

+SBI extensions as whole are optional but if a SBI <abc>
extension compliant
%s/a SBI/an SBI/ (as you will pronounce SBI as as-bee-aye)
Sure. Will send a new patch to fix other places in the same file.


+with SBI v0.X spec is implemented then all functions of SBI
<abc> extension
+as defined in SBI v0.X are assumed to be present. Basically, a
SBI extension
Can we do away with all the placeholders?

How about:

"SBI extensions as whole are optional but they shall not be
partially
implemented: If sbi_probe_extension() signals that an extension
is
available, it must be implemented in total and conform to the SBI
version reported by sbi_get_spec_version()."
This one is more verbose but sounds better to me. May be we should
just
explicitly say that "all functions belonging to that extension must
be
implemented" similar to the below version.
Hi Bin,
Are you planning to send v2 for this patch or I can modify the text and
merge?
Okay, I will send v2.

Regards,
Bin


atishp@...
 

On Fri, 2021-06-04 at 19:05 +0000, Atish Patra wrote:
On Fri, 2021-06-04 at 20:48 +0800, Bin Meng wrote:
Hi Heinrich,

On Fri, Jun 4, 2021 at 8:13 PM Heinrich Schuchardt <   
xypron.glpk@...> wrote:

a
On 6/4/21 11:57 AM, Bin Meng wrote:
Signed-off-by: Bin Meng <bmeng.cn@...>
---

  riscv-sbi.adoc | 6 ++++++
  1 file changed, 6 insertions(+)

diff --git a/riscv-sbi.adoc b/riscv-sbi.adoc
index 11c30c3..8696f97 100644
--- a/riscv-sbi.adoc
+++ b/riscv-sbi.adoc
@@ -34,6 +34,7 @@ https://creativecommons.org/licenses/by/4.0/.
  * Improved SBI introduction secion
  * Improved documentation of SBI hart state managment
extension
  * Added suspend function to SBI hart state managment
extension
+* Clarified that a SBI extension cannot be partially
implemented

  === Version 0.2

@@ -51,6 +52,11 @@ abstraction for platform (or hypervisor)
specific functionality. The design
  of the SBI follows the general RISC-V philosophy of having a
small core along
  with a set of optional modular extensions.

+SBI extensions as whole are optional but if a SBI <abc>
extension compliant
%s/a SBI/an SBI/ (as you will pronounce SBI as as-bee-aye)
Sure. Will send a new patch to fix other places in the same file.


+with SBI v0.X spec is implemented then all functions of SBI
<abc> extension
+as defined in SBI v0.X are assumed to be present. Basically, a
SBI extension
Can we do away with all the placeholders?

How about:

"SBI extensions as whole are optional but they shall not be
partially
implemented: If sbi_probe_extension() signals that an extension
is
available, it must be implemented in total and conform to the SBI
version reported by sbi_get_spec_version()."
This one is more verbose but sounds better to me. May be we should
just
explicitly say that "all functions belonging to that extension must
be
implemented" similar to the below version.
Hi Bin,
Are you planning to send v2 for this patch or I can modify the text and
merge?


How about:

If sbi_probe_extension() signals that an extension is available,
all
functions that conform to the SBI version reported by
sbi_get_spec_version() must be implemented.

Regards,
Bin




--
Regards,
Atish




--
Regards,
Atish


atishp@...
 

On Fri, 2021-06-04 at 20:48 +0800, Bin Meng wrote:
Hi Heinrich,

On Fri, Jun 4, 2021 at 8:13 PM Heinrich Schuchardt <
xypron.glpk@...> wrote:

a
On 6/4/21 11:57 AM, Bin Meng wrote:
Signed-off-by: Bin Meng <bmeng.cn@...>
---

  riscv-sbi.adoc | 6 ++++++
  1 file changed, 6 insertions(+)

diff --git a/riscv-sbi.adoc b/riscv-sbi.adoc
index 11c30c3..8696f97 100644
--- a/riscv-sbi.adoc
+++ b/riscv-sbi.adoc
@@ -34,6 +34,7 @@ https://creativecommons.org/licenses/by/4.0/.
  * Improved SBI introduction secion
  * Improved documentation of SBI hart state managment extension
  * Added suspend function to SBI hart state managment extension
+* Clarified that a SBI extension cannot be partially implemented

  === Version 0.2

@@ -51,6 +52,11 @@ abstraction for platform (or hypervisor)
specific functionality. The design
  of the SBI follows the general RISC-V philosophy of having a
small core along
  with a set of optional modular extensions.

+SBI extensions as whole are optional but if a SBI <abc>
extension compliant
%s/a SBI/an SBI/ (as you will pronounce SBI as as-bee-aye)
Sure. Will send a new patch to fix other places in the same file.


+with SBI v0.X spec is implemented then all functions of SBI
<abc> extension
+as defined in SBI v0.X are assumed to be present. Basically, a
SBI extension
Can we do away with all the placeholders?

How about:

"SBI extensions as whole are optional but they shall not be
partially
implemented: If sbi_probe_extension() signals that an extension is
available, it must be implemented in total and conform to the SBI
version reported by sbi_get_spec_version()."
This one is more verbose but sounds better to me. May be we should just
explicitly say that "all functions belonging to that extension must be
implemented" similar to the below version.

How about:

If sbi_probe_extension() signals that an extension is available, all
functions that conform to the SBI version reported by
sbi_get_spec_version() must be implemented.

Regards,
Bin




--
Regards,
Atish


Bin Meng
 

Hi Heinrich,

On Fri, Jun 4, 2021 at 8:13 PM Heinrich Schuchardt <xypron.glpk@...> wrote:

a
On 6/4/21 11:57 AM, Bin Meng wrote:
Signed-off-by: Bin Meng <bmeng.cn@...>
---

riscv-sbi.adoc | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/riscv-sbi.adoc b/riscv-sbi.adoc
index 11c30c3..8696f97 100644
--- a/riscv-sbi.adoc
+++ b/riscv-sbi.adoc
@@ -34,6 +34,7 @@ https://creativecommons.org/licenses/by/4.0/.
* Improved SBI introduction secion
* Improved documentation of SBI hart state managment extension
* Added suspend function to SBI hart state managment extension
+* Clarified that a SBI extension cannot be partially implemented

=== Version 0.2

@@ -51,6 +52,11 @@ abstraction for platform (or hypervisor) specific functionality. The design
of the SBI follows the general RISC-V philosophy of having a small core along
with a set of optional modular extensions.

+SBI extensions as whole are optional but if a SBI <abc> extension compliant
%s/a SBI/an SBI/ (as you will pronounce SBI as as-bee-aye)
Sure. Will send a new patch to fix other places in the same file.


+with SBI v0.X spec is implemented then all functions of SBI <abc> extension
+as defined in SBI v0.X are assumed to be present. Basically, a SBI extension
Can we do away with all the placeholders?

How about:

"SBI extensions as whole are optional but they shall not be partially
implemented: If sbi_probe_extension() signals that an extension is
available, it must be implemented in total and conform to the SBI
version reported by sbi_get_spec_version()."
How about:

If sbi_probe_extension() signals that an extension is available, all
functions that conform to the SBI version reported by
sbi_get_spec_version() must be implemented.

Regards,
Bin


Heinrich Schuchardt
 

a
On 6/4/21 11:57 AM, Bin Meng wrote:
Signed-off-by: Bin Meng <bmeng.cn@...>
---

riscv-sbi.adoc | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/riscv-sbi.adoc b/riscv-sbi.adoc
index 11c30c3..8696f97 100644
--- a/riscv-sbi.adoc
+++ b/riscv-sbi.adoc
@@ -34,6 +34,7 @@ https://creativecommons.org/licenses/by/4.0/.
* Improved SBI introduction secion
* Improved documentation of SBI hart state managment extension
* Added suspend function to SBI hart state managment extension
+* Clarified that a SBI extension cannot be partially implemented

=== Version 0.2

@@ -51,6 +52,11 @@ abstraction for platform (or hypervisor) specific functionality. The design
of the SBI follows the general RISC-V philosophy of having a small core along
with a set of optional modular extensions.

+SBI extensions as whole are optional but if a SBI <abc> extension compliant
%s/a SBI/an SBI/ (as you will pronounce SBI as as-bee-aye)

+with SBI v0.X spec is implemented then all functions of SBI <abc> extension
+as defined in SBI v0.X are assumed to be present. Basically, a SBI extension
Can we do away with all the placeholders?

How about:

"SBI extensions as whole are optional but they shall not be partially
implemented: If sbi_probe_extension() signals that an extension is
available, it must be implemented in total and conform to the SBI
version reported by sbi_get_spec_version()."

Best regards

Heinrich

+cannot be partially implemented.
+
The higher privilege software providing SBI interface to the supervisor-mode
software is referred to as a SBI implemenation or Supervisor Execution
Environment (SEE). A SBI implementation (or SEE) can be platform runtime


Bin Meng
 

Signed-off-by: Bin Meng <bmeng.cn@...>
---

riscv-sbi.adoc | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/riscv-sbi.adoc b/riscv-sbi.adoc
index 11c30c3..8696f97 100644
--- a/riscv-sbi.adoc
+++ b/riscv-sbi.adoc
@@ -34,6 +34,7 @@ https://creativecommons.org/licenses/by/4.0/.
* Improved SBI introduction secion
* Improved documentation of SBI hart state managment extension
* Added suspend function to SBI hart state managment extension
+* Clarified that a SBI extension cannot be partially implemented

=== Version 0.2

@@ -51,6 +52,11 @@ abstraction for platform (or hypervisor) specific functionality. The design
of the SBI follows the general RISC-V philosophy of having a small core along
with a set of optional modular extensions.

+SBI extensions as whole are optional but if a SBI <abc> extension compliant
+with SBI v0.X spec is implemented then all functions of SBI <abc> extension
+as defined in SBI v0.X are assumed to be present. Basically, a SBI extension
+cannot be partially implemented.
+
The higher privilege software providing SBI interface to the supervisor-mode
software is referred to as a SBI implemenation or Supervisor Execution
Environment (SEE). A SBI implementation (or SEE) can be platform runtime
--
2.25.1