Skip to content

feat(ddk): define freestanding include/ddk/ public driver SDK headers (#250) - #255

Merged
marcobuschini merged 1 commit into
72-issue-separate-driver-implementations-into-a-modular-structure-for-out-of-tree-buildsfrom
250-subissue-1-define-freestanding-includeddk-public-driver-sdk-headers
Dec 3, 2026
Merged

marcobuschini merged 1 commit into
72-issue-separate-driver-implementations-into-a-modular-structure-for-out-of-tree-buildsfrom
250-subissue-1-define-freestanding-includeddk-public-driver-sdk-headers

Conversation

@marcobuschini

@marcobuschini marcobuschini commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

Part of #72.

  • Add include/ddk/Status.hpp with freestanding Status enum, status_str(), and Result 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

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)

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
@marcobuschini marcobuschini self-assigned this Dec 3, 2026
@marcobuschini
marcobuschini merged commit 31d1b6c into 72-issue-separate-driver-implementations-into-a-modular-structure-for-out-of-tree-builds Dec 3, 2026
5 checks passed
@marcobuschini
marcobuschini deleted the 250-subissue-1-define-freestanding-includeddk-public-driver-sdk-headers branch December 3, 2026 20:19
marcobuschini added a commit that referenced this pull request Dec 3, 2026
…#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
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