aboutsummaryrefslogtreecommitdiff
path: root/common/dmem.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2022-06-12 16:18:47 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2022-06-12 16:18:47 +0300
commit62fc51338d7259c2ea39f38bd8c7d9552e9b2002 (patch)
tree87eb670ed58b3ce0d5c0e2ad39f5c633d9e10e40 /common/dmem.c
parent6c529c5c6c2d016d77b143171c5e27fbec0d2bfd (diff)
downloadkmi-62fc51338d7259c2ea39f38bd8c7d9552e9b2002.tar.gz
kmi-62fc51338d7259c2ea39f38bd8c7d9552e9b2002.zip
doxygen shows no warnings
+ Does not mean documentation is done, but it's a nice little achievement nonetheless.
Diffstat (limited to 'common/dmem.c')
-rw-r--r--common/dmem.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/common/dmem.c b/common/dmem.c
index 88b06fd..98b58fd 100644
--- a/common/dmem.c
+++ b/common/dmem.c
@@ -11,8 +11,12 @@
#include <apos/assert.h>
#include <apos/dmem.h>
+/** Region before RAM. */
static struct mem_region_root pre_ram = { 0 };
+
+/** Region after RAM. */
static struct mem_region_root post_ram = { 0 };
+
pm_t __pre_base = 0;
pm_t __pre_top = 0;
pm_t __post_base = 0;
@@ -37,6 +41,19 @@ stat_t init_devmem(pm_t ram_base, pm_t ram_top)
return OK;
}
+/**
+ * Device virtual memory worker callback for \ref map_fill_region().
+ *
+ * @param b Virtual memory to work in.
+ * @param offset Hint for \ref alloc_page().
+ * @param vaddr Current virtual address.
+ * @param flags Flags of region.
+ * @param order Suggested page order.
+ * @param data Pointer to \ref stat_t.
+ * @return \see alloc_uvmem_wrapper().
+ *
+ * \see alloc_uvmem_wrapper().
+ */
static stat_t dev_alloc_wrapper(struct vmem *b, pm_t *offset, vm_t vaddr,
vmflags_t flags, enum mm_order order,
void *data)
@@ -48,6 +65,19 @@ static stat_t dev_alloc_wrapper(struct vmem *b, pm_t *offset, vm_t vaddr,
return OK;
}
+/**
+ * Device virtual memory freeing worker callback for \ref map_fill_region().
+ *
+ * @param b Virtual memory to work in.
+ * @param offset Hint for \ref alloc_page().
+ * @param vaddr Current virtual address.
+ * @param flags Flags of region.
+ * @param order Suggested page order.
+ * @param data Pointer to \ref stat_t.
+ * @return \see alloc_uvmem_wrapper().
+ *
+ * \see alloc_uvmem_wrapper().
+ */
static stat_t dev_free_wrapper(struct vmem *b, pm_t *offset, vm_t vaddr,
vmflags_t flags, enum mm_order order, void *data)
{