summaryrefslogtreecommitdiff
path: root/arch/i386/include/kernel
diff options
context:
space:
mode:
authorDanny Holman <dholman@gymli.org>2024-06-21 21:53:05 -0500
committerDanny Holman <dholman@gymli.org>2024-06-21 21:53:05 -0500
commit1b09993e4fd0b1aebb3747818a1fc670abf6a02c (patch)
tree915b2155f33660cdfe4a5e61362f3f69c9814dc5 /arch/i386/include/kernel
parent056087596de64696f18f9b32f604b69280be079e (diff)
arch: i386: pmem: refactor the physical memory manager
Refactor the physical memory manager to be more efficient and require fewer function calls from layers above. Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to 'arch/i386/include/kernel')
-rw-r--r--arch/i386/include/kernel/pmem.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/i386/include/kernel/pmem.h b/arch/i386/include/kernel/pmem.h
index da169c7..e6e4f57 100644
--- a/arch/i386/include/kernel/pmem.h
+++ b/arch/i386/include/kernel/pmem.h
@@ -3,8 +3,7 @@
#include <kernel/multiboot.h>
#include <stdint.h>
-
-#define PFA_ALLOC_ERR 0xFFFFFFFF
+#include <stddef.h>
struct pfa_page {
struct pfa_page *next;
@@ -12,8 +11,7 @@ struct pfa_page {
void pfa_init(struct mboot_info *header);
-uintptr_t pfa_alloc(void);
-void pfa_free(uintptr_t paddr);
-void pfa_free_range(uintptr_t start, uintptr_t end);
+void pfa_free_dma(uintptr_t paddr, size_t num_pages);
+void pfa_free(uintptr_t paddr, size_t num_pages);
#endif