slab: upgrade kmalloc to allow DMA regions

these DMA regions are only meant to comply with certain AHCI
requirements, and are not yet general purpose
This commit is contained in:
Michael Shaw 2023-05-08 01:14:11 -04:00
commit 8544efe1ab
7 changed files with 89 additions and 36 deletions

View file

@ -21,6 +21,8 @@ struct page *pml4;
struct mem_region *mem_regions;
size_t num_regions;
struct page kdefault_attrs;
paddr_t kcr3 = 0;
static void *(*alloc_page)(void);
@ -368,6 +370,8 @@ void mem_early_init(char *mem, size_t len)
attrs.rw = 1;
attrs.xd = 0;
kdefault_attrs.val = attrs.val;
/* These page tables are initialized on the kernel stack
*
* These will be used to initialize the new memory regions we have