Move vmm fully into hal

This commit is contained in:
2025-09-02 07:51:02 +02:00
parent 0fb3a1ca75
commit 920de10025
13 changed files with 76 additions and 186 deletions

View File

@ -1,28 +0,0 @@
#ifndef VMM_VMM_H_
#define VMM_VMM_H_
#include <stddef.h>
#include "spinlock/spinlock.h"
#include "bootinfo/bootinfo.h"
#include "compiler/attr.h"
typedef struct {
SpinLock spinlock;
} VirtMem;
typedef struct VasRange {
struct VasRange *next;
uint8_t *virtstart;
uint8_t *physstart;
size_t size;
uint8_t pgflags;
} PACKED VasRange;
extern VirtMem VIRT_MEM;
void vmm_init(void);
#define VIRT(X) ((void *)(BOOT_INFO.hhdm_off + (uint64_t)(X)))
#endif // VMM_VMM_H_