Skip to content

[SUBISSUE #1] Define Freestanding include/ddk/ Public Driver SDK Headers #250

Done

Description

@marcobuschini

Parent issue: #72

Scope

Define the public freestanding C++20 Driver Development Kit headers under include/ddk/ in namespace Kernel::DDK:

  • include/ddk/Status.hpp — Status enum and freestanding Result<T> helper (no exceptions/RTTI).
  • include/ddk/Resources.hpp — Move-only RAII handles (MmioRegion, IrqHandle, DmaBuffer, IrqLock, EventHandle) following the Rule of Five and releasing resources deterministically via PlatformServices*.
  • include/ddk/Bus.hpp — BusType and DeviceDescriptor for FDT/MMIO device matching (extensible to PCI later).
  • include/ddk/Services.hpp — LogLevel, IrqHandler, and abstract PlatformServices capability-injection interface.
  • include/ddk/Driver.hpp — DDK_ABI_VERSION, Driver lifecycle base class (probe, init, shutdown), and DriverMetadata.

Acceptance Criteria

  • Headers compile cleanly with -std=c++20 -ffreestanding -fno-exceptions -fno-rtti -Wall -Wextra -Werror -Wpedantic -Wshadow -Wconversion -Wsign-conversion -Wnull-dereference and -DHOST_TEST.
  • Zero includes from kernel/ or arch/.
  • Passes clang-format and clang-tidy.

Metadata

Metadata

Assignees

Labels

subissue

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions