Repository navigation
0.30.2: __riscv_flush_icache on riscv64 Linux - #103
Merged
Merged
Conversation
The compiler makes the call for __builtin___clear_cache on riscv64 Linux, and the C library defines it there; musl's own (src/linux/cache.c) is excluded for its vDSO use, so a program that performs the maintenance itself, as the specification's conformance suite does, did not link (openkal-platform 0.32.1, riscv64-linux-musl). port/src/okm_cache.c supplies it: instructions run only from memory openkal.exec published, and the implementation performs the maintenance at publication, so the call answers success.
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.
On riscv64 Linux the compiler lowers
__builtin___clear_cacheto a call to__riscv_flush_icache, which the C library defines. musl's own definition (src/linux/cache.c) is excluded for its vDSO use, so a program that performs the maintenance itself did not link: the specification's conformance suite failed withundefined symbol: __riscv_flush_icacheonriscv64-linux-musl(openkal-platform 0.32.1 CI, mcpplibs/openkal-platform#44).port/src/okm_cache.csupplies__riscv_flush_icacheand its public nameriscv_flush_icacheon riscv64 Linux. Above openkal, instructions run only from memory openkal.exec published (okm_map.crefusesPROT_EXEC), and the implementation performs the maintenance at publication where the environment offers it (openkal-linux 0.27.1 calls the kernel'sriscv_flush_icache), so the call answers success. Other targets compile the file to nothing.