From 8836db872ac00ccfa9b5155b34ffb81d5cd94497 Mon Sep 17 00:00:00 2001 From: Sunrisepeak Date: Mon, 23 Nov 2026 22:03:51 +0900 Subject: [PATCH 1/3] 0.32.1: openkal-linux 0.27.1, riscv64-linux-musl in the hosted arrangement, run under qemu-user --- .github/workflows/ci.yml | 49 ++++++++++++++++++++++++++++++++++++++++ README.md | 11 ++++++++- mcpp.toml | 24 ++++++++++++++++---- 3 files changed, 79 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 90dd66b..1d16f05 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,8 @@ name: CI # host-graph a build program is compiled as an ok image and run by okrun # i686 Linux's thirty-two bit row: the hosted program and the # specification's conformance suite, run on Linux x86_64 +# riscv64 Linux's riscv64 row: the hosted program and the specification's +# conformance suite, built on Linux x86_64 and run under qemu-user # i686-openkal the ok image of i386, run by okrun built for i686-linux-musl # dos a DOS program, and the i386 image carried as one (technical # experiment only), run under DOSBox Staging through dirun @@ -305,6 +307,53 @@ jobs: grep -qE '^observations: [0-9]+ held, 0 did not hold' conformance.log \ || { echo "::error::an observation did not hold on i686-linux-musl"; exit 1; } + # Linux's riscv64 row (0.32.1): openkal-linux's riscv64 layer beneath the + # family, built here and run under qemu's user-mode translator --- the hosted + # program through the row's runner, and the specification's conformance suite, + # whose programs start one another, through the kernel's registration of the + # translator for riscv64 executables. + riscv64: + needs: resolves + name: riscv64-linux-musl (built on Linux x86_64, run under qemu-user) + runs-on: ubuntu-24.04 + timeout-minutes: 90 + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v4 + + - uses: mcpp-community/setup-mcpp@v1 + with: + version: ${{ env.MCPP_VERSION }} + xlings-version: ${{ env.XLINGS_VERSION }} + + - name: The hosted program, through the row's runner + working-directory: checks/hosted + run: | + mcpp run --target riscv64-linux-musl -- one two | tee run.log + grep -q "hosted ok: hosted" run.log || { echo "::error::the hosted program's output"; exit 1; } + grep -q "hosted args: 3 two" run.log || { echo "::error::the hosted program's arguments"; exit 1; } + p=$(find target/riscv64-linux-musl -path '*bin/hosted' -type f | head -1) + file "$p" + file "$p" | grep -q 'ELF 64-bit' && file "$p" | grep -q 'RISC-V' && file "$p" | grep -q 'statically linked' \ + || { echo "::error::riscv64-linux-musl is not a static riscv64 program"; exit 1; } + + - name: The specification's conformance suite + run: | + set -euo pipefail + sudo apt-get install -y -qq qemu-user-static > /dev/null + [ -e /proc/sys/fs/binfmt_misc/qemu-riscv64 ] \ + || { echo "::error::the translator is not registered for riscv64 executables"; exit 1; } + spec=$(sed -n 's/^openkal *= *"\(.*\)"/\1/p' mcpp.toml | head -1) + impl=$(sed -n 's/^openkal-linux *= *"\(.*\)"/\1/p' mcpp.toml | head -1) + git clone --quiet --depth 1 --branch "$spec" https://github.com/mcpplibs/openkal.git .spec + git clone --quiet --depth 1 --branch "$impl" https://github.com/mcpplibs/openkal-linux.git .impl + bash .spec/tools/run-conformance.sh openkal-linux .impl full,optional \ + --target riscv64-linux-musl --platform "path:$GITHUB_WORKSPACE" | tee conformance.log + grep -qE '^observations: [0-9]+ held, 0 did not hold' conformance.log \ + || { echo "::error::an observation did not hold on riscv64-linux-musl"; exit 1; } + uefi: needs: resolves name: x86_64-uefi (built on Linux x86_64, run under OVMF) diff --git a/README.md b/README.md index 56ff6a5..2a0ed95 100644 --- a/README.md +++ b/README.md @@ -178,6 +178,15 @@ status 3. A row is added for a machine with no operating system above RISC-V SBI firmware, `riscv64-none-musl` (below), with openkal-opensbi 0.10.1 joining the group. It holds 0.31.3's member, openkal-image 0.7.3. +Platform 0.32.1 is a patch of the group with openkal-linux 0.27.1, which adds +riscv64 and reads a frame chain where `process_vm_readv` is absent. It adds the +row `riscv64-linux-musl` to the hosted arrangement: openkal-musl 0.30.1 over +openkal-linux's riscv64 system-call layer, with openkal-llvm-runtime 0.21.0 above +it. A provider entry states the row's runner, qemu's user-mode translator +(`xim:qemu-user-riscv64`) on Linux x86_64, which runs without being enabled. CI +builds and runs a hosted program there and the specification's conformance suite +through the platform. + Platform 0.31.3 is a patch of the group with one member. openkal-image 0.7.3: okrun's command line is a function of the runner (`okrun_main`), and the carrier, as a package's runner, is that function, so it names itself the @@ -550,7 +559,7 @@ previous patch's. |---|---| | `mcpp test` | the test image runs on the machine's architecture; the other architecture is built | | `checks/image` | a project without declarations builds, runs and packs (M2 and M3) | -| `checks/hosted` | the hosted arrangement runs on Linux, macOS and Windows | +| `checks/hosted` | the hosted arrangement runs on Linux, macOS and Windows; on Linux x86_64 also as `i686-linux-musl` and, under qemu-user, `riscv64-linux-musl`, each with the specification's conformance suite | | `checks/host-graph` | a build program runs as an ok image | | `checks/snapshot` | a C++ program starts from a snapshot of its initialisers, and a start whose named value differs does not | | `checks/i386` | an ok image of i386 is built in both modes, checked by okld and run by okrun built for i686-linux-musl; packed with `--systems dos-i686`, it runs as a DOS program | diff --git a/mcpp.toml b/mcpp.toml index f0bdde4..a43293a 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -12,7 +12,7 @@ [package] namespace = "mcpplibs" name = "openkal-platform" -version = "0.32.0" +version = "0.32.1" description = "The platform of ok images (-openkal): their toolchain, C library and C++ run-time, tools, compile and link conventions, seal, runner and carrier, as one versioned statement mcpp reads." license = "Apache-2.0" authors = ["mcpplibs"] @@ -214,9 +214,11 @@ seal = [["okld", "note", "{}"], ["okld", "place", "{}"], ["okld", "check", "{} # `-freebsd-musl` are the system with no C library of its own beneath. # `i686-linux-musl` (0.28.0) is the thirty-two bit row of Linux (openkal 0.25.1, # clause 5.5): openkal-linux's i386 system-call layer beneath openkal-musl's. +# `riscv64-linux-musl` (0.32.1): openkal-linux 0.27.1's riscv64 layer beneath +# openkal-musl's, run under qemu's user-mode translator (the provider below). targets = ["x86_64-linux-gnu", "aarch64-linux-gnu", "x86_64-linux-musl", "aarch64-linux-musl", "x86_64-macos", "aarch64-macos", "x86_64-windows-gnu", "x86_64-windows-musl", - "x86_64-freebsd-musl", "aarch64-freebsd-musl", "i686-linux-musl"] + "x86_64-freebsd-musl", "aarch64-freebsd-musl", "i686-linux-musl", "riscv64-linux-musl"] toolchain = "llvm@23.1.3" [platform.hosted.layers] @@ -261,6 +263,19 @@ toolchain = "llvm@23.1.3" layers = { compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.1", default-features = false, features = ["posix", "malloc-mimalloc"] } } runner = { cmd = ["wine", "{}"], host = "same-arch", hosts = ["linux-x86_64"], requires = ["xim:wine@11.0"], enabled = false } +# A riscv64 Linux program runs on an x86_64 Linux machine under qemu's user-mode +# translator (0.32.1), the runner mcpp's own row of the musl cross payload states +# (design 2026-11-22 ยง3.19). It makes nothing outside the program's own files, so +# it runs without being enabled. +[[platform.provider]] +name = "qemu-user" +serves = ["riscv64-linux-musl"] +hosted = true +base = "none" +toolchain = "llvm@23.1.3" +layers = { compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.1", default-features = false, features = ["posix", "malloc-mimalloc"] } } +runner = { cmd = ["qemu-riscv64-static", "{}"], host = "any", hosts = ["linux-x86_64"], requires = ["xim:qemu-user-riscv64@7.2.0"] } + # The runners require dirun 0.5.0 and ovmf 9.2.4-3 (0.29.0): ovmf's profile states the UEFI # Shell's quoting (`[payload] quote = "uefi-shell"'), so an argument with a blank reaches # the application whole. @@ -521,14 +536,15 @@ runner = { cmd = ["unshare", "-Ur", "{pkg:ibcs-us}/bin/ibcs-us", "{}"], hosts = # StartImage, openkal-dos and openkal-dos-tools 0.3.0 through EXEC, each a # started program run to its end first, openkal clause 7.19), openkal-musl 0.30.1 # naming them, and openkal-windows 0.23.1 (a program without memory for its -# arguments ends with the reason). From 0.24.1 the members name +# arguments ends with the reason); 0.32.1, openkal-linux 0.27.1 (riscv64, and a +# frame chain read without `process_vm_readv') and `riscv64-linux-musl' served. From 0.24.1 the members name # one another by compatible ranges (`^0.28.0`) and this group chooses the # versions: mcpp 2026.11.7.1 resolves within it, and a fix of one member is that # member's release and a patch of this group, released together through one # index change (tools/family_release.py, .github/workflows/family-release.yml). [platform.versions] openkal = "0.26.0" -openkal-linux = "0.27.0" +openkal-linux = "0.27.1" openkal-macos = "0.24.1" openkal-windows = "0.23.1" openkal-freebsd = "0.2.0" From 47270deabbb6fe07466973873d029b53f289355c Mon Sep 17 00:00:00 2001 From: Sunrisepeak Date: Mon, 23 Nov 2026 23:10:06 +0900 Subject: [PATCH 2/3] openkal-musl 0.30.2 in the group: __riscv_flush_icache on riscv64 Linux --- README.md | 6 ++++-- mcpp.toml | 25 +++++++++++++------------ 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 2a0ed95..f8ad1aa 100644 --- a/README.md +++ b/README.md @@ -180,9 +180,11 @@ group. It holds 0.31.3's member, openkal-image 0.7.3. Platform 0.32.1 is a patch of the group with openkal-linux 0.27.1, which adds riscv64 and reads a frame chain where `process_vm_readv` is absent. It adds the -row `riscv64-linux-musl` to the hosted arrangement: openkal-musl 0.30.1 over +row `riscv64-linux-musl` to the hosted arrangement: openkal-musl 0.30.2 over openkal-linux's riscv64 system-call layer, with openkal-llvm-runtime 0.21.0 above -it. A provider entry states the row's runner, qemu's user-mode translator +it. openkal-musl 0.30.2 defines `__riscv_flush_icache`, the call the compiler makes +for `__builtin___clear_cache` on riscv64 Linux; the conformance suite, which +performs that maintenance itself, did not link without it. A provider entry states the row's runner, qemu's user-mode translator (`xim:qemu-user-riscv64`) on Linux x86_64, which runs without being enabled. CI builds and runs a hosted program there and the specification's conformance suite through the platform. diff --git a/mcpp.toml b/mcpp.toml index a43293a..f03ade4 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -73,7 +73,7 @@ debuggee = ["okrun", "--debugger", "{}"] [platform.layers] compiler-runtime = "openkal-llvm-runtime@0.21.0" "c++-abi" = "openkal-llvm-runtime@0.21.0" -c-abi = { name = "openkal-musl", version = "0.30.1", default-features = false, features = ["posix", "malloc-mimalloc"] } +c-abi = { name = "openkal-musl", version = "0.30.2", default-features = false, features = ["posix", "malloc-mimalloc"] } # Built for the building machine: `okld` writes and checks the notes, `okrun` # runs an image, `okprof` reads what a measured run recorded (0.23.0: the @@ -224,7 +224,7 @@ toolchain = "llvm@23.1.3" [platform.hosted.layers] compiler-runtime = "openkal-llvm-runtime@0.21.0" "c++-abi" = "openkal-llvm-runtime@0.21.0" -c-abi = { name = "openkal-musl", version = "0.30.1", default-features = false, features = ["posix", "malloc-mimalloc"] } +c-abi = { name = "openkal-musl", version = "0.30.2", default-features = false, features = ["posix", "malloc-mimalloc"] } # THE HOSTED ROWS' RUNNERS ON ANOTHER SYSTEM (0.29.0; mcpp 2026.11.16.1 reads a # runner's `enabled`). A FreeBSD program runs in the FreeBSD virtual machine of @@ -242,7 +242,7 @@ serves = ["x86_64-freebsd-musl"] hosted = true base = "none" toolchain = "llvm@23.1.3" -layers = { compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.1", default-features = false, features = ["posix", "malloc-mimalloc"] } } +layers = { compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.2", default-features = false, features = ["posix", "malloc-mimalloc"] } } runner = { cmd = ["dirun", "--profile", "{pkg:freebsd-disk-image}/dirun.toml", "--emulator", "{pkg:qemu-x86}/bin/qemu-system-x86_64", "--", "{}"], host = "any", hosts = ["linux-x86_64"], requires = ["xim:dirun@0.6.0", "xim:freebsd-disk-image@14.5-1", "xim:qemu-x86@9.2.4-1"], enabled = false } [[platform.provider]] @@ -251,7 +251,7 @@ serves = ["aarch64-freebsd-musl"] hosted = true base = "none" toolchain = "llvm@23.1.3" -layers = { compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.1", default-features = false, features = ["posix", "malloc-mimalloc"] } } +layers = { compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.2", default-features = false, features = ["posix", "malloc-mimalloc"] } } runner = { cmd = ["dirun", "--profile", "{pkg:aarch64-freebsd-disk-image}/dirun.toml", "--var", "firmware={pkg:ovmf}/share/edk2/edk2-aarch64-code.fd", "--emulator", "{pkg:qemu-system}/bin/qemu-system-aarch64", "--", "{}"], host = "any", hosts = ["linux-x86_64"], requires = ["xim:dirun@0.6.0", "xim:aarch64-freebsd-disk-image@14.5-1", "xim:ovmf@9.2.4-4", "xim:qemu-system@9.2.4"], enabled = false } [[platform.provider]] @@ -260,7 +260,7 @@ serves = ["x86_64-windows-musl"] hosted = true base = "none" toolchain = "llvm@23.1.3" -layers = { compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.1", default-features = false, features = ["posix", "malloc-mimalloc"] } } +layers = { compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.2", default-features = false, features = ["posix", "malloc-mimalloc"] } } runner = { cmd = ["wine", "{}"], host = "same-arch", hosts = ["linux-x86_64"], requires = ["xim:wine@11.0"], enabled = false } # A riscv64 Linux program runs on an x86_64 Linux machine under qemu's user-mode @@ -273,7 +273,7 @@ serves = ["riscv64-linux-musl"] hosted = true base = "none" toolchain = "llvm@23.1.3" -layers = { compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.1", default-features = false, features = ["posix", "malloc-mimalloc"] } } +layers = { compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.2", default-features = false, features = ["posix", "malloc-mimalloc"] } } runner = { cmd = ["qemu-riscv64-static", "{}"], host = "any", hosts = ["linux-x86_64"], requires = ["xim:qemu-user-riscv64@7.2.0"] } # The runners require dirun 0.5.0 and ovmf 9.2.4-3 (0.29.0): ovmf's profile states the UEFI @@ -308,7 +308,7 @@ serves = ["x86_64-uefi"] base = "none" hosted = true -layers = { compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.1", default-features = false, features = ["posix", "malloc-mimalloc"] } } +layers = { compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.2", default-features = false, features = ["posix", "malloc-mimalloc"] } } link = { driver = "lld", start = "efi_main", flags = ["--subsystem", "efi_application", "--gc-sections"], exe = "{name}.efi", inputs = [{ file = "board/qemu-exit.S" }], seal = [] } runner = { cmd = ["dirun", "--payload", "{}", "--profile", "{pkg:ovmf}/dirun.toml", "--emulator", "{pkg:qemu-x86}/bin/qemu-system-x86_64", "--memory", "2048", "--"], hosts = ["linux-x86_64", "linux-aarch64", "macos-aarch64", "windows-x86_64"], requires = ["xim:dirun@0.6.0", "xim:qemu-x86@9.2.4-1", "xim:ovmf@9.2.4-4"], enabled = false } @@ -347,7 +347,7 @@ serves = ["i686-dos-musl"] base = "none" hosted = true -layers = { compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.1", default-features = false, features = ["posix", "malloc-mallocng"] } } +layers = { compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.2", default-features = false, features = ["posix", "malloc-mallocng"] } } link = { driver = "lld", start = "okdos_entry", flags = ["-static", "--image-base=0x1000", "-z", "norelro", "-z", "stack-size=1048576", "--gc-sections", "--eh-frame-hdr"], seal = [["okdos", "seal", "{}"]] } runner = { cmd = ["dirun", "--payload", "{}", "--profile", "{pkg:dosbox-staging}/dirun.toml", "--"], hosts = ["linux-x86_64", "macos-aarch64", "windows-x86_64"], requires = ["xim:dirun@0.6.0", "xim:dosbox-staging@0.83.0-2"], enabled = false } @@ -385,7 +385,7 @@ serves = ["riscv64-none-musl"] base = "none" hosted = true -layers = { "kernel-abi" = { name = "openkal-opensbi", version = "0.10.1", features = ["standalone"] }, compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.1", default-features = false, features = ["posix", "malloc-mallocng"] } } +layers = { "kernel-abi" = { name = "openkal-opensbi", version = "0.10.1", features = ["standalone"] }, compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.2", default-features = false, features = ["posix", "malloc-mallocng"] } } runner = { cmd = ["{pkg:qemu-riscv}/bin/qemu-system-riscv64", "-machine", "virt", "-nographic", "-no-reboot", "-bios", "default", "-kernel", "{}"], hosts = ["linux-x86_64", "linux-aarch64", "macos-aarch64", "windows-x86_64"], requires = ["xim:qemu-riscv@9.2.4-1"], enabled = false } # UNIX SYSTEM V RELEASE 4 AND ITS DESCENDANTS ON i386 (0.30.0): programs of the @@ -442,7 +442,7 @@ serves = ["i686-svr4-musl"] base = "none" hosted = true -layers = { "kernel-abi" = { name = "openkal-svr4", version = "0.3.0", features = ["standalone"] }, compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.1", default-features = false, features = ["posix", "malloc-mallocng"] } } +layers = { "kernel-abi" = { name = "openkal-svr4", version = "0.3.0", features = ["standalone"] }, compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.2", default-features = false, features = ["posix", "malloc-mallocng"] } } link = { driver = "lld", script = "link/svr4.ld", flags = ["-static", "-z", "norelro", "--gc-sections", "--eh-frame-hdr"] } runner = { cmd = ["unshare", "-Ur", "{pkg:ibcs-us}/bin/ibcs-us", "{}"], hosts = ["linux-x86_64"], requires = ["xim:ibcs-us@4.3-2"], enabled = false } @@ -537,7 +537,8 @@ runner = { cmd = ["unshare", "-Ur", "{pkg:ibcs-us}/bin/ibcs-us", "{}"], hosts = # started program run to its end first, openkal clause 7.19), openkal-musl 0.30.1 # naming them, and openkal-windows 0.23.1 (a program without memory for its # arguments ends with the reason); 0.32.1, openkal-linux 0.27.1 (riscv64, and a -# frame chain read without `process_vm_readv') and `riscv64-linux-musl' served. From 0.24.1 the members name +# frame chain read without `process_vm_readv') and openkal-musl 0.30.2 +# (`__riscv_flush_icache'), with `riscv64-linux-musl' served. From 0.24.1 the members name # one another by compatible ranges (`^0.28.0`) and this group chooses the # versions: mcpp 2026.11.7.1 resolves within it, and a fix of one member is that # member's release and a patch of this group, released together through one @@ -553,7 +554,7 @@ openkal-dos = "0.3.0" openkal-dos-tools = "0.3.0" openkal-svr4 = "0.3.0" openkal-opensbi = "0.10.1" -openkal-musl = "0.30.1" +openkal-musl = "0.30.2" openkal-llvm-runtime = "0.21.0" openkal-ld = "0.7.3" openkal-run = "0.7.3" From 1da5a981607eb706221fd00380183ef69e750210 Mon Sep 17 00:00:00 2001 From: Sunrisepeak Date: Tue, 24 Nov 2026 01:19:51 +0900 Subject: [PATCH 3/3] openkal-linux 0.27.2 and openkal-musl 0.30.3: the riscv64 row's conformance suite under the translator --- README.md | 14 +++++++++----- mcpp.toml | 34 ++++++++++++++++++---------------- 2 files changed, 27 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index f8ad1aa..64a3f06 100644 --- a/README.md +++ b/README.md @@ -178,13 +178,17 @@ status 3. A row is added for a machine with no operating system above RISC-V SBI firmware, `riscv64-none-musl` (below), with openkal-opensbi 0.10.1 joining the group. It holds 0.31.3's member, openkal-image 0.7.3. -Platform 0.32.1 is a patch of the group with openkal-linux 0.27.1, which adds +Platform 0.32.1 is a patch of the group with openkal-linux 0.27.2, which adds riscv64 and reads a frame chain where `process_vm_readv` is absent. It adds the -row `riscv64-linux-musl` to the hosted arrangement: openkal-musl 0.30.2 over +row `riscv64-linux-musl` to the hosted arrangement: openkal-musl 0.30.3 over openkal-linux's riscv64 system-call layer, with openkal-llvm-runtime 0.21.0 above -it. openkal-musl 0.30.2 defines `__riscv_flush_icache`, the call the compiler makes -for `__builtin___clear_cache` on riscv64 Linux; the conformance suite, which -performs that maintenance itself, did not link without it. A provider entry states the row's runner, qemu's user-mode translator +it. What the conformance suite measured under the translator is in the two +members. openkal-musl defines `__riscv_flush_icache`, the call the compiler makes +for `__builtin___clear_cache` on riscv64 Linux, and `__tls_get_addr` from the +thread pointer, the call riscv64's static link keeps for a general-dynamic access. +openkal-linux gives the riscv64 record of a signal's action the 32 bytes the +translator writes, and reads an ended program's record only where it was written. +A provider entry states the row's runner, qemu's user-mode translator (`xim:qemu-user-riscv64`) on Linux x86_64, which runs without being enabled. CI builds and runs a hosted program there and the specification's conformance suite through the platform. diff --git a/mcpp.toml b/mcpp.toml index f03ade4..f8b223a 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -73,7 +73,7 @@ debuggee = ["okrun", "--debugger", "{}"] [platform.layers] compiler-runtime = "openkal-llvm-runtime@0.21.0" "c++-abi" = "openkal-llvm-runtime@0.21.0" -c-abi = { name = "openkal-musl", version = "0.30.2", default-features = false, features = ["posix", "malloc-mimalloc"] } +c-abi = { name = "openkal-musl", version = "0.30.3", default-features = false, features = ["posix", "malloc-mimalloc"] } # Built for the building machine: `okld` writes and checks the notes, `okrun` # runs an image, `okprof` reads what a measured run recorded (0.23.0: the @@ -214,7 +214,7 @@ seal = [["okld", "note", "{}"], ["okld", "place", "{}"], ["okld", "check", "{} # `-freebsd-musl` are the system with no C library of its own beneath. # `i686-linux-musl` (0.28.0) is the thirty-two bit row of Linux (openkal 0.25.1, # clause 5.5): openkal-linux's i386 system-call layer beneath openkal-musl's. -# `riscv64-linux-musl` (0.32.1): openkal-linux 0.27.1's riscv64 layer beneath +# `riscv64-linux-musl` (0.32.1): openkal-linux 0.27.2's riscv64 layer beneath # openkal-musl's, run under qemu's user-mode translator (the provider below). targets = ["x86_64-linux-gnu", "aarch64-linux-gnu", "x86_64-linux-musl", "aarch64-linux-musl", "x86_64-macos", "aarch64-macos", "x86_64-windows-gnu", "x86_64-windows-musl", @@ -224,7 +224,7 @@ toolchain = "llvm@23.1.3" [platform.hosted.layers] compiler-runtime = "openkal-llvm-runtime@0.21.0" "c++-abi" = "openkal-llvm-runtime@0.21.0" -c-abi = { name = "openkal-musl", version = "0.30.2", default-features = false, features = ["posix", "malloc-mimalloc"] } +c-abi = { name = "openkal-musl", version = "0.30.3", default-features = false, features = ["posix", "malloc-mimalloc"] } # THE HOSTED ROWS' RUNNERS ON ANOTHER SYSTEM (0.29.0; mcpp 2026.11.16.1 reads a # runner's `enabled`). A FreeBSD program runs in the FreeBSD virtual machine of @@ -242,7 +242,7 @@ serves = ["x86_64-freebsd-musl"] hosted = true base = "none" toolchain = "llvm@23.1.3" -layers = { compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.2", default-features = false, features = ["posix", "malloc-mimalloc"] } } +layers = { compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.3", default-features = false, features = ["posix", "malloc-mimalloc"] } } runner = { cmd = ["dirun", "--profile", "{pkg:freebsd-disk-image}/dirun.toml", "--emulator", "{pkg:qemu-x86}/bin/qemu-system-x86_64", "--", "{}"], host = "any", hosts = ["linux-x86_64"], requires = ["xim:dirun@0.6.0", "xim:freebsd-disk-image@14.5-1", "xim:qemu-x86@9.2.4-1"], enabled = false } [[platform.provider]] @@ -251,7 +251,7 @@ serves = ["aarch64-freebsd-musl"] hosted = true base = "none" toolchain = "llvm@23.1.3" -layers = { compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.2", default-features = false, features = ["posix", "malloc-mimalloc"] } } +layers = { compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.3", default-features = false, features = ["posix", "malloc-mimalloc"] } } runner = { cmd = ["dirun", "--profile", "{pkg:aarch64-freebsd-disk-image}/dirun.toml", "--var", "firmware={pkg:ovmf}/share/edk2/edk2-aarch64-code.fd", "--emulator", "{pkg:qemu-system}/bin/qemu-system-aarch64", "--", "{}"], host = "any", hosts = ["linux-x86_64"], requires = ["xim:dirun@0.6.0", "xim:aarch64-freebsd-disk-image@14.5-1", "xim:ovmf@9.2.4-4", "xim:qemu-system@9.2.4"], enabled = false } [[platform.provider]] @@ -260,7 +260,7 @@ serves = ["x86_64-windows-musl"] hosted = true base = "none" toolchain = "llvm@23.1.3" -layers = { compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.2", default-features = false, features = ["posix", "malloc-mimalloc"] } } +layers = { compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.3", default-features = false, features = ["posix", "malloc-mimalloc"] } } runner = { cmd = ["wine", "{}"], host = "same-arch", hosts = ["linux-x86_64"], requires = ["xim:wine@11.0"], enabled = false } # A riscv64 Linux program runs on an x86_64 Linux machine under qemu's user-mode @@ -273,7 +273,7 @@ serves = ["riscv64-linux-musl"] hosted = true base = "none" toolchain = "llvm@23.1.3" -layers = { compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.2", default-features = false, features = ["posix", "malloc-mimalloc"] } } +layers = { compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.3", default-features = false, features = ["posix", "malloc-mimalloc"] } } runner = { cmd = ["qemu-riscv64-static", "{}"], host = "any", hosts = ["linux-x86_64"], requires = ["xim:qemu-user-riscv64@7.2.0"] } # The runners require dirun 0.5.0 and ovmf 9.2.4-3 (0.29.0): ovmf's profile states the UEFI @@ -308,7 +308,7 @@ serves = ["x86_64-uefi"] base = "none" hosted = true -layers = { compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.2", default-features = false, features = ["posix", "malloc-mimalloc"] } } +layers = { compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.3", default-features = false, features = ["posix", "malloc-mimalloc"] } } link = { driver = "lld", start = "efi_main", flags = ["--subsystem", "efi_application", "--gc-sections"], exe = "{name}.efi", inputs = [{ file = "board/qemu-exit.S" }], seal = [] } runner = { cmd = ["dirun", "--payload", "{}", "--profile", "{pkg:ovmf}/dirun.toml", "--emulator", "{pkg:qemu-x86}/bin/qemu-system-x86_64", "--memory", "2048", "--"], hosts = ["linux-x86_64", "linux-aarch64", "macos-aarch64", "windows-x86_64"], requires = ["xim:dirun@0.6.0", "xim:qemu-x86@9.2.4-1", "xim:ovmf@9.2.4-4"], enabled = false } @@ -347,7 +347,7 @@ serves = ["i686-dos-musl"] base = "none" hosted = true -layers = { compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.2", default-features = false, features = ["posix", "malloc-mallocng"] } } +layers = { compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.3", default-features = false, features = ["posix", "malloc-mallocng"] } } link = { driver = "lld", start = "okdos_entry", flags = ["-static", "--image-base=0x1000", "-z", "norelro", "-z", "stack-size=1048576", "--gc-sections", "--eh-frame-hdr"], seal = [["okdos", "seal", "{}"]] } runner = { cmd = ["dirun", "--payload", "{}", "--profile", "{pkg:dosbox-staging}/dirun.toml", "--"], hosts = ["linux-x86_64", "macos-aarch64", "windows-x86_64"], requires = ["xim:dirun@0.6.0", "xim:dosbox-staging@0.83.0-2"], enabled = false } @@ -385,7 +385,7 @@ serves = ["riscv64-none-musl"] base = "none" hosted = true -layers = { "kernel-abi" = { name = "openkal-opensbi", version = "0.10.1", features = ["standalone"] }, compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.2", default-features = false, features = ["posix", "malloc-mallocng"] } } +layers = { "kernel-abi" = { name = "openkal-opensbi", version = "0.10.1", features = ["standalone"] }, compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.3", default-features = false, features = ["posix", "malloc-mallocng"] } } runner = { cmd = ["{pkg:qemu-riscv}/bin/qemu-system-riscv64", "-machine", "virt", "-nographic", "-no-reboot", "-bios", "default", "-kernel", "{}"], hosts = ["linux-x86_64", "linux-aarch64", "macos-aarch64", "windows-x86_64"], requires = ["xim:qemu-riscv@9.2.4-1"], enabled = false } # UNIX SYSTEM V RELEASE 4 AND ITS DESCENDANTS ON i386 (0.30.0): programs of the @@ -442,7 +442,7 @@ serves = ["i686-svr4-musl"] base = "none" hosted = true -layers = { "kernel-abi" = { name = "openkal-svr4", version = "0.3.0", features = ["standalone"] }, compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.2", default-features = false, features = ["posix", "malloc-mallocng"] } } +layers = { "kernel-abi" = { name = "openkal-svr4", version = "0.3.0", features = ["standalone"] }, compiler-runtime = "openkal-llvm-runtime@0.21.0", "c++-abi" = "openkal-llvm-runtime@0.21.0", c-abi = { name = "openkal-musl", version = "0.30.3", default-features = false, features = ["posix", "malloc-mallocng"] } } link = { driver = "lld", script = "link/svr4.ld", flags = ["-static", "-z", "norelro", "--gc-sections", "--eh-frame-hdr"] } runner = { cmd = ["unshare", "-Ur", "{pkg:ibcs-us}/bin/ibcs-us", "{}"], hosts = ["linux-x86_64"], requires = ["xim:ibcs-us@4.3-2"], enabled = false } @@ -536,16 +536,18 @@ runner = { cmd = ["unshare", "-Ur", "{pkg:ibcs-us}/bin/ibcs-us", "{}"], hosts = # StartImage, openkal-dos and openkal-dos-tools 0.3.0 through EXEC, each a # started program run to its end first, openkal clause 7.19), openkal-musl 0.30.1 # naming them, and openkal-windows 0.23.1 (a program without memory for its -# arguments ends with the reason); 0.32.1, openkal-linux 0.27.1 (riscv64, and a -# frame chain read without `process_vm_readv') and openkal-musl 0.30.2 -# (`__riscv_flush_icache'), with `riscv64-linux-musl' served. From 0.24.1 the members name +# arguments ends with the reason); 0.32.1, openkal-linux 0.27.2 (riscv64, a +# frame chain read without `process_vm_readv', the riscv64 action record as the +# translator writes it, an ended program's record read only where it was written) +# and openkal-musl 0.30.3 (`__riscv_flush_icache', `__tls_get_addr' from the +# thread pointer), with `riscv64-linux-musl' served. From 0.24.1 the members name # one another by compatible ranges (`^0.28.0`) and this group chooses the # versions: mcpp 2026.11.7.1 resolves within it, and a fix of one member is that # member's release and a patch of this group, released together through one # index change (tools/family_release.py, .github/workflows/family-release.yml). [platform.versions] openkal = "0.26.0" -openkal-linux = "0.27.1" +openkal-linux = "0.27.2" openkal-macos = "0.24.1" openkal-windows = "0.23.1" openkal-freebsd = "0.2.0" @@ -554,7 +556,7 @@ openkal-dos = "0.3.0" openkal-dos-tools = "0.3.0" openkal-svr4 = "0.3.0" openkal-opensbi = "0.10.1" -openkal-musl = "0.30.2" +openkal-musl = "0.30.3" openkal-llvm-runtime = "0.21.0" openkal-ld = "0.7.3" openkal-run = "0.7.3"