From b66e8e0c9999565c78d6d207f904c8d3ec1148e4 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sun, 23 Nov 2025 13:37:23 -0500 Subject: kern: lib: Add pointerbox physmem allocation Signed-off-by: Ian Moffett --- sys/inc/lib/ptrbox.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sys/inc/lib/ptrbox.h') 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; }; -- cgit v1.2.3