summaryrefslogtreecommitdiff
path: root/sys/inc/lib/ptrbox.h
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-11-23 13:37:23 -0500
committerIan Moffett <ian@osmora.org>2025-11-23 13:37:23 -0500
commitb66e8e0c9999565c78d6d207f904c8d3ec1148e4 (patch)
treed2bf632b9e4660a78637f09c4cc5110d67b79d47 /sys/inc/lib/ptrbox.h
parentd9e933046e49221836cae35769c5d53ac721e715 (diff)
kern: lib: Add pointerbox physmem allocationdev
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/inc/lib/ptrbox.h')
-rw-r--r--sys/inc/lib/ptrbox.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/inc/lib/ptrbox.h b/sys/inc/lib/ptrbox.h
index 94f718c..38f6265 100644
--- a/sys/inc/lib/ptrbox.h
+++ b/sys/inc/lib/ptrbox.h
@@ -37,9 +37,11 @@
* Represents allocation types in a pointerbox
*
* @PTRBOX_HEAP: kalloc() and friends
+ * @PTRBOX_PHYSMEM: Physical memory
*/
typedef enum {
- PTRBOX_HEAP
+ PTRBOX_HEAP,
+ PTRBOX_PHYSMEM
} ptrbox_altype_t;
/*
@@ -53,7 +55,10 @@ typedef enum {
*/
struct ptrbox_aldes {
ptrbox_altype_t type;
- void *base;
+ union {
+ void *base;
+ uintptr_t phys;
+ };
size_t length;
TAILQ_ENTRY(ptrbox_aldes) link;
};