Rework x86_64 paging and vmm
This commit is contained in:
@ -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_
|
||||
|
Reference in New Issue
Block a user