mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
kernel: pmm
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#ifndef _PMM_H
|
||||
#define _PMM_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define PMM_SECTION_COUNT 3
|
||||
#define PMM_SECTION_1MB 0
|
||||
#define PMM_SECTION_4GB 1
|
||||
#define PMM_SECTION_DEFAULT 2
|
||||
|
||||
void *pmm_alloc(size_t count, int flags);
|
||||
void pmm_free(void *addr, size_t count);
|
||||
void pmm_init();
|
||||
|
||||
extern uintptr_t hhdmbase;
|
||||
|
||||
#define MAKE_HHDM(x) (void *)((uintptr_t)x + hhdmbase)
|
||||
#define FROM_HHDM(x) (void *)((uintptr_t)x - hhdmbase)
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user