GDT finally works

This commit is contained in:
2025-08-10 21:29:16 +02:00
parent f8f00cc608
commit 8ee1ea1292
36 changed files with 868 additions and 206 deletions

20
kernel/pmm/pmm.h Normal file
View File

@ -0,0 +1,20 @@
#ifndef PMM_PMM_H_
#define PMM_PMM_H_
#include <stddef.h>
#include <stdint.h>
#include "spinlock.h"
#include "bitmap/bitmap.h"
typedef struct {
SpinLock spinlock;
BitMap self;
} PhysMem;
extern PhysMem PHYS_MEM;
void pmm_init(void);
void *pmm_alloc(size_t pages);
void pmm_free(uintptr_t ptr, size_t pages);
#endif // PMM_PMM_H_