On Mon, 20 Nov 2017 12:28:56 PST (-0800), j.neuschaefer@xxxxxxx wrote:
On Mon, Nov 20, 2017 at 11:50:00AM -0800, Palmer Dabbelt wrote:
The RISC-V privileged ISA mandates the presence of an SBI, but there's
no reason not to put it in the device tree. This would allow us to
possibly remove the SBI later.
Thanks!
CC: Jonathan Neuschäfer <j.neuschaefer@xxxxxxx>
Signed-off-by: Palmer Dabbelt <palmer@xxxxxxxxxx>
---
.../devicetree/bindings/firmware/riscv.sbi.txt | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
create mode 100644 Documentation/devicetree/bindings/firmware/riscv.sbi.txt
diff --git a/Documentation/devicetree/bindings/firmware/riscv.sbi.txt b/Documentation/devicetree/bindings/firmware/riscv.sbi.txt
new file mode 100644
index 000000000000..42384d5d52cf
--- /dev/null
+++ b/Documentation/devicetree/bindings/firmware/riscv.sbi.txt
Nit: Other bindings use either a comma (as in the compatible string,
"riscv,sbi.txt") or a dash (vendor-product.txt, "riscv-sbi.txt") in the
file name.
That was just a typo, I'll fix it.
@@ -0,0 +1,20 @@
+RISC-V Supervisor Binary Interface (SBI)
+
+The RISC-V privileged ISA specification mandates the presence of a supervisor
+binary interface that performs some operations which might otherwise require
+particularly complicated instructions. This interface includes
+inter-processor interrupts, TLB flushes, i-cache and TLB shootdowns, a
+console, and power management.
+
+Required properties:
+- compatible: must contain one of the following
+ * "riscv,sbi" for the SBI defined by the privileged specification of the
+ system.
"of the system" seems to imply that different RISC-V systems (different
RISC-V implementations) can have different privileged specifications.
Actually, that was intentional -- I wrote it this way because different RISC-V
systems do have different privileged specifications. The RISC-V specifications
aren't frozen in time, they're just guaranteed to be compatible in the future.
For example, the user ISA document has been updated multiple times (the C spec,
eliminating some unspecified behavior) and will continue to be updated (V and
other extensions, the memory model). The privileged spec will be updated in a
compatible way just like the user spec will be -- I know there's at least
hypervisor support in the works, and I saw some things to remove undefined
behavior go past as well.
In a similar fashion, the ABI and SBI will continue to evolve. For example,
we'll probably add new system calls to extend the user ABI and new hyper calls
to extend the SBI.
I think it's better to refer to concrete documents, that don't depend on
the rest of the system, instead. Either:
* "riscv,sbi" for the SBI defined by the RISC-V Privileged ISA Specification.
Or something like:
* "sifive,sbi" for the SBI defined by SiFive document XYZ.
[ I know that there currently is no SBI spec, because the chapter has
been removed from the Priv Spec, but this can be fixed later, once
the final name of the document describing the SBI is clear. ]
Ya, well, that's just a bug :). There'll eventually be a spec, but I don't
think it changes the wording here.
+
+Example:
+
+firmware {
+ sbi {
+ compatible = "riscv,sbi";
+ };
+};
--
Thanks,
Jonathan Neuschäfer
--
You received this message because you are subscribed to the Google Groups "RISC-V Patches" group.
To unsubscribe from this group and stop receiving emails from it, send an email to patches+unsubscribe@xxxxxxxxxxxxxxxx.
To post to this group, send email to patches@xxxxxxxxxxxxxxxx.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/patches/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/patches/20171120202856.nptoirhm5luiamt7%40latitude.
For more options, visit https://groups.google.com/a/groups.riscv.org/d/optout.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html