aboutsummaryrefslogtreecommitdiff
path: root/kernel/kapi
AgeCommit message (Collapse)AuthorFilesLines
33 hourskapi/memory: replace mmio_region API with mmio_windowFelix Morgner3-87/+584
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.
33 hourskapi/memory: carry hw_base offset forward in mappingFelix Morgner1-1/+2
33 hoursmemory: harden MMIO mappings and update docs.Felix Morgner1-0/+7
33 hoursmemory: improve MMIO allocation/mapping robustnessFelix Morgner1-23/+56
33 hourskapi/memory: map MMIO regions more securelyFelix Morgner1-1/+1
33 hourskapi/memory: unmap MMIO regions on releaseFelix Morgner1-0/+10
33 hourskapi/memory: fix page unmap logicFelix Morgner1-4/+4
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.
2026-09-29kapi/interrupts: add testsFelix Morgner2-0/+254
2026-09-10kapi/system: reduce panic buffer sizeFelix Morgner1-5/+85
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 Morgner3-13/+14
2026-09-10x86_64: replace raw pointers with observer_ptrFelix Morgner1-4/+6
2026-09-09chore: replace some naked pointersFelix Morgner8-39/+42
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-03chore: fix message prefixesFelix Morgner1-2/+2
2026-09-01chore: clean up facet idsFelix Morgner4-36/+39
2026-08-29chore: normalize panic messagesFelix Morgner4-10/+10
2026-08-29chore: apply stylistic cleanupsFelix Morgner4-7/+8
2026-08-27kapi/fs: implement read_directoryFelix Morgner2-9/+11
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: add stub implementation of read_directoryFelix Morgner2-0/+20
2026-08-26kernel: split vfs and filesystem driversFelix Morgner2-26/+21
2026-08-26kernel/fs: vfs: make file descriptor polymorphicFelix Morgner1-4/+13
2026-08-18kapi/fs: fix wrong test argumentFelix Morgner1-1/+1
2026-08-18kstd: introduce basic offset typeFelix Morgner2-7/+4
2026-08-18kstd: flatten units namespaceFelix Morgner3-7/+7
2026-08-18kstd: clean up unitsFelix Morgner1-1/+1
2026-08-18kapi: implement seek supportFelix Morgner2-0/+27
2026-08-17chore: remove superfluous includeFelix Morgner1-1/+0
2026-08-17chore: replace expected by resultFelix Morgner1-7/+6
2026-08-17kapi: port block_special_file to std::spanFelix Morgner1-2/+2
2026-08-17kapi: add power management support to driversFelix Morgner3-0/+308
2026-07-30kernel: implement dev zero and nullFelix Morgner2-5/+22
2026-07-29kernel: allow reallocation of minor numbersFelix Morgner1-0/+5
2026-07-28x86_64: split lapic according to UDMFelix Morgner6-38/+5
2026-07-27x86_64: port PIT to devices resourcesFelix Morgner1-1/+2
2026-07-27kapi: fix device resource lookupFelix Morgner2-5/+321
2026-07-27kapi: add device resourcesFelix Morgner2-0/+444
2026-07-27kapi: fix driver registry lockingFelix Morgner4-12/+125
2026-07-26kapi/bus: extend stress testsFelix Morgner1-2/+79
2026-07-26kapi/bus: lock correct mutexFelix Morgner1-1/+1
2026-07-26build: add tsan buildFelix Morgner2-5/+9
2026-07-26kapi/devices: implement locking disciplineFelix Morgner4-107/+233
2026-07-26kapi: add tracked mutex testsFelix Morgner2-5/+79
2026-07-26kapi: implement a simple, tracked mutexFelix Morgner1-0/+55
2026-07-26kernel: add devfs live-update testsFelix Morgner1-0/+11
2026-07-26kapi: implement device removalFelix Morgner1-6/+76
2026-07-26kapi/device: allow removing devices from bussesFelix Morgner3-2/+129
2026-07-26kapi: move protocol pointer to base busFelix Morgner3-33/+20
2026-07-26chore: minor cleanups after refactoringFelix Morgner2-19/+17
2026-07-26chore: replace "interface" with "facet"Felix Morgner11-333/+351
2026-07-25kapi: introduce the "bus" facetFelix Morgner1-0/+10
2026-07-25kapi: introduce driver namesFelix Morgner3-5/+23