From b106df2447d23d6b3fcffa7cc87edde218d054f3 Mon Sep 17 00:00:00 2001 From: Nathan Lee Date: Wed, 17 Jun 2026 13:05:15 -0500 Subject: create wdt device discovery discuss: per wrv32em status, consider moving custom wdt format to dtb or pci device discovery (potentially both: we have the framework for pci.ko extension after using dtb to discover memory and pci devices) --- include/mem.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 include/mem.h (limited to 'include/mem.h') diff --git a/include/mem.h b/include/mem.h new file mode 100644 index 0000000..12976df --- /dev/null +++ b/include/mem.h @@ -0,0 +1,22 @@ +#pragma once +#include + +#define EHEAP_SIZE (512 * 1024) + +typedef enum { + PAGE_FREE, + PAGE_ALLOCATED +} MemoryPageAvailability; + +struct page { + void* locator; + MemoryPageAvailability availability; + struct page* next; +}; + +void* kmalloc(size_t size); +void* memcpy(void* to, const void* from,size_t size); + +void* kemalloc(size_t size); + +extern struct page root; -- cgit v1.2.3