Changelog
All notable changes to this project are documented in this file.
Format follows Keep a Changelog.
[Unreleased]
Section titled “[Unreleased]”Changed
Section titled “Changed”- Licence: KDAL is GPL-2.0-only throughout. The repository said GPLv3,
the module declared
MODULE_LICENSE("GPL")(version 2) and the compiler’s files said GPL-2.0-only; every C source now carries an SPDX line, andinclude/kdal/ioctl.hisGPL-2.0-only WITH Linux-syscall-note. Packaging metadata follows.
-
kdality help,-hand--helpwork without the module loaded, andkdality versionprints the version fromVERSION. -
kdalup installputsKDAL_HOME’sbinon the PATH it writes into the shell profile; it wrote$HOME/.kdal/binwhateverKDAL_HOMEsaid.
[0.2.0] - 2026-11-24
Section titled “[0.2.0] - 2026-11-24”Changes since v0.1.0. The language, compiler and editor plugins (lang/,
compiler/, editor/) are frozen since 2026-11-01; the kdality runtime
CLI (tools/) is maintained (README, “Layout”). The QEMU and Docker
integration for VS Code that v0.1.0 deferred to this release is not in it:
the editor plugins are frozen.
- Devices report their resource demand (MMIO range, GIC INTIDs, SMMU and
StreamIDs) in
struct kdal_demand;/sys/kernel/debug/kdal/demandprints it as JSON with the FF-A partition manifest property names. The device-tree backend fills it fromreg,interruptsandiommus(audit K4). - KUnit suite
kdal-demand(2 cases). make KDAL_KUNIT=ybuilds the KUnit suites intokdal.ko(audit K12).- CI on GitHub Actions: smoke tests on Linux and macOS, lint, and a job that
builds
kdal.koagainst Linux v6.18 arm64, runs its KUnit suites in QEMU and checks the reported device demand (audit K1). - Local CodeQL runner (
scripts/dev/codeql.sh). - Issue templates and a pull request template.
Changed
Section titled “Changed”- The KUnit test
find_driver_by_classchecks the driver class, not which driver registers first (audit K11). - The project home moved to Codeberg on 2026-11-01 and back to GitHub on 2026-11-04; installer, release scripts, packaging and links point to GitHub again.
- README and docs: KDAL’s scope in the HAVEN thesis, the CIX P1 target platforms, the four drivers named example drivers, the KUnit suite table, and which directories are maintained or frozen.
- Compiler and
kdalityrefactors: parser statement handling split, compile option parsing tightened, simulate expression dispatch, testgen parsing and token enum numbering simplified. - Em-dashes replaced with ASCII hyphens; local CodeQL artifacts ignored.
- The guides (architecture, API, installation, language, porting, FAQ,
performance, upstreaming, thesis) live on the HAVEN docs site;
docs/keeps the records (docs/README.md).
Removed
Section titled “Removed”website/(the Astro Starlight site): its pages are part of the ecosystem’s site in the haven-docs repository (docs-haven.vercel.app/kdal/), which also copies this README and changelog at every build. Thewebsitetargets of CMake andscripts/dev/, and the e2ewebsitesuite, are gone with it.
- The module builds against Linux v6.18 with clang (
file_operationsand accelerator op signatures) and loads without a crash: a driver is bound to its device before probe. Out-of-tree builds defaultCONFIG_KDAL_QEMU_BACKENDandCONFIG_KDAL_EXAMPLE_DRIVERSto y, as Kconfig does (audit K7, K8, K9). - Registering an object that is already registered no longer resets its list links and hangs the registry (audit K10).
kdal_core_initruns the generic backend (SoC glue, platform backend, device-tree scan), sokdal,devicenodes are found (audit K15).- Compiler and
kdality: input and output paths are validated (CodeQL path-expression alerts), files are created with restricted permissions, anddt-genandinitfile handling is hardened. - CI:
kernel-prepare.shaccepts a relative work directory; QEMU runs without a network card. kdality initwrites a project that compiles, simulates, lints and generates tests as written; every subcommand parses its arguments from the first one after its name and refuses unknown options; absolute and parent paths work and output directories are created;lintsees register reads insidelet,logand conditions and bitfield paths, and findskdal/stdlib/imports (docs/first-project-journey.md, #38, #39).kdality simulate --traceshowslog("...")andwait(sig, ms)as written (finding F2, #41).- The KUnit job’s demand report goes through the kernel log, so KUnit’s
own lines no longer land inside it (finding F3, #42; 0 failures in 200
stress boots, workflow
kunit-stress.yml). - The e2e suites report a failing command as a failure and run in CI.
[0.1.0] - 2025-06-09 (tagged and released 2026-04-19)
Section titled “[0.1.0] - 2025-06-09 (tagged and released 2026-04-19)”Build System - CMake Migration
Section titled “Build System - CMake Migration”- Migrated from GNU Make to CMake 3.20+ as the unified build system
- Added convenience scripts:
build.sh,run.sh,test.shunderscripts/dev/ - Build output organization: all artifacts collected under
build/with subfolders build.shcollect_outputs()copies website dist →build/website/, vsix →build/editor/vscode/- CMake
uninstalltarget viainstall_manifest.txt - Vim/Neovim plugin install rule for editor/vim/vim-kdal/ subdirectories
Development Test Script
Section titled “Development Test Script”test.shwith numbered[N/M]PASS/FAIL test cases across 10 targets- CI-mirroring tests:
cppcheck,shellcheck,structurevalidation - Test report logging: saves results to
build/test/<target>_<YYYYMMDD_HHMMSS>.log
Compiler Improvements
Section titled “Compiler Improvements”- Block-based arena allocator (
kdal_arena_t) - linked-list of blocks, norealloc - Dotted name support in
driver ... for DEV.Nameclause (qualified identifiers) - Backend block no longer requires trailing semicolon (consistent with driver/device blocks)
Toolchain Subcommands
Section titled “Toolchain Subcommands”kdality init <name>- scaffold new driver projects (.kdh + .kdc + Makefile + README)kdality dt-gen <file.kdh>- generate Device Tree Source overlays from .kdh headerskdality simulate <file.kdc>- dry-run interpreter with register trace (no kernel needed)kdality test-gen <file.kdc>- auto-generate KUnit test stubs from driver handlerskdality lint <file>- static analysis with 9 rules (W001–W009) and –strict mode
VS Code Extension
Section titled “VS Code Extension”- TextMate grammars for
.kdhand.kdcsyntax highlighting - Code snippets: device skeleton, driver skeleton, handler stubs, register access
- Language configuration with comment toggling and bracket matching
Core Runtime
Section titled “Core Runtime”- Module init/exit with full cascade (chardev → debugfs → backends → drivers)
- Registry with linked-list storage for backends, drivers, and devices
- Duplicate name prevention and find-by-name/class queries
- Device iterator (
kdal_for_each_device()) - Registry snapshot counters
- Circular event buffer (256 entries) with mutex and waitqueue
- Per-device power state management with event emission
Control Plane
Section titled “Control Plane”- Character device
/dev/kdalviamisc_register() - Per-fd state with
kdal_file_ctxinfile->private_data - 6 ioctl commands: GET_VERSION, GET_INFO, SET_POWER, LIST_DEVICES, POLL_EVENT, SELECT_DEV
- Read/write dispatch to selected device’s driver
- debugfs interface at
/sys/kernel/debug/kdal/with devices, version, snapshot files
Drivers
Section titled “Drivers”- UART driver with ring buffer allocation, baud/parity/stop config
- I2C driver with bus speed and slave address config
- SPI driver with clock/mode/bits-per-word config
- GPU driver with accelerator ops (queue/buffer/submit)
Backends
Section titled “Backends”- QEMU backend with 4096-byte per-device ring buffer
- Virtio I/O readiness API stub
- Virtio accelerator readiness API stub
- MMIO helper with 8/16/32-bit read/write
- Generic platform device backend
- SoC glue layer stub for CIX P1
- Device Tree scanner (
CONFIG_OFguarded)
Userspace
Section titled “Userspace”kdalityCLI: version, list, info, power, read, write commands- Smoke test (
testapp): GET_VERSION, LIST_DEVICES, GET_INFO, loopback - Integration test (
kdaltest): multi-device, power cycling, error paths - Throughput benchmark with configurable parameters
Testing
Section titled “Testing”- 38 KUnit test cases across 5 suites (core, registry, event, driver, accel)
- CI test script with 4-stage pipeline
Infrastructure
Section titled “Infrastructure”- QEMU workspace preparation (cloud image, cloud-init, 9p shared dir)
- Kernel cross-compilation script for Linux 6.6.80 aarch64
- QEMU launch and debug scripts
checkpatch.plwrapper- Static analysis (cppcheck, sparse, shellcheck)
- Coverage collection (gcov/lcov)
- Version bump script
- Changelog generator from conventional commits
- Dependency installer for macOS and Linux
- GitHub Actions CI workflows (build, test, lint, CodeQL, release)
Documentation
Section titled “Documentation”- Architecture: 6-layer diagram, data flow, init cascade, design decisions
- API Reference: all functions, ioctl table, types, contracts
- Installation: macOS/Linux setup, build, verification, troubleshooting
- Porting Guide: step-by-step backend implementation
- Performance: measurement methodology, planned metrics
- FAQ: 12 common questions
- Upstreaming: strategy, checklist, patch series plan
- Thesis: chapter mapping to repository artifacts
Language Ecosystem
Section titled “Language Ecosystem”- KDAL DSL with
.kdhdevice headers and.kdcdriver files - Compiler pipeline: lexer → parser → AST → semantic analysis → C codegen
- 7 standard library
.kdhfiles (UART, I2C, SPI, GPIO, GPU, NPU, generic) - 8 CMake modules for IDE integration and cross-compilation
kdality compilesubcommand linking libkdalc.a- Standalone
kdalccompiler binary - Language specification (
lang/spec.md) and design rationale (lang/DESIGN.md) - VS Code grammar stubs for
.kdhand.kdcsyntax highlighting
Examples
Section titled “Examples”- Minimal third-party driver (out-of-tree kernel module template)
- GPU accelerator demo (userspace)
- NPU accelerator demo (userspace)
- KDAL DSL driver examples (
examples/kdc_hello/uart_hello.kdc,examples/kdc_hello/i2c_sensor.kdc)
Compiler - Critical Parser Bug
Section titled “Compiler - Critical Parser Bug”- Fixed buffer overflow in
kdal_ast_new()- LET_STMT and FOR_STMT now allocatesizeof(kdal_expr_node_t)(72 bytes) instead ofsizeof(kdal_ast_t)(32 bytes) - Refactored arena allocator from single-buffer
reallocto block-based linked list (pointers remain stable across allocations) - Removed incorrect trailing semicolon requirement after backend
{ }block - Added dotted identifier consumption for
driver X for DEV.Namesyntax
Static Analysis (cppcheck)
Section titled “Static Analysis (cppcheck)”- Fixed
constParameterwarnings in 6 kdality subcommand files (argv[]→*const argv[]) - Fixed
constVariablePointerwarnings forstrchr()return values in dtgen.c, lint.c, simulate.c - Fixed
scanfformat specifier (%li→%lu) forunsigned longin simulate.c - Fixed
variableScopewarnings by moving declarations into narrower scopes - Fixed
constParameterPointerin benchmark.c time_diff_ms function
Build System
Section titled “Build System”- Created
compiler/CMakeLists.txt- buildskdalc_libstatic library andkdalcbinary - Fixed top-level
CMakeLists.txt- added all 8 kdality source files, linked kdalc_lib, removed brokeninclude(KDALConfig) - Fixed kdality CMake target include paths for both
include/andcompiler/include/
E2E Test Fixes
Section titled “E2E Test Fixes”- Fixed
test_user_journey.sh- corrected kdality binary path to$BUILD_DIR/kdality - Fixed
test_user_journey.sh- replacedmake uninstallwithinstall_manifest.txt-based uninstall - Fixed CMake module count assertion (1 → 7)
- Added shellcheck directive suppressions across 8 E2E scripts
- Added trailing newlines to 8 C source files
Stale References
Section titled “Stale References”- Renamed all
kdaltoolreferences tokdalityacross CI workflows, docs, and source - Fixed stale
scripts/qemu/run.shpath toscripts/setupqemu/run.sh - Replaced placeholder
blink.kdc/sensor.kdcexample paths with actualuart_hello.kdc/i2c_sensor.kdc - Updated
your-org/kdalandexample/kdalplaceholder URLs to actual GitHub repository
- Tested on: macOS aarch64 (host build + toolchain), QEMU aarch64 virt machine (kernel module)
- No real hardware validation - SoC glue layer is
CONFIG_OF-guarded and a no-op on QEMU - QEMU/Docker VS Code integration deferred to v0.2.0