feat/kernel: Started on valloc implementation for amd64
This commit is contained in:
parent
91fc826022
commit
3aa5a1bb86
6 changed files with 132 additions and 6 deletions
|
@ -3,6 +3,11 @@
|
|||
#define VMM_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#ifndef VPM_MIN_ADDR
|
||||
#define VPM_MIN_ADDR 0x1000
|
||||
#endif // VPM_MIN_ADDR
|
||||
|
||||
typedef struct vm_region
|
||||
{
|
||||
|
@ -12,12 +17,13 @@ typedef struct vm_region
|
|||
/* TOOD: Maybe store flags */
|
||||
} vm_region_t;
|
||||
|
||||
typedef struct vma_ctx
|
||||
typedef struct vpm_ctx
|
||||
{
|
||||
vm_region_t *root;
|
||||
uint64_t *pagemap;
|
||||
} vma_ctx_t;
|
||||
} vpm_ctx_t;
|
||||
|
||||
void vmm_init();
|
||||
vpm_ctx_t *vmm_init(uint64_t *pm);
|
||||
void *valloc(vpm_ctx_t *ctx, size_t pages, uint64_t flags);
|
||||
|
||||
#endif // VMM_H
|
Loading…
Add table
Add a link
Reference in a new issue