Skip to content

Commit b07c77b

Browse files
committed
Follow openkal 0.8, and record why the five new interfaces are absent
This machine provides none of them, and each absence has a reason rather than being an omission: no network for net and datagram, no memory management unit to copy an address space with for space, no second execution context to bound a wait against for timeout, and a console whose settings the firmware does not expose for terminal. Clause 6.1 makes an interface an implementation does not provide absent at the link, so a program requiring one is refused when it is built rather than when it runs. The README states this beside the reasons already recorded for fs, process and task, so that a reader asking why finds the answer where the other answers are.
1 parent 741a9ad commit b07c77b

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,19 @@ scheduler, and clause 6.2 says the remedy for an operation that cannot be
3131
provided is that its absence be expressed by its absence rather than by a
3232
run-time refusal.
3333

34+
The five interfaces version 0.8 adds are absent for the same reason and by the
35+
same rule. This machine has no network, so `net` and `datagram` are not provided.
36+
It has no memory management unit to copy an address space with, so `space` is
37+
not. It has no second execution context to bound a wait against, so `timeout` is
38+
not: an operation here either completes or does not, and a bound upon it would
39+
report an expiry that could never occur. `terminal` is absent because the console
40+
is a serial line whose settings this firmware does not expose; a stream is
41+
reported as interactive and nothing acts upon that fact.
42+
43+
None of the five is a deviation. Clause 6.1 makes an interface an implementation
44+
does not provide absent at the link, so a program requiring one is refused when
45+
it is built rather than when it runs.
46+
3447
⚠️ **`time` used to be on that list, with a reason, and the reason was wrong.**
3548

3649
It read: SBI can arm a timer interrupt, which is a mechanism for a kernel rather

mcpp.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
[package]
1515
namespace = "mcpplibs"
1616
name = "openkal-opensbi"
17-
version = "0.1.5"
17+
version = "0.2.0"
1818
description = "An implementation of openkal on the RISC-V Supervisor Binary Interface, portable across every machine whose firmware provides one"
1919
license = "Apache-2.0"
2020

@@ -33,7 +33,7 @@ repo = "https://github.com/mcpplibs/openkal-opensbi"
3333
# The contract, not an implementation of it. Declaring it turns a version
3434
# mismatch into a resolution-time message rather than a link-time one.
3535
[dependencies]
36-
openkal = "0.7.0"
36+
openkal = { git = "https://github.com/mcpplibs/openkal", branch = "feat/openkal-0.8" }
3737

3838
# ⭐ WHAT RECEIVES CONTROL, WHICH IS A STATEMENT ABOUT THE PROGRAM.
3939
#

0 commit comments

Comments
 (0)