Skip to content

72 issue separate driver implementations into a modular structure for out of tree builds - #256

Merged
marcobuschini merged 2 commits into
mainfrom
72-issue-separate-driver-implementations-into-a-modular-structure-for-out-of-tree-builds
Dec 3, 2026
Merged

marcobuschini merged 2 commits into
mainfrom
72-issue-separate-driver-implementations-into-a-modular-structure-for-out-of-tree-builds

Conversation

@marcobuschini

Copy link
Copy Markdown
Member

Commitizen Summary

  • Type: feat / fix / refactor / perf / test / build / docs / chore
  • Scope: <subsystem>
  • Related Issues: Closes # | Part of #

What Changed

Breaking Changes

None

Verification & Quality Gates

  • make all builds cleanly under aarch64-linux-gnu-g++ (-std=c++20 -Werror)
  • make quality passes format-check, lint-report (clang-tidy), and test-host
  • make test-host passes Snitch unit tests under ASan/UBSan with zero PFA/heap leaks
  • Verified in QEMU (make run) where applicable

Checklist

  • PR title and commits follow Conventional Commits / Commitizen specification
  • Changes adhere to freestanding C++20 rules (no exceptions, RTTI, or banned headers)
  • Changes stay strictly within the scope of the linked issue/sub-issue

…#250) (#255)

Part of #72.

- Add include/ddk/Status.hpp with freestanding Status enum, status_str(),
  and Result<T> helper (no exceptions or RTTI)
- Add include/ddk/Bus.hpp with BusType and DeviceDescriptor for MMIO/FDT
  and future bus matching
- Add include/ddk/Resources.hpp with move-only RAII handles (MmioRegion,
  DmaBuffer, IrqHandle, IrqLock, EventHandle) following the Rule of Five
- Add include/ddk/Services.hpp with LogLevel, IrqHandler, and abstract
  PlatformServices capability-injection interface
- Add include/ddk/Driver.hpp with DDK_ABI_VERSION, Driver lifecycle base
  class, and DriverMetadata entry point
… suite (#254)

Part of #72.

- Add tests/host/ddk_kernel_services_test.cpp verifying KernelPlatformServices
  MMIO mapping, PFA-backed DMA allocation/RAII cleanup and OOM handling,
  IRQ registration/error propagation, IrqLock state preservation, EventHandle
  slot pool exhaustion/reclamation, and Kernel::Log routing
- Add kernel/shell/tests/test_ddk.cpp (cmd_test_ddk) exercising DummyDriver
  and KernelPlatformServices end-to-end in QEMU with PFA leak verification
- Register test ddk in kernel/shell/tests/shell_tests.hpp and
  kernel/shell/shell.cpp (including test all and help menu)
- Wire kernel/shell/tests/test_ddk.cpp in kernel/kernel.mk and
  tests/host/ddk_kernel_services_test.cpp in Makefile
@marcobuschini marcobuschini self-assigned this Dec 3, 2026
@marcobuschini
marcobuschini merged commit ca94bbe into main Dec 3, 2026
5 checks passed
@marcobuschini
marcobuschini deleted the 72-issue-separate-driver-implementations-into-a-modular-structure-for-out-of-tree-builds branch December 3, 2026 20:44
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.

[ISSUE] Separate driver implementations into a modular structure for out-of-tree builds

1 participant