From 9a17b94c3cc3397152092da7f40a17682440fd78 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Sat, 14 Nov 2026 19:03:39 +0100 Subject: kapi/memory: carry hw_base offset forward in mapping --- kapi/kapi/memory.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'kapi') diff --git a/kapi/kapi/memory.hpp b/kapi/kapi/memory.hpp index 7979c7e1..ece85203 100644 --- a/kapi/kapi/memory.hpp +++ b/kapi/kapi/memory.hpp @@ -110,11 +110,12 @@ namespace kapi::memory //! //! This function will always set the @p uncached, @p global, and @p supervisor_only flags. //! - //! @param region The region to map. + //! @param region The region to map. This region must cover the in-page offset of hw_base plus the range to be + //! accessed. //! @param hw_base The base of the hardware region. //! @param flags The flags to apply. - //! @return A result containing a pointer to the first byte of the mapped region on success, an error otherwise, in - //! which case any partial mappings have been rolled back. + //! @return A pointer into the mapped region, including any frame offset, on success, an error otherwise, in which + //! case any partial mappings have been rolled back. auto map_mmio_region(mmio_region region, physical_address hw_base, page_mapper::flags flags = {}) -> kstd::result>; -- cgit v1.2.3