Rework x86_64 paging and vmm

This commit is contained in:
2025-08-30 00:31:20 +02:00
parent 8cf1bde879
commit 7a52f2f051
28 changed files with 262 additions and 291 deletions

View File

@ -2,18 +2,17 @@
#define VMM_VMM_H_
#include <stddef.h>
#include "bitmap/bitmap.h"
#include "spinlock/spinlock.h"
#include "bootinfo/bootinfo.h"
typedef struct {
SpinLock spinlock;
BitMap self;
} VirtMem;
extern VirtMem VIRT_MEM;
void vmm_init(void);
void *vmm_alloc(size_t pages);
void vmm_free(void *ptr, size_t pages);
#define VIRT(X) ((void *)(BOOT_INFO.hhdm_off + (uint64_t)(X)))
#endif // VMM_VMM_H_