aboutsummaryrefslogtreecommitdiff
path: root/kapi
AgeCommit message (Collapse)AuthorFilesLines
24 hourskapi/memory: replace mmio_region API with mmio_windowFelix Morgner3-45/+199
Previously, allocation and mapping of MMIO regions was a multi-step process. The MMIO region API required its users to track and manage the lifetime of an MMIO region allocation manually. The new MMIO window API simplifies this by providing a single-step mapping interface and automatic lifetime management. Additionally, the new API adds strict bounds and alignment checks, to ensure that all MMIO accesses are within the requested range. The new API enforces these constraints at runtime via a system panic. Other contract violations, such as zero-sized mappings, are handled via runtime error codes. The new kapi::memory::mmio_window preserves the in-page offset of the hardware base within the window and bases all accesses on this offset. This means no user intervention is required to handle hardware ranges that are not aligned to a natural page boundary. The original pointer adjustment logic has been moved into the mmio_window class. Previous consumers of the region API (x86_64 LAPIC, PCIe) have been updated to the new mmio_window API. The behavior of the PCIe scan implementation has changed in that no windows are kept alive beyond the execution of the scan, since there are no consumers that would require persistent MMIO windows. Tests for the new infrastructure have been added, including a test support seam to allow for deinitialization of the MMIO subsystem in tests.
24 hourskapi/memory: carry hw_base offset forward in mappingFelix Morgner1-3/+4
24 hoursmemory: harden MMIO mappings and update docs.Felix Morgner2-7/+17
24 hoursmemory: improve MMIO allocation/mapping robustnessFelix Morgner1-3/+11
24 hourskapi/memory: fix page unmap logicFelix Morgner2-4/+7
Previously, the page mapper was expected to automatically free all frames that had become unused. However, this only works if all mappings refer to plain memory frames. In the case of MMIO frames, the mapper would still try to release the frame via the global frame allocator, which is incorrect, leading to undefined behavior in the worst case. This problem was discovered during work the PCI/PCIe subsystem, since we want to unmap any unused buses during enumeration.
24 hoursdev/pcie: extend segment descriptorFelix Morgner1-3/+12
24 hoursdev/pcie: implement initial detectionFelix Morgner2-0/+33
2026-09-30chore: clean up python scriptsFelix Morgner8-10/+10
2026-09-29kapi/interrupts: admit irq_lock dtor may panicFelix Morgner1-1/+8
2026-09-29kapi/interrupts: improve irq_lock protectionsFelix Morgner1-5/+53
The previous implementation suffered from four problems: 1. try_lock in the basic irq_lock always succeeded. 2. lock in the basic irq_lock always succeeded. 3. try_lock in the wrapper irq_lock did not use the base try_lock. 4. a foreign CPU could wrongly unlock a remote irq_lock. These issues are mitigated in this patch.
2026-09-29kapi/interrupts: implement IRQ lockFelix Morgner2-0/+110
2026-09-29kapi/interrupt: rework enablement APIFelix Morgner2-17/+28
2026-09-10kapi/system: reduce panic buffer sizeFelix Morgner1-24/+78
Previously, we allocated a 512-byte buffer for every call of the formatted panic function. This was heavily increasing the stack size for a number of functions. We now don't print to a statically allocated buffer, but rather use the iterator-based formatting facility and a proxy iterator with a small, self-flushing buffer. This reduces that static overhead of the formatted panic function to by almost 500 bytes, while increasing possible message fidelity, since we are not longer arbitrarily limited by the buffer.
2026-09-10kernel: replace some more plain pointersFelix Morgner4-4/+4
2026-09-10kstd/memory: introduce observer_ptr castsFelix Morgner4-10/+16
2026-09-10x86_64: replace raw pointers with observer_ptrFelix Morgner3-7/+30
2026-09-09chore: replace some naked pointersFelix Morgner6-32/+36
The coding guidelines explicitly prohibit the use of "naked"/C-style pointers. However, there were some prominent examples in the kapi and the core kernel source. This changeset replaces them with the appropriate smart pointer types.
2026-09-05x86_64/cpu: improve stack overflow detectionFelix Morgner1-2/+2
2026-09-03chore: fix header guardsFelix Morgner2-2/+2
2026-09-03chore: add missing explicit specifiersFelix Morgner1-1/+1
2026-09-03chore: add missing [[nodiscard]] attributesFelix Morgner2-5/+6
2026-09-01chore: clean up facet idsFelix Morgner6-7/+8
2026-08-31chore: minor stylistic cleanupsFelix Morgner7-22/+26
2026-08-30kapi/gdb: extend pretty printersFelix Morgner5-0/+98
2026-08-29chore: apply stylistic cleanupsFelix Morgner8-11/+11
2026-08-27kapi/fs: implement read_directoryFelix Morgner2-6/+4
This change also replaces the kernel internal directory_listing_cursor and directory_listing_entry with the kapi types directory_cursor and directory_entry.
2026-08-26kapi/fs: introduce read_directory APIFelix Morgner3-0/+58
2026-08-26build: fix include pathsFelix Morgner1-1/+1
2026-08-20kernel: remove vfs_typeFelix Morgner1-0/+5
2026-08-20docs: draft new documentation structureFelix Morgner5-32/+6
2026-08-20build: clean up header set verificationFelix Morgner1-4/+0
2026-08-20build: fix kapi header globFelix Morgner1-2/+2
2026-08-19chore: normalize kapi doc commentsFelix Morgner19-8/+104
2026-08-19chore: normalize header guardsFelix Morgner1-2/+2
2026-08-19docs: improve API doc structureFelix Morgner1-0/+4
2026-08-19kapi: use bytes for size in boot modulesFelix Morgner1-7/+7
2026-08-18kstd: introduce basic offset typeFelix Morgner2-11/+1
2026-08-18kstd: flatten units namespaceFelix Morgner8-17/+17
2026-08-18kstd: clean up unitsFelix Morgner1-2/+2
2026-08-18kapi: implement seek supportFelix Morgner2-6/+16
2026-08-17kapi/fs: introduce seek APIFelix Morgner2-0/+31
2026-08-17chore: replace expected by resultFelix Morgner1-8/+6
2026-08-17kapi: de-const read on block and char devicesFelix Morgner2-2/+2
2026-08-17kapi: port block_special_file to std::spanFelix Morgner1-4/+11
2026-08-17kapi: add power management support to driversFelix Morgner3-0/+54
2026-08-01kapi: add automatic driver registrationFelix Morgner1-0/+36
2026-07-30kernel: implement dev zero and nullFelix Morgner1-0/+4
2026-07-30kernel: add support for character devicesFelix Morgner1-1/+1
2026-07-29kernel: allow reallocation of minor numbersFelix Morgner1-0/+5
2026-07-28x86_64: split lapic according to UDMFelix Morgner3-42/+10