Skip to content

0.1.0: x86_64-uefi, its conventions, the board's exit, and QEMU with the edk2 firmware as the runner - #1

Closed
Sunrisepeak wants to merge 2 commits into
mainfrom
feat/0.9.0-family
Closed

Sunrisepeak wants to merge 2 commits into
mainfrom
feat/0.9.0-family

Conversation

@Sunrisepeak

@Sunrisepeak Sunrisepeak commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

The platform package for UEFI applications (mcpp SPEC-013).

  • [[platform.define]] x86_64-uefi: clang's x86_64-unknown-uefi, PE, the uefi execution model, .efi.
  • Compile and link: -nostdlib, the entry efi_main, subsystem EFI application; the link adds board/qemu-exit.S (the board's exit: the status to QEMU's debug-exit port, only when the processor names QEMU's hypervisor) and runtime/mem.S (memset, memcpy, memmove, memcmp in the Microsoft x64 convention).
  • Layers: kernel-abi openkal-uefi 0.9.0; no C library, compiler run-time or C++ ABI.
  • Runner: dirun boots the application as EFI/BOOT/BOOTX64.EFI from a read-only virtio FAT disk under q35, with the edk2 code image as a flash device, and reads the status from the debug-exit device; requires names xim:dirun@0.3.0, xim:qemu-x86@9.2.4-1 (the emulator, named by path through --qemu, built for Linux, macOS and Windows) and xim:ovmf@9.2.4 (the firmware, data, for every host).

Merged together with mcpplibs/openkal-uefi's 0.9.0, whose CI builds and boots its example through this branch.

@Sunrisepeak
Sunrisepeak force-pushed the feat/0.9.0-family branch 2 times, most recently from 9676332 to 0f25205 Compare November 13, 2026 05:39
…emory functions, QEMU with the edk2 firmware as the runner
…n on each host; the runner requires dirun 0.3.1

examples/hello is written against openkal alone (a static initialiser, the
arguments, the two clocks, an over-aligned allocation) and returns 42. CI builds
it on Linux, macOS and Windows, checks the PE32+ EFI-application header, and runs
it through the platform's runner.
@speak-agent

Copy link
Copy Markdown

Superseded by openkal-platform 0.28.0 (mcpplibs/openkal-platform#31), which serves UEFI on the openkal route: the row x86_64-uefi over openkal-uefi 0.10.0, with openkal-musl and the C++ run-time above it, run by dirun under OVMF; an ok image also packs for UEFI as a carried program (uefi-x86_64). One stack serves every environment, so a separate UEFI platform is not released. This branch stays available for reference.

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.

2 participants