10#ifndef KERNEL_MM_PMM_H
11#define KERNEL_MM_PMM_H
13#include <limine/limine.h>
15#define FRAME_SIZE 4096ULL
uint64_t pmm_alloc_frame(void)
Allocate a frame from the physical memory manager.
uint64_t pmm_alloc_contiguous(uint64_t count)
Allocates count contiguous frames from the physical memory manager.
void pmm_free_frame(uint64_t physical_addr)
Frees a frame from the physical memory manager.
void pmm_init(const struct limine_memmap_response *memmap_response)
Initialize the physical memory manager.
uint64_t pmm_alloc_zeroed_contiguous(uint64_t count)
Allocate and zero count contiguous frames from the physical memory manager.
struct pmm_state get_pmm_state(void)
Get the current pmm state.
uint64_t pmm_alloc_zeroed(void)
Allocate and zero a frame from the physical memory manager.
Holds the state of the physical memory manager and information about its memory.
uint64_t free_frames
how many frames are currently free
uint64_t * bitmap
virtual address (through the HHDM) of the bitmap
uint64_t next_hint
word index where the next search starts
uint64_t frame_count
number of frames the bitmap covers