0.6.0 — the board's openkal implementation adopts 0.9.0, and is now exercised - #2
Merged
Conversation
…xercised The pin was openkal 0.5.2, four minors behind. Adopting 0.9.0 changes three things in src/kal/kal.cpp: - Transfers are one signed word. `kal_stream_write` and `kal_stream_read` returned `kal_io_result`, a pair of a count and a condition, which 0.9 withdrew: the pair was two machine words where one carries the whole answer, and every caller in the ecosystem was collapsing it by hand at the call site. A partial write that then fails now reports the COUNT and not the condition — the bytes reached the device, and a caller told `kal_err_io` would send them twice. - `kal_memory_granularity` is new and answers 1. This machine has no memory management unit and this implementation imposes no rounding of its own, so every address and every length is acceptable, which the specification spells that way.⚠️ It is not a page size, and the comment says so: openkal-musl 0.7.0 took a granularity of one from another such implementation and assigned it to `libc.page_size`, whose allocator then asked for one-byte extents. - `kal_version` and `kal_interfaces` are exported. They belong to no interface and every conforming implementation has them, so that a consumer with no linker to ask can ask before it calls. This one claims exactly abort, stream and memory. ## And the part that was not a bump⚠️ NOTHING CALLED ANY OF IT. `tests/console.cpp` calls `board::*` and nothing else. The feature compiles `src/kal/**` and the linker takes all fourteen names into the test binary, so `nm` shows them and the suite is green — which proves the implementation compiles and links and says nothing about what it answers. A wrong result in any of the three changes above would have linked and shown green just the same. `tests/openkal.cpp` asks. Nine observations, every one of something 0.9 introduced or changed, on both ISA profiles. Measured that they bite: with the granularity returning 4096 and `kal_interfaces` claiming an interface this board does not export, two of them fail and name themselves.⚠️ It does not go quiet when the feature is off — it prints that it did not observe anything and returns 0, and the workflow greps for the line that only appears when it DID. A case whose "not run" and whose "passed" read the same is not a case. Both widths assert it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The pin was openkal 0.5.2, four minors behind. Adopting 0.9.0 changes three
things in src/kal/kal.cpp:
kal_stream_writeandkal_stream_readreturned
kal_io_result, a pair of a count and a condition, which 0.9withdrew: the pair was two machine words where one carries the whole answer,
and every caller in the ecosystem was collapsing it by hand at the call site.
A partial write that then fails now reports the COUNT and not the condition —
the bytes reached the device, and a caller told
kal_err_iowould send themtwice.
kal_memory_granularityis new and answers 1. This machine has no memorymanagement unit and this implementation imposes no rounding of its own, so
every address and every length is acceptable, which the specification spells
that way.
0.7.0 took a granularity of one from another such implementation and assigned
it to
libc.page_size, whose allocator then asked for one-byte extents.kal_versionandkal_interfacesare exported. They belong to no interfaceand every conforming implementation has them, so that a consumer with no
linker to ask can ask before it calls. This one claims exactly abort, stream
and memory.
And the part that was not a bump
tests/console.cppcallsboard::*and nothingelse. The feature compiles
src/kal/**and the linker takes all fourteen namesinto the test binary, so
nmshows them and the suite is green — which provesthe implementation compiles and links and says nothing about what it answers. A
wrong result in any of the three changes above would have linked and shown green
just the same.
tests/openkal.cppasks. Nine observations, every one of something 0.9introduced or changed, on both ISA profiles. Measured that they bite: with the
granularity returning 4096 and
kal_interfacesclaiming an interface this boarddoes not export, two of them fail and name themselves.
observe anything and returns 0, and the workflow greps for the line that only
appears when it DID. A case whose "not run" and whose "passed" read the same is
not a case. Both widths assert it.