Skip to content

0.10.0: standalone beneath a C library, openkal.exec, the interfaces under [kernel-abi] - #17

Merged
Sunrisepeak merged 3 commits into
mainfrom
feat/0.10.0-exec
Nov 14, 2026
Merged

Sunrisepeak merged 3 commits into
mainfrom
feat/0.10.0-exec

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

UEFI converges into openkal: the row x86_64-uefi is served by openkal-platform 0.28.0 over openkal-musl 0.29.6 and openkal-llvm-runtime 0.20.3, with this implementation beneath them.

  • standalone (feature): efi_main records the firmware's tables and the arguments and hands the program to the C library's __libc_start_main, which runs the initialisers; without it the 0.9.0 behaviour stands. openkal-musl selects it on cfg(os = "uefi").
  • openkal.exec: pages of type EfiLoaderCode, protected through the memory attribute protocol where the firmware offers it (the ok-image runner carried as a UEFI application places code there). kal_exec_map_part answers not supported (no openkal.fs).
  • [kernel-abi] provides-interfaces: 0.9.0 stated the list under [package], where the engine does not read it, so a consumer bound every interface.
  • Position zero of the arguments is the empty name in both arrangements.
  • The example's board (the arrangement with no C library, QEMU's q35 with the edk2 firmware, the debug-exit board exit) is examples/board, a fixture; it was openkal-uefi-platform 0.1.0, whose content is folded here and into openkal-platform.

Verified locally: the example built with mcpp 2026.11.12.1 boots under OVMF through dirun, every check holds, status 42. Beneath openkal-musl 0.29.6 and openkal-llvm-runtime 0.20.3 (mcpp 2026.11.13.1, --release): import std with std::println and std::ranges::sort is a 1.2 MB EFI application that prints and returns 42 in 0.8 s.

…under [kernel-abi]; the example's board folded in
…andard error the console

kal_alloc over-allocated every stricter alignment from the pool, so the
256 MiB a C library's allocator states for an arena cost 256 MiB of backed
memory beyond the arena. An alignment of a page or more is now pages at an
aligned address read from the memory map (AllocateAddress), the highest
first; kal_free returns them as pages.

OVMF's StdErr writes nothing to the serial console a runner reads, so
diagnostics and abort messages were lost. A board defines
okuefi_board_errors_to_console() to send standard error to ConOut; the
example board does. The example checks a 256 MiB-aligned allocation.
@Sunrisepeak
Sunrisepeak merged commit 91e8ec5 into main Nov 14, 2026
3 checks passed
@Sunrisepeak
Sunrisepeak deleted the feat/0.10.0-exec branch November 14, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant